Agntcy Application SDK for Python
Project description
Overview
The Agntcy Application SDK provides a unified factory interface for building interoperable, multi-agent components. It defines standard abstractions and interoperability layers that connect Agntcy and open-source transports, protocols, and directories—enabling agents to communicate and coordinate seamlessly.
Features
|
🔌 Semantic Layer
|
🚀 Transport Layer
|
📂 Directory 🕐
|
🔐 Identity 🕐
|
|
🔍 Observability • Built-in Agntcy Observe SDK integration |
|||
📦 Installation
# Install via pip
pip install agntcy-app-sdk
# Or use uv for faster installs
uv add agntcy-app-sdk
# Install from source
git clone https://github.com/agntcy/app-sdk.git
pip install -e app-sdk
Quick Start
Explore Available Components
from agntcy_app_sdk.factory import AgntcyFactory
factory = AgntcyFactory()
print(factory.registered_protocols()) # ['A2A', 'MCP', 'FastMCP']
print(factory.registered_transports()) # ['SLIM', 'NATS', 'STREAMABLE_HTTP']
print(factory.registered_observability_providers()) # ['ioa_observe']
Create an MCP Client
from agntcy_app_sdk.factory import AgntcyFactory
factory = AgntcyFactory()
# Initialize transport
transport = factory.create_transport(
transport="SLIM",
endpoint="http://localhost:46357",
name="org/namespace/agent-foo"
)
# Create and use MCP client
mcp_client = factory.create_client(
"MCP",
agent_topic="my_remote_mcp_server",
transport=transport
)
async with mcp_client as client:
tools = await client.list_tools()
# Your agent logic here
Create an A2A Client
from agntcy_app_sdk.factory import AgntcyFactory
factory = AgntcyFactory()
transport = factory.create_transport("NATS", "localhost:4222")
# Connect to remote A2A server
client = await factory.create_client(
"A2A",
agent_topic="my_remote_a2a_server",
transport=transport
)
📁 Project Structure
📁 src/
└── 📦 agntcy_app_sdk/
├── 🏭 factory.py # Main factory interface
├── 🔄 app_sessions.py # Session management
├── 📂 directory/ # Agent directory services
├── 🔐 identity/ # Authentication & identity
├── 🧠 semantic/ # Semantic layer (SLIM)
├── 🌐 transport/ # Transport implementations
└── 🛠️ common/ # Shared utilities
Reference Application
For a fully functional distributed multi-agent sample app, check out our coffeeAgntcy!
Agntcy Component Usage
| Component | Version | Description | Repo |
|---|---|---|---|
| SLIM | 0.6.1 |
Secure Low-Latency Interactive Messaging (SLIM) facilitates communication between AI agents using request-reply and moderated group-chat patterns. | Repo |
| Observe SDK | 1.0.24 |
Enables multi-agent observability by setting enable_tracing=True when initializing the AgntcyFactory. This automatically configures tracing and auto-instrumentation for SLIM and A2A. |
Repo |
| Directory | Coming soon | Component for service discovery and directory-based agent lookups. | Repo |
| Identity | Coming soon | Provides agent identity, authentication, and verification mechanisms. | Repo |
Testing
The /tests directory contains both unit and end-to-end (E2E) tests for Agntcy components and workflows.
Prerequisites
Before running tests, start the required message bus services:
docker-compose -f services/docker/docker-compose.yaml up
Running Tests
🧩 A2A Client Tests
Run all transports
Run the parameterized E2E test for the A2A client across all supported transports:
uv run pytest tests/e2e/test_a2a.py::test_client -s
Run a single transport
To test only a specific transport (e.g. SLIM):
uv run pytest tests/e2e/test_a2a.py::test_client -s -k "SLIM"
Broadcast messaging
Run the E2E test for A2A broadcast communication across all transports:
uv run pytest tests/e2e/test_a2a.py::test_broadcast -s
Group chat
Run the E2E test for A2A moderated group-chat using a specific transport (e.g. SLIM):
uv run pytest tests/e2e/test_a2a.py::test_groupchat -s -k "SLIM"
FastMCP Client Tests
Single transport
Run an E2E test for the FastMCP client with a specific transport:
uv run pytest tests/e2e/test_fast_mcp.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.
PyPI Release Flow
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.
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.4.1.tar.gz.
File metadata
- Download URL: agntcy_app_sdk-0.4.1.tar.gz
- Upload date:
- Size: 3.2 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
793981da6d3907352b86de3404f1a29d5fe015a7293168d56eb563e59ba81367
|
|
| MD5 |
6a9f8ab1b55e7f6729e6b12c3bf28f59
|
|
| BLAKE2b-256 |
b22240be38db2afaee156cad1a8ee81fae338f9531d5f4c0fac33a87274594bb
|
File details
Details for the file agntcy_app_sdk-0.4.1-py3-none-any.whl.
File metadata
- Download URL: agntcy_app_sdk-0.4.1-py3-none-any.whl
- Upload date:
- Size: 53.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3b53e0201b1786981fb1f5ec3f0d16fdd1e96f867fdd3654a262049e7e65df93
|
|
| MD5 |
323df6b84257f950c2805ec7aabf4395
|
|
| BLAKE2b-256 |
465a3601790d18a93871526167ecc5dce8ea7fac5e5997199eb59ab173e7c9dd
|