# A2A Adapter

A Python SDK and CLI that exposes an existing AI agent, whether a CLI, a workflow engine or a Python framework, as an A2A protocol server in a few lines of code.

a2a-adapter wraps agent CLIs, local agents, workflow engines and Python agent frameworks behind the Agent-to-Agent protocol, handling agent-card generation, JSON-RPC, task lifecycle and streaming through the official A2A SDK so an adapter only needs to invoke the agent it wraps. It ships adapters for Claude Code, Codex, Pi, OpenClaw, n8n, LangGraph, LangChain, CrewAI, Ollama and Hermes Agent, alongside a callable adapter for wrapping an arbitrary Python function.

The CLI exposes an already-installed local agent from the current directory without writing any code, forwarding flags after a separator straight to the underlying agent's own CLI while the adapter keeps control of protocol- and session-level flags such as a sandbox or thinking-effort setting; the Python SDK instead embeds A2A support directly into an application or a custom Python framework wrapper.

It is written in Python and installed with pip.

Website: https://github.com/hybroai/a2a-adapter
