Skip to main content

Production-friendly helpers for exposing agents as A2A servers and consuming them through the official A2A SDK.

Project description

a2a-wrapper

a2a-wrapper is a lightweight helper layer for exposing custom agents as A2A servers and consuming A2A agents through the official Python a2a-sdk.

It is designed for teams who want a faster path from agent logic to an A2A-compatible service without rewriting the same request parsing, task response, and client plumbing every time.

What it includes

  • src/a2a_wrapper/
    • installable package with client and server APIs
  • examples/
    • ready-to-run LangChain and CrewAI sample servers
  • tests/
    • helper tests and an optional end-to-end smoke test

Install

Base install:

pip install -e .

Optional extras:

pip install -e .[langchain]
pip install -e .[crewai]
pip install -e .[dev]

Quick example

from a2a_wrapper import (
    AgentCapability,
    AgentRequest,
    AgentServerConfig,
    ResponseContext,
    create_agent_server,
)


async def handler(request: AgentRequest, responder: ResponseContext) -> None:
    await responder.complete(f"Echo: {request.user_text}")


server = create_agent_server(
    config=AgentServerConfig(
        name="Echo Agent",
        description="Simple echo agent",
        host="0.0.0.0",
        port=10002,
    ),
    capabilities=[
        AgentCapability(
            capability_id="echo",
            name="Echo",
            description="Echoes user input",
        )
    ],
    handler=handler,
)

server.run()

Client example

import asyncio

from a2a_wrapper import AgentClient


async def main():
    async with AgentClient("http://localhost:10002") as client:
        reply = await client.send("Hello")
        print(reply.text)


asyncio.run(main())

Examples

See examples/README.md for exact run steps.

Docs

See DOCS.md for detailed LangChain, CrewAI, server, and client walkthroughs.

Testing

Run:

pytest

Notes:

  • unit tests work without a live A2A server
  • the smoke test runs only when a2a-sdk is installed and importable

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

a2a_wrapper-0.2.0.tar.gz (12.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

a2a_wrapper-0.2.0-py3-none-any.whl (11.7 kB view details)

Uploaded Python 3

File details

Details for the file a2a_wrapper-0.2.0.tar.gz.

File metadata

  • Download URL: a2a_wrapper-0.2.0.tar.gz
  • Upload date:
  • Size: 12.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for a2a_wrapper-0.2.0.tar.gz
Algorithm Hash digest
SHA256 f47a60d80c5aa8425bfc85553c25276788f8b555bb86c15d0f37d297cb47d32e
MD5 03cbada36f865106fcb2115e2c62b8ba
BLAKE2b-256 417c82750da44273d2dd3cdd52fa5e228a30e716161dc93ab0e7a74e768d9e07

See more details on using hashes here.

Provenance

The following attestation bundles were made for a2a_wrapper-0.2.0.tar.gz:

Publisher: publish.yml on Abhitheshek/a2a-wrapper

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file a2a_wrapper-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: a2a_wrapper-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 11.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for a2a_wrapper-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 b6c72d204b4cdbc435b56e787705f5473a6969d6df618f90ae1f5bacd28cf97a
MD5 26844dbce5859d5969e7ccfe6fc7cd67
BLAKE2b-256 1391cc493042feb5ce0edcc88c3683cee308fe7da45fb37b96f29afc3dac796d

See more details on using hashes here.

Provenance

The following attestation bundles were made for a2a_wrapper-0.2.0-py3-none-any.whl:

Publisher: publish.yml on Abhitheshek/a2a-wrapper

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page