A2A agent framework in one import.
Project description
a2akit
A2A agent framework in one import.
Build Agent-to-Agent (A2A) protocol agents with minimal boilerplate. Streaming, cancellation, multi-turn conversations, and artifact handling — batteries included.
Install
pip install a2akit
Quick Start
from a2akit import A2AServer, AgentCardConfig, TaskContext, Worker
class EchoWorker(Worker):
async def handle(self, ctx: TaskContext) -> None:
await ctx.complete(f"Echo: {ctx.user_text}")
server = A2AServer(
worker=EchoWorker(),
agent_card=AgentCardConfig(
name="Echo Agent",
description="Echoes your input back.",
version="0.1.0",
),
)
app = server.as_fastapi_app()
Run it:
uvicorn my_agent:app --reload
Test it:
curl -X POST http://localhost:8000/v1/message:send \
-H "Content-Type: application/json" \
-d '{"message":{"role":"user","parts":[{"text":"hello"}],"messageId":"1"}}'
Features
- One-liner setup —
A2AServerwires storage, broker, event bus, and endpoints - Streaming — word-by-word artifact streaming via SSE
- Cancellation — cooperative and force-cancel with timeout fallback
- Multi-turn —
request_input()/request_auth()for conversational flows - Direct reply —
reply_directly()for simple request/response without task tracking - Pluggable backends — swap in Redis, PostgreSQL, RabbitMQ (coming soon)
- Type-safe — full type hints,
py.typedmarker, PEP 561 compliant
A2A Protocol Version
a2akit implements A2A v0.3.0.
Roadmap
Planned features for upcoming releases. Priorities may shift based on feedback.
| Feature | Target |
|---|---|
| Task middleware / hooks | v0.1.0 |
| Lifecycle hooks + dependency injection | v0.1.0 |
| Documentation website | v0.1.0 |
| Redis EventBus | v0.2.0 |
| Redis Broker | v0.2.0 |
| PostgreSQL Storage | v0.2.0 |
| SQLite Storage | v0.2.0 |
| Backend conformance test suite | v0.2.0 |
| OpenTelemetry integration | v0.2.0 |
| RabbitMQ Broker | v0.3.0+ |
| JSON-RPC transport | v0.3.0+ |
| gRPC transport | v0.4.0+ |
This roadmap is subject to change.
License
MIT
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file a2akit-0.0.1.tar.gz.
File metadata
- Download URL: a2akit-0.0.1.tar.gz
- Upload date:
- Size: 161.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1bbf1517163b22d5cd79152c147eddcdbad3c230d400c42d74a98733a07b3204
|
|
| MD5 |
8fc54fe5178d45e45c9e7ecd6711465a
|
|
| BLAKE2b-256 |
69b3954b938d74310d4ef9d4b89c7eb331cb3673157160795fe182b92cb7962f
|
Provenance
The following attestation bundles were made for a2akit-0.0.1.tar.gz:
Publisher:
publish.yml on Coding-Crashkurse/a2a-kit
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
a2akit-0.0.1.tar.gz -
Subject digest:
1bbf1517163b22d5cd79152c147eddcdbad3c230d400c42d74a98733a07b3204 - Sigstore transparency entry: 1006428445
- Sigstore integration time:
-
Permalink:
Coding-Crashkurse/a2a-kit@67b303b4611e974e6f0a415fb4bf0cfab7db5c3d -
Branch / Tag:
refs/tags/v0.0.1 - Owner: https://github.com/Coding-Crashkurse
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@67b303b4611e974e6f0a415fb4bf0cfab7db5c3d -
Trigger Event:
push
-
Statement type:
File details
Details for the file a2akit-0.0.1-py3-none-any.whl.
File metadata
- Download URL: a2akit-0.0.1-py3-none-any.whl
- Upload date:
- Size: 42.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
beb818a073dda344a3978ce3b5c8f1ca652a4c14cfe56ab9960eb2adf4e7fd47
|
|
| MD5 |
b27a65c9a440200b6ce275ba1de11ae1
|
|
| BLAKE2b-256 |
75fe14be7619a16f32c88d31975d80b22f77d7d89e2024d09ad46eaa4f06ae82
|
Provenance
The following attestation bundles were made for a2akit-0.0.1-py3-none-any.whl:
Publisher:
publish.yml on Coding-Crashkurse/a2a-kit
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
a2akit-0.0.1-py3-none-any.whl -
Subject digest:
beb818a073dda344a3978ce3b5c8f1ca652a4c14cfe56ab9960eb2adf4e7fd47 - Sigstore transparency entry: 1006428446
- Sigstore integration time:
-
Permalink:
Coding-Crashkurse/a2a-kit@67b303b4611e974e6f0a415fb4bf0cfab7db5c3d -
Branch / Tag:
refs/tags/v0.0.1 - Owner: https://github.com/Coding-Crashkurse
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@67b303b4611e974e6f0a415fb4bf0cfab7db5c3d -
Trigger Event:
push
-
Statement type: