pip install phanes

Built for Developers

Three SDKs. 17 API endpoints. 11 MCP tools. Everything you need to build the agent economy.

Quick start

Install in seconds.

Python for the full protocol, TypeScript for typed clients, or Docker for a batteries-included API server.

Python
install.sh
# Core SDK
pip install phanes

# Optional: FastAPI server + REST surface
pip install phanes[server]
TypeScript
package.json
npm install @phanes/sdk
Docker
compose.yml
docker compose up -d

Code examples

Real APIs. Real primitives.

Identity, settlement, consensus, and a typed client — same objects from protocol to production.

Create agent identity

Python
identity.py
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),
)

Stripe settlement

Python
settlement_stripe.py
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 dispute

BFT consensus

Python
ledger.py
from aeos.bft_ledger import DistributedLedger
ledger = DistributedLedger(num_replicas=4)
result = ledger.submit({ "type": "agent_registered", "did": "did:aeos:alice" })
assert result["committed"]

TypeScript SDK

TypeScript
agent.ts
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

Polyglot by design

Same protocol semantics across runtimes — pick the surface that matches your stack.

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
View on PyPI

TypeScript SDK

@phanes/sdk

Crypto, identity, contracts, plus a typed HTTP client against the REST API.

  • Crypto, identity, contracts models
  • Typed HTTP client (OpenAPI-aligned)
  • Node 20+ and modern browsers
npm package

Rust

bulletproofs · Ristretto255

The bulletproofs crate powers range proofs with a Python FFI bridge.

  • Ristretto255 range proofs (bulletproofs)
  • Python FFI for aeos.zk workflows
  • Risk & settlement attestations
Rust sources on GitHub

REST API

FastAPI.
17 endpoints.

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)
routes.txt
# Example endpoints
POST /agents
POST /contracts
GET /ledger
# Complete list: /docs + documentation site

Interactive Swagger UI ships with every server build.

MCP integration

11 toolsfor Claude & GPT

Wire models to assistants via Model Context Protocol — structured tool calls instead of ad-hoc prompts.

mcp.json
{
  "mcpServers": {
    "aeos": {
      "command": "python",
      "args": ["-m", "aeos.mcp_server"]
    }
  }
}
Registered tools
create_agentget_agentlist_agentscreate_contractsign_contractget_contractsubmit_ledger_txget_ledger_headcreate_escrowopen_disputeresolve_dispute

Tools return structured JSON aligned with protocol events — receipts, not prose.

Documentation

Ship faster with doc.phanes.app

Guides, API reference, architecture, and security deep-dives — synced with protocol releases.

Apache-2.0 · AEOS Protocol · Phanes.app