Metadata-Version: 2.5
Name: agentplane-control-plane
Version: 0.1.0
Summary: Shared AgentPlane control plane: Chronicle envelopes + TokenOps governance over HTTP.
Project-URL: Homepage, https://github.com/theagentplane/control-plane
Project-URL: Repository, https://github.com/theagentplane/control-plane
Project-URL: Issues, https://github.com/theagentplane/control-plane/issues
Project-URL: Changelog, https://github.com/theagentplane/control-plane/blob/main/CHANGELOG.md
Author: Susheem Koul, Tisha Chawla
License-Expression: MIT
License-File: LICENSE
Keywords: agents,chronicle,control-plane,governance,llm,observability,tokenops
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Classifier: Topic :: System :: Systems Administration
Requires-Python: >=3.10
Requires-Dist: fastapi>=0.115
Requires-Dist: httpx>=0.27
Requires-Dist: jinja2>=3.1
Requires-Dist: pydantic>=2
Requires-Dist: pyyaml>=6
Requires-Dist: uvicorn[standard]>=0.32
Provides-Extra: dev
Requires-Dist: build>=1.2; extra == 'dev'
Requires-Dist: httpx>=0.27; extra == 'dev'
Requires-Dist: pytest>=8; extra == 'dev'
Requires-Dist: ruff==0.15.22; extra == 'dev'
Requires-Dist: twine>=6; extra == 'dev'
Provides-Extra: ui
Requires-Dist: pandas>=2; extra == 'ui'
Requires-Dist: streamlit>=1.32; extra == 'ui'
Description-Content-Type: text/markdown

# AgentPlane Control Plane

Shared HTTP control plane for **Chronicle** and **TokenOps**. SQLite lives
**only** in this process. Agents never open the database file.

Design: [`docs/DESIGN.md`](docs/DESIGN.md) · Issue: [#2](https://github.com/theagentplane/control-plane/issues/2)

## Install

```bash
pip install agentplane-control-plane
control-plane serve --port 8800 --db control_plane.db
```

From a clone:

```bash
python -m venv .venv && source .venv/bin/activate
pip install -e ".[dev]"
control-plane serve --port 8800 --db control_plane.db
```

Open http://127.0.0.1:8800/ — Admin, Chronicle, TokenOps tabs. No login.

Sidecars:

```bash
export CONTROL_PLANE_URL=http://127.0.0.1:8800
# Chronicle
chronicle.record("run", store=RemoteStore(os.environ["CONTROL_PLANE_URL"], batch_size=1))
# TokenOps
export TOKENOPS_URL=http://127.0.0.1:8800
# TOKENOPS_EMBEDDED must be unset
```

## API callers

| Route | Caller |
|---|---|
| `POST /v1/envelopes:batch` | Chronicle sidecar (only ingest API; `batch_size=1` = immediate flush) |
| `GET /v1/traces/{id}/envelopes` | Chronicle sidecar (fixture replay) and Chronicle UI waterfall |
| `GET /v1/traces` | Chronicle UI search |
| `POST /v1/runs`, ledger, governance, run-records | TokenOps sidecar |
| segments / budgets / policies, admin keys | UI |

Auth off when no keys exist (local). Create keys in Admin, or:

```bash
export CONTROL_PLANE_API_KEYS='chron:local:ingest+read,tops:local:ingest+read,admin:local:read+admin'
export CONTROL_PLANE_API_KEY=chron   # sidecar
```

## Local SQLite

Default is a file next to the server (`CONTROL_PLANE_DB`). Do not point TokenOps
or Chronicle at that file. Unit tests in those repos keep their own sqlite/jsonl
when `TOKENOPS_EMBEDDED=1` / local Chronicle stores.
