Python SDK
pip install phanes
19 modules, full protocol access: identity through consensus and settlement.
- 19 modules — full protocol access
- MCP: python -m aeos.mcp_server
- Stripe & USDC settlement engines
Three SDKs. 17 API endpoints. 11 MCP tools. Everything you need to build the agent economy.
Quick start
Python for the full protocol, TypeScript for typed clients, or Docker for a batteries-included API server.
# Core SDK
pip install phanes
# Optional: FastAPI server + REST surface
pip install phanes[server]npm install @phanes/sdkdocker compose up -dCode examples
Identity, settlement, consensus, and a typed client — same objects from protocol to production.
from aeos.identity import AgentIdentity, AgentType, CapabilityScope, AuthorityBounds
alice = AgentIdentity.create(
controller_did="did:aeos:acme-corp",
agent_type=AgentType.AUTONOMOUS,
capabilities={CapabilityScope.TRANSACT, CapabilityScope.SIGN_CONTRACT},
bounds=AuthorityBounds(max_transaction_value=100_000_00),
)from aeos.settlement import StripeSettlementEngine
engine = StripeSettlementEngine("sk_test_...")
result = engine.create_escrow("contract-001", 25000, "usd", "did:alice", "did:bob")
engine.capture_escrow("contract-001") # On fulfillment
engine.refund_escrow("contract-001") # On disputefrom aeos.bft_ledger import DistributedLedger
ledger = DistributedLedger(num_replicas=4)
result = ledger.submit({ "type": "agent_registered", "did": "did:aeos:alice" })
assert result["committed"]import { AgentIdentity, AgentType, Capability, PhanesClient } from "@phanes/sdk";
const agent = AgentIdentity.create("did:aeos:corp", AgentType.AUTONOMOUS,
[Capability.TRANSACT, Capability.SIGN_CONTRACT],
{ maxTransactionValue: 100_000_00 });SDKs
Same protocol semantics across runtimes — pick the surface that matches your stack.
pip install phanes
19 modules, full protocol access: identity through consensus and settlement.
@phanes/sdk
Crypto, identity, contracts, plus a typed HTTP client against the REST API.
bulletproofs · Ristretto255
The bulletproofs crate powers range proofs with a Python FFI bridge.
REST API
FastAPI server with OpenAPI at /docs. Install phanes[server] for the full REST surface.
Export the schema for codegen; idempotent writes where the ledger requires them.
Full API reference (doc.phanes.app)# Example endpoints
POST /agents
POST /contracts
GET /ledger
# Complete list: /docs + documentation siteInteractive Swagger UI ships with every server build.
MCP integration
Wire models to assistants via Model Context Protocol — structured tool calls instead of ad-hoc prompts.
{
"mcpServers": {
"aeos": {
"command": "python",
"args": ["-m", "aeos.mcp_server"]
}
}
}Tools return structured JSON aligned with protocol events — receipts, not prose.
Guides, API reference, architecture, and security deep-dives — synced with protocol releases.
Apache-2.0 · AEOS Protocol · Phanes.app