A2A Adapter
Expose Python agents, frameworks, and local agent CLIs as servers that accept A2A requests.
- Source repo
- hybroai/a2a-adapter
- Stars
- ★ 108
- Last updated
- today
- License
- Apache-2.0
- Primary language
- Python
- FA score
- 73/100 · Some gaps
At a glance
- How it runs
- Works with
- Universal · cross-platformCodex · Claude Code (Partial support)
- Setup effort
- Medium · a few setup steps
- You'll need
- Typical use
- A developer with a custom Python function who wants it to receive A2A tasks can wrap it in CallableAdapter and launch it with serve_agent().
- Not a fit if
- Users who need the adapter to install or sign in to the underlying agent
- Teams unable to manage remote access settings and tokens
- Maintenance
- Commits in the last 30 dayslast commit 2026-11-20latest release v0.4.5 (2026-11-19)
- Source review
- 73/100 · Some gaps
What does this agent do, and when should you use it?
A2A Adapter is a Python 3.11+ SDK and CLI for exposing agent CLIs, local agents, workflow engines, Python frameworks, or custom functions as A2A Protocol servers. The SDK includes adapters such as ClaudeCodeAdapter, CodexAdapter, LangGraphAdapter, and CallableAdapter, and supports custom adapters through BaseA2AAdapter. Use serve_agent() to start a server or to_a2a() to mount one in an existing ASGI application; the service generates an Agent Card and handles JSON-RPC, task lifecycle, and streaming. The CLI can start local agents such as Claude Code, Codex, Pi, OpenClaw, or DeepSeek Harness, but users must install and configure those underlying agents themselves. The server binds to 127.0.0.1 by default; remote access requires configuring the bind address and an authentication token.
When a client sends an A2A task, A2A Adapter routes it through the selected adapter, which invokes the underlying agent, framework, workflow, or Python function and returns the result or supported streaming output to the A2A client. The SDK uses the official A2A SDK for Agent Card generation, JSON-RPC, and task lifecycle handling; the default Agent Card URL is /.well-known/agent-card.json. CLI adapters for Claude Code, Codex, Pi, and others can persist session state so relevant conversations resume after a server restart. Optional push notifications POST task updates to configured URLs; they are off by default, and private network targets are rejected by default.
- A developer with a custom Python function who wants it to receive A2A tasks can wrap it in CallableAdapter and launch it with serve_agent().
- A team already using LangGraph, LangChain, or CrewAI can add an A2A interface to its existing framework agent.
- A developer who needs a local Claude Code, Codex, or Pi agent to accept remote A2A requests can launch the corresponding CLI adapter.
- A team using n8n or Ollama can connect its workflow or local model service to A2A through the matching SDK adapter.
- A developer maintaining an ASGI service can mount an adapter with to_a2a() instead of starting a separate server.
Key setup facts
Pulled from the install and usage notes below. The project README has the current values.
- Install / run
pip install a2a-adapterpip install "a2a-adapter[langgraph]"uv tool install a2a-adapteruv tool install "a2a-adapter[deepseek-harness]"
- Environment variables
DEEPSEEK_API_KEYA2A_AUTH_TOKEN- Runtime
- Python 3.11+
How do you install or deploy this agent?
Python 3.11+ is required. Install the core package or select a framework extra for an SDK project:
pip install a2a-adapter
pip install "a2a-adapter[langgraph]"For the CLI, install it in an isolated tool environment:
uv tool install a2a-adapterDeepSeek Harness needs its separate extra and a DEEPSEEK_API_KEY:
uv tool install "a2a-adapter[deepseek-harness]"How do you use this agent?
Wrap a Python function and start the server from your project:
from a2a_adapter import CallableAdapter, serve_agent
async def my_agent(inputs: dict) -> str:
return f"Echo: {inputs['message']}"
adapter = CallableAdapter(func=my_agent, name="Echo Agent")
serve_agent(adapter, port=9000)The server listens locally by default. To accept remote connections, configure the host and require a token:
import os
serve_agent(adapter, host="0.0.0.0", auth_token=os.environ["A2A_AUTH_TOKEN"])To mount it in an existing ASGI application, use to_a2a(adapter).
Start an existing local agent with the CLI; first make sure it is installed, works on its own, and is signed in where required:
a2a-adapter claude --port 9010
a2a-adapter codex --port 9011Pass native agent options after --:
a2a-adapter codex --port 9011 -- --model <model> --sandbox workspace-writeWhat are this agent's strengths and limitations?
- Offers both an importable Python SDK and a CLI, for wrapping custom code or exposing an existing local agent.
- Covers multiple frameworks and targets, including LangGraph, LangChain, CrewAI, n8n, Ollama, and Python callables.
- Uses the official A2A SDK for Agent Cards, JSON-RPC, task lifecycle, and streaming, leaving adapters to invoke the underlying agent.
- Can mount in an existing ASGI application; adapters for Claude Code, Codex, and Pi also provide session persistence.
- Requires Python 3.11+; CLI use also requires the corresponding underlying agent to be installed and configured separately.
- Streaming support varies by target; the listed Codex, OpenClaw, n8n, and CrewAI adapters do not stream.
- The server binds locally by default; remote access requires users to configure a host and authentication token.
- Push notifications are off by default and private network receivers are rejected by default; DeepSeek Harness also requires a separate extra and DEEPSEEK_API_KEY.
How does this agent compare with similar options?
Compared with implementing an A2A server yourself, A2A Adapter supplies Agent Card generation, JSON-RPC, task lifecycle handling, and multiple adapters. Compared with running a local agent CLI directly, it adds an A2A server interface but does not install or configure the underlying agent for you.
Key facts side by side with the most closely related agents.
| Agent | Source review | Form / cost | Stars | Updated | Language | Full support on |
|---|---|---|---|---|---|---|
| A2A Adapter This agent | 73 · Some gaps | Library / SDK | ★ 108 | today | Python | — |
| ai4j — Java AI Agentic SDK | 60 · Some gaps | Library / SDKFree + model costs | ★ 442 | 1mo ago | Java | OpenAI API · Claude API |
| Agent2Agent (A2A) Protocol | 47 · Major gaps | Library / SDKFree | ★ 27k | 3d ago | Shell | — |
| Agent Adapter | 72 · Some gaps | Library / SDKFree + model costs | ★ 13 | 3d ago | Python | OpenAI API · Claude API |
How does FollowAgents rate this agent?
Why each dimension lost points
The server defaults to 127.0.0.1, supports bearer-token authentication for remote access, disables push notifications by default, and validates public push targets again at connection time. These show good permission and data-flow controls (least_privilege 2, data_flow_transparency 3, external_effects 2). The Agent Card is exempt from authentication and there is no request-time user confirmation. Exception text may contain URLs, paths, and tokens, though client errors are generic by default and details are logged server-side (user_confirmation 1, sensitive_data_handling 2). Dependencies have version bounds, but no comprehensive lock or vulnerability mitigation evidence is supplied; CLI process-group termination and session migration/deletion guidance provide a limited recovery path (dependency_security 1, rollback 2). README and package metadata attribute the project and specify Apache-2.0, while publisher identity remains unknown as directed (source_attribution 2).
README, SKILL, CLI, and server excerpts are broadly consistent about bind defaults, authentication, push behavior, and error handling, but the CLI excerpt ends mid-parser and does not allow verification of the full implementation (self_consistency 2). Core dependencies have version ranges and frameworks are partly optional; DeepSeek Harness requires a separate prerelease dependency, with no comprehensive availability or lock evidence shown (dependency_availability 1). Failures are generic to clients by default and logged server-side; UserFacingError and explicit opt-in raw details are documented clearly (failure_messages 3).
The documentation clearly addresses Python SDK authors and local CLI users, with framework scenarios, adapter selection, and examples (audience_and_scenarios 3, trigger_precision 3). Adapter responsibilities and some capability/platform limits are described, but the supplied sample cannot establish the complete capability matrix (capability_boundaries 2). Python 3.11+, isolated CLI installation, OS differences, environment variables, and working-directory behavior are explained; deployment and production operations remain less developed (environment_fit 2).
The README organizes SDK, CLI, security options, configuration, and documentation links clearly. Installation, upgrade, extras, and basic operation are specific (information_architecture 3, install_notes 3). Adapter names are mostly consistent, though broad compatibility claims cannot all be checked against the supplied source excerpt (naming_stability 2). Multiple examples and a decision guide are provided, with useful error guidance and concrete limitations (examples_and_faq 3, known_limitations 3). LICENSE and package metadata agree and the Apache-2.0 text is present (license 3). A version, changelog link, and release workflow exist, but changelog contents are not included (versioning_changelog 2). Author and project channels are named, but maintenance responsibility, support commitments, and identity verification are unclear (maintenance_responsibility 1).
The SDK and CLI expose several agent types through A2A and show clear value over bespoke integration (marginal_value 3). Agent Cards, error behavior, authentication, push, and state-directory guidance make outputs usable to integrators, though static material cannot establish actual result quality (output_usability 2). A short setup path and isolated CLI install reduce initial cost, while dependencies, session state, and framework extras add ongoing complexity (cost_benefit 2).
Most operational claims map to README, SKILL, package configuration, CLI, and server excerpts, but the packet is incomplete and cannot verify every adapter behavior (claim_traceability 2). README and SKILL corroborate core usage, with configuration and CI workflows as partial supporting evidence; the test excerpt contains fixtures and an E2E script requiring external CLIs and network, not evidence of execution or verified results here (cross_source_corroboration 2). The material distinguishes defaults, optional settings, error behavior, and known limits without presenting static review as runtime verification (fact_inference_separation 3).
- Before remote deployment, assess the unauthenticated Agent Card, the underlying agent's tool permissions, and token configuration; allowing private push URLs relaxes SSRF protections.
- Exception details may enter server logs. Include push receivers, persistent session directories, and underlying agent configuration in data governance.
- The packet omits full source and changelog contents and provides no dependency vulnerability review; no code or tests were executed for this assessment.
Recent releases
Latest entries from the project's GitHub Releases. Notes are quoted from upstream as written, not rewritten or tested by FollowAgents.
-
Release notes excerpt
[0.4.5](https://github.com/hybroai/a2a-adapter/compare/v0.4.4...v0.4.5) (2026-11-19) Features * langgraph: resume an interrupted graph on the client's reply ([5195aa6](https://github.com/hybroai/a2a-adapter/commit/5195aa60fcc90e38cc524787f25085ae4490c235)) Bug Fixes * langgraph: report interrupted graphs as input-required ([bc4efe7](https://github.com/hybroai/a2a-adapter/commit/bc4efe7d9baeef91d36f45dfce42ba0a466c51d7))View on GitHub ↗ -
Release notes excerpt
[0.4.4](https://github.com/hybroai/a2a-adapter/compare/v0.4.3...v0.4.4) (2026-11-16) Bug Fixes * extract LangChain messages from dictionary outputs ([5e2bc6c](https://github.com/hybroai/a2a-adapter/commit/5e2bc6cce74eb120250db11246fc9e8a6953bbd0)) * extract LangChain messages from dictionary outputs ([a60bd21](https://github.com/hybroai/a2a-adapter/commit/a60bd21b389855e3571df2652e4cc7816d417808)) * langgraph: select the final assistant reply ([2df40c9](https://github.com/hybroai/a2a-adapter/commit/2df40c9340998ee1951c50ae861c4b0bb49fef08)) …View on GitHub ↗ -
Release notes excerpt
[0.4.3](https://github.com/hybroai/a2a-adapter/compare/v0.4.2...v0.4.3) (2026-11-15) Bug Fixes * enforce stream deadlines between buffered chunks ([99c816d](https://github.com/hybroai/a2a-adapter/commit/99c816db45e368637995b9fc263c71037b71c7c1)) * enforce stream deadlines between buffered chunks ([0222f4f](https://github.com/hybroai/a2a-adapter/commit/0222f4fb901dee6eb4dff6572058d37b8d7f4a37))View on GitHub ↗
FAQ
Will the CLI install or sign me in to Claude Code or another underlying agent?
Can the server accept remote connections?
Does it support task update push notifications?
Does using it require a paid model or service?
Does the adapter persist conversation sessions?
Is A2A Adapter open source?
Is A2A Adapter safe to use?
Is A2A Adapter still maintained?
Who makes A2A Adapter?
Thanks — we use this to improve the page.