Official Python client for Aegis — orchestration middleware for Claude Code
Project description
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
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file ag_client-0.6.6.dev1.tar.gz.
File metadata
- Download URL: ag_client-0.6.6.dev1.tar.gz
- Upload date:
- Size: 6.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
fef41d7fde6a8b64fc28abf69171e59f540f8fc4f978de637094867b7d435c69
|
|
| MD5 |
bd219d9d5332c172d37310aa8ea5cea5
|
|
| BLAKE2b-256 |
3edc89e02ad82557e9e8c630e530666a3d63d6263c33e9ea34103bac826dfaaa
|
Provenance
The following attestation bundles were made for ag_client-0.6.6.dev1.tar.gz:
Publisher:
release.yml on OneStepAt4time/aegis
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
ag_client-0.6.6.dev1.tar.gz -
Subject digest:
fef41d7fde6a8b64fc28abf69171e59f540f8fc4f978de637094867b7d435c69 - Sigstore transparency entry: 1433162808
- Sigstore integration time:
-
Permalink:
OneStepAt4time/aegis@74245d7246d1baaa2a7524a668d002478716e045 -
Branch / Tag:
refs/tags/v0.6.6-preview.1 - Owner: https://github.com/OneStepAt4time
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@74245d7246d1baaa2a7524a668d002478716e045 -
Trigger Event:
push
-
Statement type:
File details
Details for the file ag_client-0.6.6.dev1-py3-none-any.whl.
File metadata
- Download URL: ag_client-0.6.6.dev1-py3-none-any.whl
- Upload date:
- Size: 7.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e443e1822c0a77b22d3e8a3ce01f210824ea153491427ba1050d8a796651fd85
|
|
| MD5 |
960006c1b959abc9dcd10bea14c52ac6
|
|
| BLAKE2b-256 |
e95d5c208609c40596f36c74b3c5d61c7ae5b07ca76187be9727b15112751a04
|
Provenance
The following attestation bundles were made for ag_client-0.6.6.dev1-py3-none-any.whl:
Publisher:
release.yml on OneStepAt4time/aegis
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
ag_client-0.6.6.dev1-py3-none-any.whl -
Subject digest:
e443e1822c0a77b22d3e8a3ce01f210824ea153491427ba1050d8a796651fd85 - Sigstore transparency entry: 1433163233
- Sigstore integration time:
-
Permalink:
OneStepAt4time/aegis@74245d7246d1baaa2a7524a668d002478716e045 -
Branch / Tag:
refs/tags/v0.6.6-preview.1 - Owner: https://github.com/OneStepAt4time
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@74245d7246d1baaa2a7524a668d002478716e045 -
Trigger Event:
push
-
Statement type: