Catalog PyPI
PACKAGE EXPLORERView in registry

a2claude

PyPI

Run Claude Code as an A2A protocol agent server.

a2aagentagent2agentclaude-code
Versions collected1
Direct dependencies6From release 0.3.0
Last observed20 Oct, 16:31 UTC

README

Version 0.3.0 documentation
a2claude

a2claude

Run Claude Code as an A2A agent server. Other agents call it over the protocol; it drives a real Claude Code session in your project and streams the work back as it happens.

CI License: Apache 2.0 Python 3.13+ Protocol: A2A 1.0

a2claude streaming a task, then pausing on a permission prompt

Most adapters that put a coding agent behind A2A flatten everything to text in, text out. a2claude keeps the structure Claude Code produces: the tools it runs, the files it changes, what it costs, and how to continue on the next turn.

How it maps to A2A

Claude Code producesA2A surface it lands on
Assistant textA streamed artifact (append / last_chunk)
A tool call (Bash, Edit)A working status update for the action
A file editA named artifact carrying the diff
Run resultCost, turns, and usage on the completion message
Session idMapped to the A2A contextId so follow-ups resume

The mapping is all in executor.py. Backends only emit normalized events; they never touch the protocol.

Where this fits

Anthropic now ships its own ways to run Claude Code beyond the terminal: Claude Code on the web, background agents, cloud-hosted Routines, and the Managed Agents API. These are the right choices when you want Anthropic to host the run and you live in their ecosystem, and they are typically tied to Anthropic infrastructure and a GitHub-centric flow.

a2claude solves a different problem: making Claude Code a first-class peer on a vendor-neutral A2A mesh. An orchestrator built on any framework discovers it through its agent card and delegates coding work to it the same way it would to any other A2A agent. The run happens on infrastructure you control, in a workspace you point it at. Reach for a2claude when:

  • another agent (not a human at a prompt) is the caller, and it speaks A2A;
  • you want the run on your own infrastructure and data boundary, not a vendor VM;
  • you are wiring Claude Code into a multi-vendor agent system rather than standardizing on one vendor's hosted stack.

The practical user is the platform team building that mesh, not the individual developer; the developer reaches it through whatever orchestrator the team puts in front of them.

Requirements

  • Python 3.13+
  • uv
  • Claude Code CLI on PATH (only for the claude backend)

Quick start

Install:

uv sync

The echo backend needs no API key and no Claude install, so you can exercise the whole path offline first:

uv run a2claude serve --backend echo &
# once the "Uvicorn running" line appears:
uv run a2claude call "fix the failing test"
task 189b1c63-1a7b-4908-87c4-c8f3bba8f6b5
context 0b2a901e-2b6f-4c56-bba2-d0da546936e9

  · Echo
fix the failing test
[completed] $0.0 · 1 turns

Then point it at a real project:

uv run a2claude serve --backend claude --cwd /path/to/project
uv run a2claude call "add a /health endpoint" --url http://localhost:9100/

Continue the same conversation by passing the context from a previous turn:

uv run a2claude call "now add a test for it" --context <context-id>

Commands

CommandDescription
a2claude serveStart the A2A server
a2claude call TEXTSend a message and print the streamed events
a2claude cardFetch and print the agent card

The agent card is served at /.well-known/agent-card.json and advertises Claude Code's abilities as discrete skills (generation, refactor, debug, review, test, explain).

Backends

A backend turns a prompt into a stream of normalized events. Two ship today:

  • echo: no dependencies, mirrors the input. For wiring checks and tests.
  • claude: drives Claude Code through the Claude Agent SDK.

The split keeps the A2A layer independent of how Claude Code is invoked, so a raw-CLI backend can be added later without touching the server or the protocol mapping.

Authentication

The claude backend uses whatever the Claude CLI is configured with. When the server answers on behalf of other agents, that has to be an Anthropic API key (or Bedrock / Vertex). Anthropic does not permit subscription credentials for third-party serving. Set a per-run cost ceiling with --max-budget-usd.

Signed agent cards

A caller that discovers this server only has the agent card to go on. Sign it so the caller can confirm the card came from you and was not swapped in transit:

uv run a2claude serve --sign-key card-signing.pem --sign-kid my-key-1 --sign-alg ES256

The card is then served with a JWS signature over its canonical form. --sign-key is a path to a file holding the key: a PEM private key for asymmetric algorithms (ES256, RS256), or a shared secret for HS256. --sign-kid is the key id a verifier uses to look up the matching public key. Unsigned is still the default.

Caller authentication

A signed card proves who the server is; this proves the caller is allowed in. Require a bearer token and the server rejects any task request that does not carry it:

uv run a2claude serve --auth-token-file caller-token.txt

When --auth-token-file is set, callers must send Authorization: Bearer <token>; a request without a valid token gets 401 Unauthorized. The agent card stays public so a caller can still fetch it to discover the requirement, and the card advertises the bearer scheme in securitySchemes. Without the flag the server stays open, as before.

A2A keeps the credential at the HTTP layer, so this composes with whatever your gateway already does: terminate TLS, validate OAuth, or rate-limit in front, and let the server enforce the token behind it.

Permissions

A tool that needs approval pauses the task in the A2A input-required state instead of being skipped. The caller answers with a follow-up message on the same task:

uv run a2claude call "sudo reboot"
# ... [input-required] Permission requested for Bash: $ sudo reboot
#       reply: a2claude call "allow" --task <id> --context <id>
uv run a2claude call "allow" --task <id> --context <id>

allow (or yes, approve, ok) approves; anything else denies. The Claude session stays alive across the pause, so it resumes exactly where it stopped.

The server does not inherit your personal Claude settings, so it has no pre-approved tool allowlist; every tool that needs approval routes through the caller. Read-only actions Claude already treats as safe still run without a prompt.

Long-running tasks

The agent card advertises push notifications. A caller can register a webhook for a task and receive status and artifact updates by HTTP POST instead of holding a stream open, which helps when a run takes minutes. Streaming and polling (tasks/get) both work too.

Observability

Debugging one agent is hard; debugging a chain of them without traces is worse. Because A2A runs over HTTP, it drops straight into OpenTelemetry: install the extra and the A2A SDK's instrumentation plus a per-task a2claude.execute span light up, with W3C trace context propagating across the call so client and server spans share one trace.

uv sync --extra telemetry

Tracing is off unless OpenTelemetry is installed, and you configure the exporter the standard way (e.g. OTEL_EXPORTER_OTLP_ENDPOINT, or run under opentelemetry-instrument). It works against an on-prem or air-gapped collector, so traces never have to leave your network.

Development

uv sync --dev
uv run ruff check src tests
uv run ruff format src tests
uv run mypy
uv run pytest

CI runs these on Python 3.13 and 3.14, plus a Markdown lint, on every push and pull request.

Releasing

Pushing a v* tag builds the package, creates a GitHub release with the artifacts, and publishes to PyPI via trusted publishing:

git tag v0.1.0
git push origin v0.1.0

Status

The mapping is complete end to end and verified against real Claude: text round trip, tool-progress updates, streaming artifacts, file diffs as artifacts, run metadata, session continuity, the permission-to-input-required round trip, and push notifications. The offline echo backend covers every path including permissions, so it can all be exercised without an API key.

License

Apache 2.0. See LICENSE.

Downloads & popularity

5downloads
1-day window · source-reported counts20 Oct 2026
54270
2026-07-23: 6 · observed 2026-10-21T10:37:12.5400634Z · period 2026-07-23–2026-07-232026-07-26: 1 · observed 2026-10-21T10:37:12.5400634Z · period 2026-07-26–2026-07-262026-07-27: 2 · observed 2026-10-21T10:37:12.5400634Z · period 2026-07-27–2026-07-272026-07-29: 14 · observed 2026-10-21T10:37:12.5400634Z · period 2026-07-29–2026-07-292026-07-31: 1 · observed 2026-10-21T10:37:12.5400634Z · period 2026-07-31–2026-07-312026-08-01: 1 · observed 2026-10-21T10:37:12.5400634Z · period 2026-08-01–2026-08-012026-08-02: 3 · observed 2026-10-21T10:37:12.5400634Z · period 2026-08-02–2026-08-022026-08-03: 18 · observed 2026-10-21T10:37:12.5400634Z · period 2026-08-03–2026-08-032026-08-04: 6 · observed 2026-10-21T10:37:12.5400634Z · period 2026-08-04–2026-08-042026-08-06: 1 · observed 2026-10-21T10:37:12.5400634Z · period 2026-08-06–2026-08-062026-08-08: 1 · observed 2026-10-21T10:37:12.5400634Z · period 2026-08-08–2026-08-082026-08-09: 3 · observed 2026-10-21T10:37:12.5400634Z · period 2026-08-09–2026-08-092026-08-13: 2 · observed 2026-10-21T10:37:12.5400634Z · period 2026-08-13–2026-08-132026-08-14: 7 · observed 2026-10-21T10:37:12.5400634Z · period 2026-08-14–2026-08-142026-08-15: 1 · observed 2026-10-21T10:37:12.5400634Z · period 2026-08-15–2026-08-152026-08-17: 8 · observed 2026-10-21T10:37:12.5400634Z · period 2026-08-17–2026-08-172026-08-18: 54 · observed 2026-10-21T10:37:12.5400634Z · period 2026-08-18–2026-08-182026-08-19: 2 · observed 2026-10-21T10:37:12.5400634Z · period 2026-08-19–2026-08-192026-08-20: 2 · observed 2026-10-21T10:37:12.5400634Z · period 2026-08-20–2026-08-202026-08-21: 2 · observed 2026-10-21T10:37:12.5400634Z · period 2026-08-21–2026-08-212026-08-22: 9 · observed 2026-10-21T10:37:12.5400634Z · period 2026-08-22–2026-08-222026-08-23: 1 · observed 2026-10-21T10:37:12.5400634Z · period 2026-08-23–2026-08-232026-08-24: 11 · observed 2026-10-21T10:37:12.5400634Z · period 2026-08-24–2026-08-242026-08-25: 8 · observed 2026-10-21T10:37:12.5400634Z · period 2026-08-25–2026-08-252026-08-28: 1 · observed 2026-10-21T10:37:12.5400634Z · period 2026-08-28–2026-08-282026-08-30: 2 · observed 2026-10-21T10:37:12.5400634Z · period 2026-08-30–2026-08-302026-08-31: 4 · observed 2026-10-21T10:37:12.5400634Z · period 2026-08-31–2026-08-312026-09-01: 2 · observed 2026-10-21T10:37:12.5400634Z · period 2026-09-01–2026-09-012026-09-02: 2 · observed 2026-10-21T10:37:12.5400634Z · period 2026-09-02–2026-09-022026-09-03: 1 · observed 2026-10-21T10:37:12.5400634Z · period 2026-09-03–2026-09-032026-09-04: 1 · observed 2026-10-21T10:37:12.5400634Z · period 2026-09-04–2026-09-042026-09-05: 6 · observed 2026-10-21T10:37:12.5400634Z · period 2026-09-05–2026-09-052026-09-07: 6 · observed 2026-10-21T10:37:12.5400634Z · period 2026-09-07–2026-09-072026-09-09: 4 · observed 2026-10-21T10:37:12.5400634Z · period 2026-09-09–2026-09-092026-09-10: 1 · observed 2026-10-21T10:37:12.5400634Z · period 2026-09-10–2026-09-102026-09-11: 2 · observed 2026-10-21T10:37:12.5400634Z · period 2026-09-11–2026-09-112026-09-12: 7 · observed 2026-10-21T10:37:12.5400634Z · period 2026-09-12–2026-09-122026-09-13: 3 · observed 2026-10-21T10:37:12.5400634Z · period 2026-09-13–2026-09-132026-09-15: 7 · observed 2026-10-21T10:37:12.5400634Z · period 2026-09-15–2026-09-152026-09-16: 1 · observed 2026-10-21T10:37:12.5400634Z · period 2026-09-16–2026-09-162026-09-18: 6 · observed 2026-10-21T10:37:12.5400634Z · period 2026-09-18–2026-09-182026-09-20: 2 · observed 2026-10-21T10:37:12.5400634Z · period 2026-09-20–2026-09-202026-09-21: 2 · observed 2026-10-21T10:37:12.5400634Z · period 2026-09-21–2026-09-212026-09-22: 4 · observed 2026-10-21T10:37:12.5400634Z · period 2026-09-22–2026-09-222026-09-23: 2 · observed 2026-10-21T10:37:12.5400634Z · period 2026-09-23–2026-09-232026-09-24: 2 · observed 2026-10-21T10:37:12.5400634Z · period 2026-09-24–2026-09-242026-09-25: 4 · observed 2026-10-21T10:37:12.5400634Z · period 2026-09-25–2026-09-252026-09-26: 7 · observed 2026-10-21T10:37:12.5400634Z · period 2026-09-26–2026-09-262026-09-27: 1 · observed 2026-10-21T10:37:12.5400634Z · period 2026-09-27–2026-09-272026-09-28: 5 · observed 2026-10-21T10:37:12.5400634Z · period 2026-09-28–2026-09-282026-09-29: 3 · observed 2026-10-21T10:37:12.5400634Z · period 2026-09-29–2026-09-292026-09-30: 5 · observed 2026-10-21T10:37:12.5400634Z · period 2026-09-30–2026-09-302026-10-01: 1 · observed 2026-10-21T10:37:12.5400634Z · period 2026-10-01–2026-10-012026-10-02: 3 · observed 2026-10-21T10:37:12.5400634Z · period 2026-10-02–2026-10-022026-10-03: 1 · observed 2026-10-21T10:37:12.5400634Z · period 2026-10-03–2026-10-032026-10-05: 4 · observed 2026-10-21T10:37:12.5400634Z · period 2026-10-05–2026-10-052026-10-06: 4 · observed 2026-10-21T10:37:12.5400634Z · period 2026-10-06–2026-10-062026-10-07: 3 · observed 2026-10-21T10:37:12.5400634Z · period 2026-10-07–2026-10-072026-10-08: 8 · observed 2026-10-21T10:37:12.5400634Z · period 2026-10-08–2026-10-082026-10-09: 4 · observed 2026-10-21T10:37:12.5400634Z · period 2026-10-09–2026-10-092026-10-10: 6 · observed 2026-10-21T10:37:12.5400634Z · period 2026-10-10–2026-10-102026-10-11: 3 · observed 2026-10-21T10:37:12.5400634Z · period 2026-10-11–2026-10-112026-10-12: 3 · observed 2026-10-21T10:37:12.5400634Z · period 2026-10-12–2026-10-122026-10-13: 3 · observed 2026-10-21T10:37:12.5400634Z · period 2026-10-13–2026-10-132026-10-14: 3 · observed 2026-10-21T10:37:12.5400634Z · period 2026-10-14–2026-10-142026-10-15: 11 · observed 2026-10-21T10:37:12.5400634Z · period 2026-10-15–2026-10-152026-10-17: 27 · observed 2026-10-21T10:37:12.5400634Z · period 2026-10-17–2026-10-172026-10-18: 8 · observed 2026-10-21T10:37:12.5400634Z · period 2026-10-18–2026-10-182026-10-19: 8 · observed 2026-10-21T10:37:12.5400634Z · period 2026-10-19–2026-10-192026-10-20: 5 · observed 2026-10-21T10:37:12.5400634Z · period 2026-10-20–2026-10-20
23 Jul20 Oct

