Agntcy Application SDK for Python
Project description
The Agntcy Application SDK offers a unified, interoperable factory for constructing multi-agent components as part of the emerging internet of agents. The SDK factory will provide a single interface to interact with Agntcy components such as SLIM, Observe-SDK, and Identity, while enabling interoperability with agentic protocols such as A2A and MCP.
✅ A2A over SLIM ✅ A2A over NATS 🕐 A2A over MQTT ✅ Request-reply ✅ Publish-subscribe ✅ Broadcast ✅ MCP client factory 🕐 Observability provider 🕐 Identity provider
Quick Start
Install the SDK via pip:
pip install agntcy-app-sdk
Or install from source:
git clone https://github.com/agntcy/app-sdk.git
pip install -e app-sdk
A2A Server: Create an A2A server bridge with a SLIM | NATS transport.
A2A Client: Create an A2A client with a SLIM | NATS transport.
MCP Client: Create an MCP client default streamable-http transport.
A2A Server with Transport Example
from a2a.server.apps import A2AStarletteApplication
from agntcy_app_sdk.factory import AgntcyFactory
# bring your own agent card and request handler
server = A2AStarletteApplication(
agent_card=agent_card, http_handler=request_handler
)
factory = AgntcyFactory()
transport = factory.create_transport("SLIM", "http://localhost:46357")
bridge = factory.create_bridge(server, transport=transport)
await bridge.start()
A2A Client with Transport Example
from agntcy_app_sdk.factory import AgntcyFactory
from agntcy_app_sdk.factory import ProtocolTypes
factory = AgntcyFactory()
transport = factory.create_transport("NATS", "localhost:4222")
# connect via agent URL
client_over_nats = await factory.create_client("A2A", agent_url="http://localhost:9999", transport=transport)
# or connect via agent topic
client_over_nats = await factory.create_client(ProtocolTypes.A2A.value, agent_topic="Hello_World_Agent_1.0.0", transport=transport)
MCP Client from Factory Example
from agntcy_app_sdk.factory import AgntcyFactory
# Create factory and transport
factory = AgntcyFactory()
transport_instance = factory.create_transport(
transport="STREAMABLE_HTTP", endpoint="http://localhost:8123/mcp"
)
# Create MCP client
client = await factory.create_client(
"MCP",
agent_url=endpoint,
transport=transport_instance,
)
For more details and exhaustive capabilities, see the Usage Guide.
Reference Apps
For fully functional distributed multi-agent examples, check out our coffeeAgntcy!
Testing
The /tests directory contains e2e tests for the factory, including A2A client and various transports.
Prerequisites
Run the required message bus services:
docker-compose -f infra/docker/docker-compose.yaml up
✅ Test the factory with A2A client and all available transports
Run the parameterized e2e test for the A2A client across all transports:
uv run pytest tests/e2e/test_a2a.py::test_client -s
Or run a single transport test:
uv run pytest tests/e2e/test_a2a.py::test_client -s -k "SLIM"
Contributing
Contributions are welcome! Please see the contribution guide for details on how to contribute to the Agntcy Application SDK.
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 agntcy_app_sdk-0.1.1.tar.gz.
File metadata
- Download URL: agntcy_app_sdk-0.1.1.tar.gz
- Upload date:
- Size: 300.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8a0a7cfd34dfa89bf4fe2253ad48ed1c7d55568d50817878d4cca83d356dc2c1
|
|
| MD5 |
10fd8c9f956c36be0faf8b2c4cf7a2a1
|
|
| BLAKE2b-256 |
b081b85b41abe496cf597cb8380240cffe15a74066e878c4a12ccdbd3c8a71fb
|
File details
Details for the file agntcy_app_sdk-0.1.1-py3-none-any.whl.
File metadata
- Download URL: agntcy_app_sdk-0.1.1-py3-none-any.whl
- Upload date:
- Size: 29.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
27bbd7e1370ec70fd04d4c2f5ad5095d5ae89aa0c40f851edea55bc791e09071
|
|
| MD5 |
5a630f583d961ef674d7e89e8fb0182c
|
|
| BLAKE2b-256 |
bfd408e2e9ba3a5c598edc0dc3700593bb73eb2bd3ff4e6b166df89fb5715149
|