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
With optional LangGraph support:
pip install a2akit[langgraph]
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()
uvicorn my_agent:app --reload
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 - Middleware — pipeline for auth extraction, header injection, payload sanitization
- Lifecycle hooks — fire-and-forget callbacks on terminal state transitions
- Dependency injection — shared infrastructure with automatic lifecycle management
- Pluggable backends — PostgreSQL, SQLite, and more (Redis, RabbitMQ coming soon)
- Type-safe — full type hints,
py.typedmarker, PEP 561 compliant
Links
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.4.tar.gz.
File metadata
- Download URL: a2akit-0.0.4.tar.gz
- Upload date:
- Size: 249.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
39bc02cf6e31ea4e0364d46d670cc3d0ebbcd8c09a164f96cbd50417c0f12b5f
|
|
| MD5 |
a095c17d82a7a147509001a485b3e8e0
|
|
| BLAKE2b-256 |
7ac204e347129a36ee7b7e582032ea9ddf02058f7b2809d4795d60d5da2b4439
|
Provenance
The following attestation bundles were made for a2akit-0.0.4.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.4.tar.gz -
Subject digest:
39bc02cf6e31ea4e0364d46d670cc3d0ebbcd8c09a164f96cbd50417c0f12b5f - Sigstore transparency entry: 1056129049
- Sigstore integration time:
-
Permalink:
Coding-Crashkurse/a2a-kit@ccb20a05f4a197a2de7fb6474fe0df773ae8edc5 -
Branch / Tag:
refs/tags/v0.0.4 - Owner: https://github.com/Coding-Crashkurse
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@ccb20a05f4a197a2de7fb6474fe0df773ae8edc5 -
Trigger Event:
push
-
Statement type:
File details
Details for the file a2akit-0.0.4-py3-none-any.whl.
File metadata
- Download URL: a2akit-0.0.4-py3-none-any.whl
- Upload date:
- Size: 57.0 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 |
ac76443d9d9743a88e4fcb07d4ea0ab78732f24954d5429d0887f917a4ff92c9
|
|
| MD5 |
f0058dbef2ecb9d421fc6b38cd3e4cda
|
|
| BLAKE2b-256 |
88c302c99be8bf20a8175e1f4eff0c8ecd1732e72ae7ef8cb1348c94f66bb4df
|
Provenance
The following attestation bundles were made for a2akit-0.0.4-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.4-py3-none-any.whl -
Subject digest:
ac76443d9d9743a88e4fcb07d4ea0ab78732f24954d5429d0887f917a4ff92c9 - Sigstore transparency entry: 1056129050
- Sigstore integration time:
-
Permalink:
Coding-Crashkurse/a2a-kit@ccb20a05f4a197a2de7fb6474fe0df773ae8edc5 -
Branch / Tag:
refs/tags/v0.0.4 - Owner: https://github.com/Coding-Crashkurse
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@ccb20a05f4a197a2de7fb6474fe0df773ae8edc5 -
Trigger Event:
push
-
Statement type: