The Agntcy Application SDK offers an interoperable factory hub for constructing / instantiating multi-agent components as part of the emerging internet of agents. The SDK factory will provide a single high-level interface to interact with Agntcy components such as SLIM, Observe-SDK, and Identity, while enabling interoperability with agentic protocols such as A2A and MCP. The initial release of the Agntcy Application SDK focuses on this interoperability across agent protocols and message transports. It introduces a BaseTransport interface, with implementations for SLIM, NATS, and StreamableHTTP, and a BaseAgentProtocol interface, implemented by protocols such as A2A and MCP. These interfaces decouple protocol logic from transport, enabling flexible and extensible agent communication
β A2A over SLIM β A2A over NATS π A2A over MQTT β Request-reply β Publish-subscribe β Broadcast β MCP over SLIM β MCP over NATS β Observability provider π Identity provider
Β
Install the SDK via pip:
pip install agntcy-app-sdk
# or install via uv: uv add agntcy-app-sdkOr install from source:
git clone https://github.com/agntcy/app-sdk.git
pip install -e app-sdkNow we can list the registered protocols, transports, and observability providers in the factory:
factory = AgntcyFactory()
protocols = factory.registered_protocols()
transports = factory.registered_transports()
observability_providers = factory.registered_observability_providers()
# ['A2A', 'MCP', 'FastMCP']
# ['SLIM', 'NATS', 'STREAMABLE_HTTP']
# ['ioa_observe']Next, we can create a protocol client over a transport of choice using the factory:
MCP Client: Create an MCP client with a SLIM | NATS transport.
A2A Client: Create an A2A client with a SLIM | NATS transport.
from agntcy_app_sdk.factory import AgntcyFactory
# Create factory and transport
factory = AgntcyFactory()
transport_instance = factory.create_transport(
transport="SLIM", endpoint="http://localhost:46357", name="org/namespace/agent-foo"
)
# Create MCP client
mcp_client = factory.create_client(
"MCP",
agent_topic="my_remote_mcp_server",
transport=transport_instance,
)
async with mcp_client as client:
tools = await client.list_tools()See the MCP Usage Guide for an end-to-end guide on using the MCP client and server with different transports.
from agntcy_app_sdk.factory import AgntcyFactory
factory = AgntcyFactory()
transport = factory.create_transport("NATS", "localhost:4222")
# or connect via agent topic
client_over_nats = await factory.create_client("A2A", agent_topic="my_remote_a2a_server", transport=transport)See the A2A Usage Guide for an end-to-end guide on using the A2A client and server with different transports.
For a fully functional distributed multi-agent sample app, check out our coffeeAgntcy!
SLIM (Secure Low-Latency Interactive Messaging) may be used to facilitate communication between AI agents with various communication patterns such as request-reply, and moderated group-chat. The AgntcyFactory implements a high-level SLIM transport wrapper which is used to standardize integration with agntcy-app-sdk protocol implementations including A2A and MCP. For more details and usage guides for SLIM, see the docs and repository.
The AgntcyFactory may be configured to use the Observe-SDK for multi-agentic application observability by setting the enable_tracing parameter to True when creating the factory instance. This will initialize an observe tracer and enable SLIM and A2A auto-instrumentation if necessary.
factory = AgntcyFactory(enable_tracing=True)
For more details and usage guides for Agntcy Observe, see the Observe-SDK repository
See the Identity repository for more details.
The /tests directory contains e2e tests for the factory, including A2A client and various transports.
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 -sOr run a single transport test:
uv run pytest tests/e2e/test_a2a.py::test_client -s -k "SLIM"β Test the factory with FastMCP client and all available transports
Run a single transport test for FastMCP:
uv run pytest tests/e2e/test_fast_mcp.py::test_client -s -k "SLIM"Run a single transport test for concurrent FastMCP:
uv run pytest tests/e2e/test_concurrent_fast_mcp.py::test_client -s -k "SLIM"Publishing to PyPI is automated via GitHub Actions. To release a new version:
- Update the
versionfield inpyproject.tomlto the desired release version. - Commit this change and merge it into the
mainbranch via a pull request. - Ensure your local
mainis up to date:git checkout main git pull origin main
- Create and push a tag from the latest
maincommit. The tag must be in the formatvX.Y.Zand match thepyproject.tomlversion:git tag -a v0.2.6 -m "Release v0.2.6" git push origin v0.2.6 - The release workflow will validate the tag and version, then publish to PyPI if all checks pass.
Note: Tags must always be created from the main branch and must match the version in pyproject.toml.
Contributions are welcome! Please see the contribution guide for details on how to contribute to the Agntcy Application SDK.