semvec/pypi-packages huggingface dataset:
aex 2.0.0
AEX v2.0 — local-first AI execution governance kernel with deterministic accounting, idempotent admission, and tamper-evident ledger replay.
License: MIT
Requires Python: >=3.11
Keywords: ai, llm, governance, budget, proxy, openai, agents, rate-limiting

# AEX v2.0 - Auto Execution Kernel

AEX v2.0 is a local-first governance kernel for agent execution with deterministic accounting.

Core guarantees:
- budget reserve/commit/release lifecycle per `execution_id`
- idempotent request replay behavior
- hash-chained ledger events for tamper evidence
- OpenAI-compatible northbound API with provider abstraction southbound

## v2.0 Runtime Architecture

Control path:
1. Auth (`Bearer` token, scope, TTL)
2. Admission (`execution_id`, rate-limit, policy, route, preflight reserve)
3. Provider dispatch (streaming/non-streaming)
4. Exactly-once settlement (`COMMITTED` or `RELEASED`/`DENIED`/`FAILED`)
5. Hash-chain event append + metrics projection

Execution states:
- `RESERVING -> RESERVED -> DISPATCHED -> COMMITTED`
- failure paths: `RELEASED`, `DENIED`, `FAILED`

## Active Endpoints (Sorted)

Admin:
- `GET /admin/activity`
- `POST /admin/reload_config`
- `GET /admin/replay`
- `GET /dashboard`
- `GET /health`
- `GET /metrics`

Proxy:
- `POST /openai/v1/chat/completions`
- `POST /openai/v1/embeddings`
- `POST /openai/v1/responses`
- `POST /openai/v1/tools/execute`
- `POST /v1/chat/completions`
- `POST /v1/embeddings`
- `POST /v1/responses`
- `POST /v1/tools/execute`

## Data Model (v2.0)

Primary tables:
- `agents` - identity, caps, budget/spend/reserved counters
- `executions` - idempotent execution identity + terminal cache
- `reservations` - reserve/commit/release state
- `event_log` - hash-chained immutable events
- `events` - compatibility/event metrics stream
- `rate_windows` - RPM/TPM windows
- `tool_plugins` - plugin registry

## Startup + Recovery

On daemon startup:
- initialize/migrate DB schema
- run integrity checks
- load model/provider config
- reconcile incomplete executions (release stale reservations, fail broken non-terminal flows)

## Dashboard

Live playout dashboard:
- `http://127.0.0.1:9000/dashboard`

## Quick Start

```bash
pip install aex

aex init
aex daemon start

aex agent create my-agent 5.00 30 --allow-passthrough

export OPENAI_BASE_URL=http://127.0.0.1:9000/v1
export OPENAI_API_KEY=<AEX_AGENT_TOKEN>
```

## Source Layout

Technical READMEs are provided in each major folder under `src/aex` and `src/aex/daemon`.
t0ken-memoryx 1.1.0
MemoryX Python SDK - 让 AI Agents 轻松拥有持久记忆
License: MIT
Requires Python: >=3.7
Keywords: memory, ai, agent, llm, cognitive, memoryx

# MemoryX Python SDK

Give your AI agents long-term memory.

## Installation

```bash
pip install t0ken-memoryx
```

## Quick Start

```python
from memoryx import connect_memory

# Connect (auto-registers on first use)
memory = connect_memory()

# Store a memory
memory.add("User prefers dark mode")

# Search memories
results = memory.search("user preferences")
for m in results["data"]:
    print(m["content"])

# List all memories
memories = memory.list(limit=10)

# Delete a memory
memory.delete("memory_id")
```

## API Reference

### `connect_memory(base_url=None, verbose=True)`

Quick connect to MemoryX. Auto-registers if first time.

```python
from memoryx import connect_memory

memory = connect_memory()
```

For self-hosted:

```python
memory = connect_memory(base_url="http://localhost:8000/api")
```

### `memory.add(content, project_id="default", metadata=None)`

Store a memory. Returns `{"success": True, "task_id": "..."}`.

```python
memory.add("User works at Google")
memory.add("User birthday is Jan 15", project_id="personal")
```

### `memory.search(query, project_id=None, limit=10)`

Search memories by semantic similarity.

```python
results = memory.search("user job")
for m in results["data"]:
    print(f"- {m['memory']} (score: {m['score']})")
```

### `memory.list(project_id=None, limit=50, offset=0)`

List all memories with pagination. Uses `GET /v1/memories/list`.

```python
memories = memory.list(limit=20, offset=0)
print(f"Total: {memories['total']}")
for m in memories["data"]:
    print(f"- {m['id']}: {m['content']}")
```

### `memory.delete(memory_id)`

Delete a memory by ID.

```python
memory.delete("abc123")
```

### `memory.get_task_status(task_id)`

Check async task status (from `add()`).

```python
status = memory.get_task_status("task_id_here")
print(status["status"])  # PENDING, SUCCESS, FAILURE
```

### `memory.get_quota()`

Get quota information.

```python
quota = memory.get_quota()
print(f"Tier: {quota['quota']['tier']}")
print(f"Memories used: {quota['quota']['memories']['used']}")
```

## Self-Hosted

```python
from memoryx import connect_memory

memory = connect_memory(base_url="http://your-server:8000/api")
```

## License

MIT