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.4.0 (PyPI) · npm TS 2.4.0 | Apache 2.0 | Python 3.13+ | Documentation | PyPI asap-protocol | npm @asap-protocol/client | Changelog

📦 Install the ASAP Python SDK / protocol from https://pypi.org/project/asap-protocol/ — package name asap-protocol on PyPI.

🚀 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 documentation for the current protocol overview and features.

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.
  • Adoption Multiplier (v2.3.0) — OpenAPI → ASAP via create_from_openapi ([openapi] extra), official @asap-protocol/client on npm (Vercel AI / OpenAI / Anthropic adapters), optional Auto-Registration (POST /registry/agents), capability escalation, and ASAP WWW-Authenticate discovery challenges. All opt-in; wire protocol unchanged. See docs/index.md and docs/migration.md.
  • Edge-AI discovery (v2.4.0) — Optional manifest.capabilities.hardware + inference, Lite Registry mirror, marketplace browse filters, and @asap-protocol/client@2.4.0 discovery types. Wire protocol unchanged. See Migration (v2.3.x → v2.4.0) and ShellClaw registry guide.
  • Framework adapters (v2.3.1+, npm)@asap-protocol/mastra and @asap-protocol/openai-agents expose ASAP capabilities as Mastra tools and OpenAI Agents SDK tool() definitions. See Migration (v2.3.0 → v2.3.1).
  • 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

npm (TypeScript / JavaScript — @asap-protocol/client, 2.4.0). The latest dist-tag matches npm view @asap-protocol/client version.

npm Mastra @asap-protocol/mastra@2.4.0 bridges ASAP capabilities onto @mastra/core tools; docs: docs/integrations/mastra.md, demo: apps/example-mastra/README.md.

npm OpenAI Agents SDK @asap-protocol/openai-agents@2.4.0 exposes ASAP capabilities as @openai/agents tool() definitions — not the Chat Completions helper adapters/openai; docs: docs/integrations/openai-agents.md, demo: apps/example-openai-agents/README.md.

npm install @asap-protocol/client@2.4.0
npm install @asap-protocol/mastra@2.4.0 @asap-protocol/client @mastra/core zod
npm install @asap-protocol/openai-agents@2.4.0 @asap-protocol/client @openai/agents zod

📦 Canonical listing: https://pypi.org/project/asap-protocol/ — package asap-protocol (pip install asap-protocol). Prefer uv for reproducible environments 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

  • Changelog | PyPI listinghttps://pypi.org/project/asap-protocol/ (install: pip install asap-protocol)

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

High-level only — see Changelog and the docs index for full notes.

Version What shipped
v2.4.0 Edge-AI discoveryGitHub Release v2.4.0 · optional hardware / inference manifest fields, registry mirror, marketplace filters, @asap-protocol/client@2.4.0, ShellClaw onboarding docs. See CHANGELOG and Migration (v2.3.x → v2.4.0)
v2.3.1 npm TS patchGitHub Release v2.3.1 · @asap-protocol/mastra, @asap-protocol/openai-agents, @asap-protocol/client@2.3.1 (additive adapter exports). Python 2.3.0 unchanged. See CHANGELOG and Migration (v2.3.0 → v2.3.1)
v2.3.0 OpenAPI Adapter ([openapi]) · TypeScript client (@asap-protocol/client) · Auto-Registration · Capability escalation · ASAP HTTP challenge — see CHANGELOG and Migration
v2.2.1 Opt-in WebAuthn (asap-protocol[webauthn]) · asap compliance-check & asap audit export · stricter ResolvedAgent.run() · AuditChainBroken · pinned security deps
v2.2 Per-runtime identity & capability auth · SSE POST /asap/stream · ASAP-Version · JSON-RPC batch · tamper-evident audit · async state stores · Compliance Harness v2
v2.1.1 Patch: JWT allowlist · SQLite async bridge · optional Redis rate limits · web SSRF hardening
v2.1 MarketClient · framework extras (LangChain, CrewAI, LlamaIndex, …) · registry UX
v2.0 Marketplace web app · Lite Registry (GitHub Pages) · IssueOps · OAuth · verification flow
v1.3 asap delegation create / revoke
v1.2 Ed25519 manifests · trust levels · optional mTLS · Compliance Harness
v1.1 OAuth2 · WebSocket · discovery (well-known + Lite Registry) · SQLite state · webhooks

🔭 What's Next?

ASAP is evolving toward an Agent Marketplace — an open ecosystem where AI agents discover, trust and collaborate autonomously. See the ADR index and v2.0 roadmap PRD. Detailed long-term strategy narratives are maintained privately (not shipped in this repository).

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! 🚀

Contact

For general questions about the protocol, the marketplace, partnerships, or press (not security vulnerabilities — use SECURITY.md for those):

You can also use GitHub Discussions or Issues for public project topics.

Privacy

See PRIVACY.md for how the public site and maintainer telemetry use aggregate metrics (including Vercel Web Analytics) without collecting agent IDs or end-user PII in repository outputs.

License

This project is licensed under the Apache 2.0 License - see the license file for details.


Built with Cursor using Opus 4.6/4.7, Composer 1.5/2.0, Gemini 3.1 Pro and Kimi K2.5.

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.4.0.tar.gz (343.5 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.4.0-py3-none-any.whl (397.1 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: asap_protocol-2.4.0.tar.gz
  • Upload date:
  • Size: 343.5 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.4.0.tar.gz
Algorithm Hash digest
SHA256 ee99ad6faebfac48e92b18e9cc530f46e07e5167c80e04b399eccb3ded421be7
MD5 158ad9c0b4c8c4017a68c9521bc6e45b
BLAKE2b-256 a70b73b78380605810b7860e4c41553937e6b8855d2e3afa916d765819c28dd3

See more details on using hashes here.

File details

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

File metadata

  • Download URL: asap_protocol-2.4.0-py3-none-any.whl
  • Upload date:
  • Size: 397.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.4.0-py3-none-any.whl
Algorithm Hash digest
SHA256 c58bb6a5a62a0ece1ff472a03d83b2906981a50fc5c7fb3aeeda2a7f3cc6aec8
MD5 3194a06f2dc8d67228f05c1763ca4144
BLAKE2b-256 7af9237605a5b4dc42ce74b99c38a6bc7f53dc890cc7cee553c7c0ef524dcdc8

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