asap-protocol
Standard protocol for agent-to-agent communication with stateful orchestration, MCP-compatible and a public marketplace to discover and register agents.
ASAP: Async Simple Agent Protocol
✨ From agents, for agents. Delivering reliability, as soon as possible.

A production-ready protocol for agent-to-agent communication and task coordination.
Quick Info: v2.1.1 | Apache 2.0 | Python 3.13+ | Documentation | PyPI | Changelog
🚀 Live now our agentic marketplace — Browse agents, register yours, request verification.
Why ASAP?
Building multi-agent systems today suffers from three core technical challenges that existing protocols like A2A don't fully address:
- $N^2$ Connection Complexity: Most protocols assume static point-to-point HTTP connections that don't scale.
- State Drift: Lack of native persistence makes it impossible to reliably resume long-running agentic workflows.
- Fragmentation: No unified way to handle task delegation, artifact exchange and tool execution (MCP) in a single envelope.
ASAP provides a production-ready communication layer that simplifies these complexities. It's ideal for multi-agent orchestration, stateful workflows (persistence, resumability), MCP support and production systems requiring high-performance, type-safe agent communication.
For simple point-to-point communication, a basic HTTP API might suffice; ASAP shines when you need orchestration, state management and multi-agent coordination. See the spec for details.
Key Features
- Stateful orchestration — Task state machine with snapshotting for resumable workflows.
- Schema-first — Pydantic v2 + JSON Schema for cross-agent interoperability.
- Async-native —
asyncio+httpx; sync and async handlers supported. - MCP integration — Tool execution and coordination in a single envelope.
- Observable —
trace_idandcorrelation_idfor debugging. - Security — Bearer auth, OAuth2/JWT, Ed25519 signed manifests, optional mTLS, replay prevention, HTTPS, rate limiting. Security Model (trust limits, Custom Claims).
- Economics — Usage metering, delegation tokens, SLA framework with breach alerts.
🆕 Framework Ecosystem
ASAP is built for interoperability. Seamlessly integrate your agents into OpenClaw, LangChain, CrewAI and LlamaIndex workflows using our growing library of native adapters and standardized tool-calling schemas.
Installation
We recommend using uv for dependency management:
uv add asap-protocol
Or with pip:
pip install asap-protocol
📦 Available on PyPI — for reproducible environments, prefer uv when possible.
Quick Start
Run the demo (echo agent + coordinator in one command):
uv run python -m asap.examples.run_demo
Build your first agent here — server setup, client code, step-by-step (~15 min).
19 examples: orchestration, state migration, MCP, OAuth2, WebSocket, resilience.
Testing
uv run pytest -n auto --tb=short
With coverage:
uv run pytest --cov=src --cov-report=term-missing
Testing Guide (structure, fixtures, property/load/chaos tests). Contributing (dev setup, CI).
Compliance Harness
Validate that your agent follows the ASAP protocol:
uv add asap-compliance
pytest --asap-agent-url https://your-agent.example.com -m asap_compliance
See Compliance Testing Guide for handshake, schema and state machine validation.
Documentation
Learn
- Docs | API Reference
- Tutorials — First agent to production checklist
- Migration from A2A/MCP
- Raw Fetch (non-Python) — Fetch registry.json and revoked_agents.json with curl/fetch; implement your own client.
Deep Dive
- State Management | Best Practices: Failover & Migration | Error Handling
- Transport | Security | Security Model (OAuth2 trust, Custom Claims)
- Identity Signing | Compliance Testing | Migration v1.1 to v1.2 | mTLS
- Observability | Testing
Decisions & Operations
- ADRs — 17 Architecture Decision Records
- Tech Stack — Rationale for Python, Pydantic, Next.js choices
- Deployment | Troubleshooting
Release
CLI
- v1.1 adds OAuth2, WebSocket, Discovery (well-known + Lite Registry), State Storage (SQLite) and Webhooks.
- v1.2 adds Ed25519 signed manifests, trust levels, optional mTLS and the Compliance Harness.
- v1.3 adds delegation commands (
asap delegation create,asap delegation revoke).
asap --version # Show version
asap list-schemas # List all available schemas
asap export-schemas # Export JSON schemas to file
asap keys generate -o key.pem # Generate Ed25519 keypair
asap manifest sign -k key.pem manifest.json # Sign manifest
asap manifest verify signed.json # Verify signature
asap manifest info signed.json # Show trust level
See CLI reference or run asap --help.
See docs index and Identity Signing for details.
🔭 What's Next?
ASAP is evolving toward an Agent Marketplace — an open ecosystem where AI agents discover, trust and collaborate autonomously. See our vision document for the full roadmap.
Contributing
Community feedback and contributions are essential for ASAP Protocol's evolution. We're working on improvements and your input helps shape the future of the protocol.
Every contribution, from bug reports to feature suggestions, documentation improvements and code contributions, makes a real difference.
Check out our contributing guidelines to get started. It's easier than you think! 🚀
License
This project is licensed under the Apache 2.0 License - see the license file for details.
Built with Cursor using Composer 1.5, Claude Opus 4.6, Gemini 3.1 Pro and Kimi K2.5.
Yorumlar (0)
Yorum birakmak icin giris yap.
Yorum birakSonuc bulunamadi