Skip to content

agntcy/app-sdk

Agntcy Application SDK

Agntcy Logo

Build interoperable multi-agent systems for the Internet of Agents

PyPI version License Python 3.12+

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

  • A2A over abstract transport
  • MCP over abstract transport
  • Experimental agentic communication patterns

🚀 Transport Layer

  • SLIM transport setup
  • NATS transport setup
  • Point-to-point messaging
  • Pub-sub messaging
  • Group chat messaging

📂 Directory 🕐

  • Agntcy Directory integration
  • Git-based directory
  • Agent registry
  • Agent discovery

🔐 Identity 🕐

  • Agent badge creation
  • Agent badge verification
  • Tool-based access control
  • Task-based access control

🔍 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

📖 View complete MCP guide →

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
)

📖 View complete A2A guide →

📁 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

Agntcy App SDK Architecture
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:

  1. Update the version field in pyproject.toml to the desired release version.
  2. Commit this change and merge it into the main branch via a pull request.
  3. Ensure your local main is up to date:
    git checkout main
    git pull origin main
  4. Create and push a tag from the latest main commit. The tag must be in the format vX.Y.Z and match the pyproject.toml version:
    git tag -a v0.2.6 -m "Release v0.2.6"
    git push origin v0.2.6
  5. 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.

About

Application SDK for developers to consume AGNTCY Collective

Resources

License

Code of conduct

Contributing

Security policy

Stars

Watchers

Forks

Packages

No packages published

Contributors 5

Languages