ag-client
Official Python client for Aegis — orchestration middleware for Claude Code.
Install
pip install ag-client
Quick Start
from aegis_python_client import AegisClient
client = AegisClient(
base_url="http://localhost:9100",
auth_token="your-token",
)
# List all sessions
sessions = client.list_sessions()
for s in sessions.get("sessions", []):
print(s["id"], s.get("name", ""))
# Create a new session
result = client.create_session(
work_dir="/path/to/project",
name="my-session",
)
session_id = result["id"]
# Send a message
client.send_message(session_id, "Implement feature X")
# Get session metrics
metrics = client.get_session_metrics(session_id)
print(metrics)
Features
- Zero external HTTP dependencies — uses only
urllibfrom stdlib - Pydantic v2 models — all request/response types generated from OpenAPI spec
- Full API coverage — 53 endpoints: sessions, pipelines, templates, memory, auth, monitoring
- Type-safe — full type annotations throughout
Regenerating Models
When openapi.yaml changes at the repo root:
python -m pip install -e "packages/python-client[dev]"
npm run sdk:py:generate
npm run sdk:py:check
npm run sdk:py:check regenerates the Pydantic models from the root OpenAPI
contract and fails if src/aegis_python_client/models.py has drifted.
License
MIT
Release files for ag-client 0.6.7
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| ag_client-0.6.7.tar.gz | 6.3 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| ag_client-0.6.7-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 13.8 kB
Release files / ag_client-0.6.7.tar.gz
| Download URL | ag_client-0.6.7.tar.gz |
|---|---|
| Size | 6.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
6ced018a304881911cae00e064013f932ae2b4186fd75c1a1a70a0ee8ce29a07
|
|
BLAKE2b-256 checksum How to use checksums |
9bdea6546960c3149c607b29be2ee70664e2a2eabd38cffa4325dee94a647bce
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on May 16, 2026.
Transparency logRelease files / ag_client-0.6.7-py3-none-any.whl
| Download URL | ag_client-0.6.7-py3-none-any.whl |
|---|---|
| Size | 7.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
13674ef49dd87f05db1953fd25d2177c3b620c0cfdf644a005ec938040c77185
|
|
BLAKE2b-256 checksum How to use checksums |
e682228a8f271170e8404b68290e4a2f7bce99bcc4620f0c481de3707e23a651
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on May 16, 2026.
Transparency log