Skip to main content

Async Simple Agent Protocol - A streamlined protocol for agent-to-agent communication

Project description

ASAP: Async Simple Agent Protocol

✨ From agents, for agents. Delivering reliability, as soon as possible.

ASAP Protocol Banner

A production-ready protocol for agent-to-agent communication and task coordination.

Quick Info: v2.2.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:

  1. $N^2$ Connection Complexity: Most protocols assume static point-to-point HTTP connections that don't scale.
  2. State Drift: Lack of native persistence makes it impossible to reliably resume long-running agentic workflows.
  3. 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-nativeasyncio + httpx; sync and async handlers supported.
  • MCP integration — Tool execution and coordination in a single envelope.
  • Observabletrace_id and correlation_id for debugging.
  • Security — Bearer auth, OAuth2/JWT, Ed25519 signed manifests, optional mTLS, replay prevention, HTTPS, rate limiting. Security Model (trust limits, Custom Claims).
  • Identity & capabilities (v2.2, WebAuthn real in v2.2.1) — Per-runtime Host/Agent JWTs, capability grants with constraints (max, min, in, not_in), approval flows (device authorization / CIBA-style), real WebAuthn attestation/assertion for high-risk registration (opt-in via asap-protocol[webauthn]).
  • Streaming & wire protocol (v2.2)POST /asap/stream (SSE / TaskStream), JSON-RPC 2.0 batch on POST /asap, ASAP-Version negotiation, tamper-evident audit logging, Compliance Harness v2.
  • 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

Deep Dive

Decisions & Operations

Release

CLI

asap --version                                    # Show version
asap list-schemas                                 # List all available schemas
asap export-schemas                               # Export JSON schemas to file
asap compliance-check --url https://agent.example # Compliance Harness v2 (HTTP(S))
asap audit export --store memory --format json    # Export audit log (stdout)
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 the CLI reference for compliance-check and audit export flag details, the CI compliance gate for wiring compliance-check into GitHub Actions, the audit export guide, Identity Signing, or run asap --help for the full command surface.

Version History

  • 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).
  • v2.0 adds the Lean Marketplace Web App (Next.js), Lite Registry on GitHub Pages, IssueOps registration, OAuth sign-in for developers, and Verified Badge flow.
  • v2.1 adds the Consumer SDK (MarketClient), optional framework extras (LangChain, CrewAI, LlamaIndex, SmolAgents, OpenClaw, …), and registry UX improvements on PyPI.
  • v2.1.1 is a patch release: JWT algorithm allowlist, SQLite async bridging, optional Redis-backed rate limits, SSRF hardening in the web app, and related reliability fixes (see Changelog).
  • v2.2 adds per-runtime agent identity, capability-based authorization, SSE streaming (POST /asap/stream), ASAP-Version negotiation, JSON-RPC batch requests, tamper-evident audit logging, async state stores, and Compliance Harness v2.
  • v2.2.1 closes the SELF-002 follow-up with real WebAuthn attestation/assertion via the opt-in asap-protocol[webauthn] extra, ships the asap compliance-check and asap audit export CLIs, promotes the client SDK ResolvedAgent.run() to a typed contract (raises TypeError on protocol violation), introduces the asap.economics.audit.AuditChainBroken exception for scripted tamper handling, and pins upper bounds on security-sensitive deps (cryptography, authlib, joserfc, pyjwt, webauthn, pydantic) — see dependency policy and full notes in the Changelog.

For a structured index of per-version features, see the docs index.

🔭 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 and Claude Code — primarily Claude Opus 4.7 (1M context) with Cursor Composer 1.5, Gemini 3.1 Pro, and Kimi K2.5 as collaborators.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

asap_protocol-2.2.1.tar.gz (308.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

asap_protocol-2.2.1-py3-none-any.whl (359.1 kB view details)

Uploaded Python 3

File details

Details for the file asap_protocol-2.2.1.tar.gz.

File metadata

  • Download URL: asap_protocol-2.2.1.tar.gz
  • Upload date:
  • Size: 308.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.13

File hashes

Hashes for asap_protocol-2.2.1.tar.gz
Algorithm Hash digest
SHA256 6767f2430b2fe503921164b9298d4e55a9bdf1ca54ff3f173734c8582d944c94
MD5 5095e77188eaf74c296597b22d7b1930
BLAKE2b-256 1000feb7a10a0a012133e018a2823059d9b901ca446d85b26cff360e3700befc

See more details on using hashes here.

File details

Details for the file asap_protocol-2.2.1-py3-none-any.whl.

File metadata

  • Download URL: asap_protocol-2.2.1-py3-none-any.whl
  • Upload date:
  • Size: 359.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.13

File hashes

Hashes for asap_protocol-2.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 9f8320057fba001d83ac285ff542c58ee103e60b650c673734531992de6ac3fd
MD5 5ddcdffb2021b26c1a5fef410000fba4
BLAKE2b-256 534e55d64cd59284a591513d332779f3a1577312ad987d471f9d0407fd084049

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page