A unified, open-source protocol for autonomous AI agent identity, service discovery, and commerce.
AICP provides AI agents with the foundational infrastructure to participate as first-class economic actors: DID-based cryptographic identity, intelligent service discovery via the Agent Name System (ANS), standardized onboarding, and provider-agnostic payment abstraction.
| Layer | Name | Purpose |
|---|---|---|
| 1 | Identity | W3C DID-anchored agent credentials with verifiable credentials |
| 2 | Discovery | Agent Name System (ANS) for capability-based service discovery |
| 3 | Onboarding | Standardized 4-phase machine-executable registration |
| 4 | Commerce | Provider-agnostic payment tokens (Stripe, PayPal, USDC) |
git clone https://github.com/aicp-protocol/aicp.git
cd aicp
task docker:upServer API at http://localhost:8080, metrics at http://localhost:9090.
task build
export AICP_DATABASE_URL="postgres://aicp:aicp@localhost:5432/aicp?sslmode=disable"
task migrate:up
./bin/aicp-servercurl http://localhost:8080/health
# {"status":"ok","version":"dev","protocol":"1.0"}import { AICPAgent } from '@aicp/sdk';
const agent = await AICPAgent.create({
idpUrl: 'https://idp.aicp.example.com',
principalToken: process.env.AICP_PRINCIPAL_TOKEN,
});
const results = await agent.discovery.search({ tags: ['cloud-compute'] });
const session = await agent.onboard(results.services[0], { tier: 'starter' });from aicp import AICPAgent
agent = await AICPAgent.create(
idp_url="https://idp.aicp.example.com",
principal_token=os.environ["AICP_PRINCIPAL_TOKEN"],
)
results = await agent.discovery.search(tags=["cloud-compute"])
session = await agent.onboard(results.services[0], tier="starter")import { createAICPMiddleware, AICPServiceAdapter } from '@aicp/sdk';
class MyServiceAdapter implements AICPServiceAdapter {
async getServiceManifest() { /* ... */ }
async verifyAgent(did, credentials) { /* ... */ }
async negotiate(request) { /* ... */ }
async authorizePayment(token) { /* ... */ }
async provision(agent, tier) { /* ... */ }
}
app.use('/aicp', createAICPMiddleware(new MyServiceAdapter()));┌─────────────────────────────────────────────┐
│ AICP Protocol Server │
├──────────┬──────────┬──────────┬────────────┤
│ Identity │ Discovery│Onboarding│ Commerce │
│ (DIDs) │ (ANS) │ (4-phase)│ (Payments) │
├──────────┴──────────┴──────────┴────────────┤
│ Consortium Ledger (PG) │
│ Blocks + Merkle Trees + Consensus │
├─────────────────────────────────────────────┤
│ PostgreSQL Redis │
└─────────────────────────────────────────────┘
See docs/architecture.md for detailed design, interfaces, and patterns.
server/ Go protocol server (chi, pgx, go-redis)
cmd/aicp-server/ Server entry point
cmd/aicp/ CLI tool (cobra)
internal/ Protocol implementation (identity, discovery, onboarding, commerce)
pkg/aicp/ Public Go types and error codes
operator/ K8s operator for consortium ledger management
sdk/typescript/ TypeScript client SDK (@aicp/sdk)
sdk/python/ Python client SDK (aicp)
spec/ OpenAPI 3.1 + JSON Schema (protocol source of truth)
deploy/ Docker, Helm charts, Grafana dashboards
docs/ Protocol paper, specs, architecture, guides
k8s/ Local K8s manifests (PostgreSQL, Redis, Prometheus, Grafana, ingress)
AICP provides the identity and discovery substrate that existing protocols need:
- A2A (Google): AICP-credentialed agents authenticate to A2A servers
- MCP (Anthropic): Agents access MCP tool servers with verifiable authorization
- ACP (Stripe/OpenAI): Agents initiate ACP checkout with scoped payment tokens
AICP includes production-grade observability out of the box:
- Prometheus: Scrapes all
aicp_*metrics from the server metrics port - Grafana: 4 pre-built dashboards (overview, identity/onboarding, commerce, ANS performance)
- Structured logging: JSON logs via Go's
log/slogwith correlation IDs
In the local k3d environment, Prometheus, Grafana, and all services are accessible via Traefik ingress:
| Service | URL |
|---|---|
| AICP Server | http://aicp.localhost:8081 |
| Grafana | http://grafana.localhost:8081 |
| pgAdmin | http://pgadmin.localhost:8081 |
| Prometheus | http://prometheus.localhost:8081 |
| Document | Description |
|---|---|
| Protocol Paper | Full technical specification (17 sections, 7 diagrams) |
| Architecture | System design, patterns, interfaces, API reference |
| Development | Dev environment setup (devcontainer, k3d, Tilt) |
| Deployment | Docker, Helm, K8s operator, monitoring |
| Contributing | Code style, workflow, how to add adapters |
| Protocol Spec | Layer-by-layer protocol specification |
| API Spec | OpenAPI 3.1 endpoint definitions |
task check # Format, vet, lint, test
task all # Build and test everything
task dev:start # Start full dev environment (k3d + Tilt)
task dev:test # Run e2e tests against live clusterSee docs/development.md for the full dev environment guide.
Apache 2.0 - See LICENSE for details.