pypistats · 70 observations shown. Missing days are unknown. Source category: overall: without mirrors.

View observed values
Date / source periodValueObserved at
2026-10-20 – 2026-10-2052026-10-21T10:37:12.5400634Z
2026-10-19 – 2026-10-1982026-10-21T10:37:12.5400634Z
2026-10-18 – 2026-10-1882026-10-21T10:37:12.5400634Z
2026-10-17 – 2026-10-17272026-10-21T10:37:12.5400634Z
2026-10-15 – 2026-10-15112026-10-21T10:37:12.5400634Z
2026-10-14 – 2026-10-1432026-10-21T10:37:12.5400634Z
2026-10-13 – 2026-10-1332026-10-21T10:37:12.5400634Z
2026-10-12 – 2026-10-1232026-10-21T10:37:12.5400634Z
2026-10-11 – 2026-10-1132026-10-21T10:37:12.5400634Z
2026-10-10 – 2026-10-1062026-10-21T10:37:12.5400634Z
2026-10-09 – 2026-10-0942026-10-21T10:37:12.5400634Z
2026-10-08 – 2026-10-0882026-10-21T10:37:12.5400634Z
2026-10-07 – 2026-10-0732026-10-21T10:37:12.5400634Z
2026-10-06 – 2026-10-0642026-10-21T10:37:12.5400634Z
2026-10-05 – 2026-10-0542026-10-21T10:37:12.5400634Z
2026-10-03 – 2026-10-0312026-10-21T10:37:12.5400634Z
2026-10-02 – 2026-10-0232026-10-21T10:37:12.5400634Z
2026-10-01 – 2026-10-0112026-10-21T10:37:12.5400634Z
2026-09-30 – 2026-09-3052026-10-21T10:37:12.5400634Z
2026-09-29 – 2026-09-2932026-10-21T10:37:12.5400634Z
2026-09-28 – 2026-09-2852026-10-21T10:37:12.5400634Z
2026-09-27 – 2026-09-2712026-10-21T10:37:12.5400634Z
2026-09-26 – 2026-09-2672026-10-21T10:37:12.5400634Z
2026-09-25 – 2026-09-2542026-10-21T10:37:12.5400634Z
2026-09-24 – 2026-09-2422026-10-21T10:37:12.5400634Z
2026-09-23 – 2026-09-2322026-10-21T10:37:12.5400634Z
2026-09-22 – 2026-09-2242026-10-21T10:37:12.5400634Z
2026-09-21 – 2026-09-2122026-10-21T10:37:12.5400634Z
2026-09-20 – 2026-09-2022026-10-21T10:37:12.5400634Z
2026-09-18 – 2026-09-1862026-10-21T10:37:12.5400634Z
2026-09-16 – 2026-09-1612026-10-21T10:37:12.5400634Z
2026-09-15 – 2026-09-1572026-10-21T10:37:12.5400634Z
2026-09-13 – 2026-09-1332026-10-21T10:37:12.5400634Z
2026-09-12 – 2026-09-1272026-10-21T10:37:12.5400634Z
2026-09-11 – 2026-09-1122026-10-21T10:37:12.5400634Z
2026-09-10 – 2026-09-1012026-10-21T10:37:12.5400634Z
2026-09-09 – 2026-09-0942026-10-21T10:37:12.5400634Z
2026-09-07 – 2026-09-0762026-10-21T10:37:12.5400634Z
2026-09-05 – 2026-09-0562026-10-21T10:37:12.5400634Z
2026-09-04 – 2026-09-0412026-10-21T10:37:12.5400634Z
2026-09-03 – 2026-09-0312026-10-21T10:37:12.5400634Z
2026-09-02 – 2026-09-0222026-10-21T10:37:12.5400634Z
2026-09-01 – 2026-09-0122026-10-21T10:37:12.5400634Z
2026-08-31 – 2026-08-3142026-10-21T10:37:12.5400634Z
2026-08-30 – 2026-08-3022026-10-21T10:37:12.5400634Z
2026-08-28 – 2026-08-2812026-10-21T10:37:12.5400634Z
2026-08-25 – 2026-08-2582026-10-21T10:37:12.5400634Z
2026-08-24 – 2026-08-24112026-10-21T10:37:12.5400634Z
2026-08-23 – 2026-08-2312026-10-21T10:37:12.5400634Z
2026-08-22 – 2026-08-2292026-10-21T10:37:12.5400634Z
2026-08-21 – 2026-08-2122026-10-21T10:37:12.5400634Z
2026-08-20 – 2026-08-2022026-10-21T10:37:12.5400634Z
2026-08-19 – 2026-08-1922026-10-21T10:37:12.5400634Z
2026-08-18 – 2026-08-18542026-10-21T10:37:12.5400634Z
2026-08-17 – 2026-08-1782026-10-21T10:37:12.5400634Z
2026-08-15 – 2026-08-1512026-10-21T10:37:12.5400634Z
2026-08-14 – 2026-08-1472026-10-21T10:37:12.5400634Z
2026-08-13 – 2026-08-1322026-10-21T10:37:12.5400634Z
2026-08-09 – 2026-08-0932026-10-21T10:37:12.5400634Z
2026-08-08 – 2026-08-0812026-10-21T10:37:12.5400634Z
2026-08-06 – 2026-08-0612026-10-21T10:37:12.5400634Z
2026-08-04 – 2026-08-0462026-10-21T10:37:12.5400634Z
2026-08-03 – 2026-08-03182026-10-21T10:37:12.5400634Z
2026-08-02 – 2026-08-0232026-10-21T10:37:12.5400634Z
2026-08-01 – 2026-08-0112026-10-21T10:37:12.5400634Z
2026-07-31 – 2026-07-3112026-10-21T10:37:12.5400634Z
2026-07-29 – 2026-07-29142026-10-21T10:37:12.5400634Z
2026-07-27 – 2026-07-2722026-10-21T10:37:12.5400634Z
2026-07-26 – 2026-07-2612026-10-21T10:37:12.5400634Z
2026-07-23 – 2026-07-2362026-10-21T10:37:12.5400634Z

Versions 1

Collected releases
VersionPublishedDirect dependenciesOpen version
0.3.026 Jun 20266

Package advisories

0
No matching advisories collected

This describes our collected data; it is not a security assessment.

Repository

PENDING
kanywst/a2claude

Shared repository data · GitHub

License detected in repository
Not collected

Metadata history

Meaningful changes
Current collected state Current

Observed since 20 Oct, 16:31 UTC

No superseded metadata states collected. Unchanged observations do not create new revisions.

Record identity

package:2840a64b6d8876eb6e821c484af1c2cb8b19929c04d27fbec65f2a0f8aea7872