Skip to main content

AIS Protocol - Python SDK

Agent Interface Standard (AIS) is a protocol for AI agent-to-agent communication. Think "HTTP for AI agents" or "MCP for agent collaboration."

Features

  • 🚀 Production-ready - Battle-tested, type-safe, fully async
  • 🔌 Transport agnostic - HTTP, WebSocket, or bring your own
  • 🔐 Secure by default - JWT/API key auth, input validation, rate limiting
  • 📦 Easy to use - <50 lines to create a basic agent
  • 🔄 Session management - Stateful multi-turn interactions
  • 📊 Observable - Structured logging and metrics built-in

Quick Start

Installation

pip install ais-protocol

Create Your First Agent

from ais import AISAgent

# Create agent
agent = AISAgent(
    agent_id="agent://example.com/my-agent",
    agent_name="My First Agent"
)

# Register a capability
@agent.capability(
    name="greet",
    description="Greet someone by name"
)
async def greet_handler(parameters, context, session):
    name = parameters.get("name", "World")
    return {"message": f"Hello, {name}!"}

# Start the agent
agent.start_sync(port=8000)

Connect to an Agent

from ais import AISClient

# Create client
client = AISClient(
    client_agent_id="agent://example.com/my-client"
)

# Connect to remote agent
session_id = await client.connect(
    server_url="http://localhost:8000",
    server_agent_id="agent://example.com/my-agent"
)

# Call a capability
result = await client.call(
    session_id=session_id,
    capability="greet",
    parameters={"name": "Alice"}
)

print(result)  # {"message": "Hello, Alice!"}

Documentation

Status

Version: 0.1.0 (Alpha) Python: 3.9+ License: Apache 2.0

Development

Setup

# Clone monorepo
git clone https://mercola-consulting-services.ghe.com/MCS/A2A-Protocol-AIS.git
cd A2A-Protocol-AIS/packages/python

# Install dependencies
pip install -e ".[dev]"

# Run tests
pytest

# Format code
black src tests
ruff check src tests

# Type check
mypy src

Contributing

This project is in active development. We welcome contributions!

License

Apache License 2.0 - see LICENSE for details.

Links

Release files for ais-protocol 0.1.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for ais-protocol 0.1.3
File Size Uploaded
ais_protocol-0.1.3.tar.gz 38.3 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for ais-protocol 0.1.3
File Interpreter ABI Platform
ais_protocol-0.1.3-py3-none-any.whl Python 3 none any Details

Total release size: 78.5 kB

Release files / ais_protocol-0.1.3.tar.gz

Download URL ais_protocol-0.1.3.tar.gz
Size 38.3 kB
Tags Source
SHA-256 checksum
How to use checksums
e5993fafeb8df5afcad77dee6d71248a2f4b3b1a70a66189de36131e89ef8a1b
BLAKE2b-256 checksum
How to use checksums
077dbdaa8b530272b40031c56c07ad62058ec47df6d47b6823b3064257988187
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.11.8

Release files / ais_protocol-0.1.3-py3-none-any.whl

Download URL ais_protocol-0.1.3-py3-none-any.whl
Size 40.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
e7576f9b2e2dc7f9229c8d7b352c5caceb665268567e45fb79b11f0fbc77ad48
BLAKE2b-256 checksum
How to use checksums
3f49f3b12cc1014f3554510d09ff86e428ddeaae813b68d58d2838cc3b7dda34
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.11.8

Release history Release notifications | RSS feed

This release

0.1.3 This release

2 release files

0.1.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page