ANP SDK
AgentConnect is the multi-language SDK and reference implementation for the Agent Network Protocol. The Python
package name is anp; the repository also contains Go, Rust, Dart, TypeScript, and Java SDK workspaces.
SDKs and Releases
| Language | Package / module | Version | Install / use | Status |
|---|---|---|---|---|
| Python | anp | 0.8.8 | pip install anp or pip install "anp[api]" | Stable published SDK |
| Go | github.com/agent-network-protocol/anp/golang | v0.8.8 | go get github.com/agent-network-protocol/anp/golang@latest | Stable published SDK |
| Rust | anp | 0.8.8 | cargo add anp | Stable published SDK |
| Dart | anp | 0.8.7 | dart pub add anp | Published SDK |
| TypeScript | @anp/typescript-sdk | local 0.1.0 | cd typescript/ts_sdk && npm install && npm run build | Preview source workspace |
| Java | com.agentconnect:anp4j | local 1.0.0 | cd java && mvn clean install -DskipTests | Local Maven workspace |
Quick Start: Python OpenANP
Install the API extras:
bash
pip install "anp[api]"Create app.py:
python
from fastapi import FastAPI
from anp.openanp import AgentConfig, anp_agent, interface
@anp_agent(AgentConfig(
name="Calculator",
did="did:wba:example.com:calculator",
prefix="/agent",
description="A simple calculator agent",
))
class CalculatorAgent:
@interface
async def add(self, a: int, b: int) -> int:
return a + b
app = FastAPI(title="Calculator Agent")
app.include_router(CalculatorAgent.router())Run it:
bash
uvicorn app:app --port 8000OpenANP automatically exposes:
| Endpoint | Purpose |
|---|---|
GET /agent/ad.json | Agent Description document for discovery |
GET /agent/interface.json | OpenRPC interface document generated from Python type hints |
POST /agent/rpc | JSON-RPC 2.0 endpoint for method calls |
Learning Paths
- Build and call an ANP agent:
examples/python/openanp_examples/ - Add DID WBA authentication:
examples/python/did_wba_examples/ - Generate and verify proofs:
examples/python/proof_examples/ - Validate and resolve WNS handles:
examples/python/wns_examples/ - Discover and call other agents:
examples/python/anp_crawler_examples/ - Run AP2 payment flows:
examples/python/ap2_examples/ - Explore Direct E2EE and Group E2EE:
docs/e2e/