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: v1.4.0 | Apache 2.0 | Python 3.13+ | Documentation | PyPI | Changelog

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 integration, 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 (v1.1), Ed25519 signed manifests (v1.2), optional mTLS, replay prevention, HTTPS, rate limiting. v1.1 Security Model (trust limits, Custom Claims).
  • Economics (v1.3) — Usage metering, delegation tokens, SLA framework with breach alerts.

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

v1.4.0 showcase (Pagination on Usage & SLA history):

uv run python -m asap.examples.v1_4_0_showcase

v1.3.0 showcase (Delegation + Metering + SLA in one command):

uv run python -m asap.examples.v1_3_0_showcase

Build your first agent here — server setup, client code, step-by-step (~15 min).

15+ 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 (v1.2)

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.

Benchmarks

Benchmark Results: load (1,500+ RPS), stress, memory.

Documentation

Learn

Deep Dive

Decisions & Operations

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 (v1.2)
asap manifest sign -k key.pem manifest.json       # Sign manifest (v1.2)
asap manifest verify signed.json                  # Verify signature (v1.2)
asap manifest info signed.json                    # Show trust level (v1.2)

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:

  • v1.1: Identity Layer (OAuth2, WebSocket, Discovery) ✅
  • v1.2: Trust Layer (Signed Manifests, Compliance Harness, mTLS) ✅
  • v1.3: Economics Layer (Metering, SLAs, Delegation) ✅
  • v1.4: Resilience & Scale (Type Safety, Storage Pagination) ✅
  • v2.0: Agent Marketplace with Web App

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 Sonnet/Opus 4.5/4.6, Gemini 3.0 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-1.4.0.tar.gz (1.3 MB view details)

Uploaded Source

Built Distribution

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

asap_protocol-1.4.0-py3-none-any.whl (266.3 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: asap_protocol-1.4.0.tar.gz
  • Upload date:
  • Size: 1.3 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for asap_protocol-1.4.0.tar.gz
Algorithm Hash digest
SHA256 468482e30e11212310ccf6c370a2c92f118380620bb21da5fff0c7ded72803b1
MD5 336b826d3b45a1df73b900dd57211520
BLAKE2b-256 a85d74deec716a0e4cef5330fd98eaa86e73496c863ea6f88bc51cdca72cc34f

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for asap_protocol-1.4.0-py3-none-any.whl
Algorithm Hash digest
SHA256 3712024a8cf2dd0306f5d37e2c925a16a9ce407bec0feaa6d5f7b9d36a4af620
MD5 3326e0cf7d86cdb195fc615696ea7bc9
BLAKE2b-256 3dd193a9921e6993822a55c62bac714ef9dae529ae5daa366480bde014887578

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