Skip to main content

Agent Interface Standard - A protocol for AI agent-to-agent communication

Project description

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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ais_protocol-0.1.1.tar.gz (37.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

ais_protocol-0.1.1-py3-none-any.whl (39.8 kB view details)

Uploaded Python 3

File details

Details for the file ais_protocol-0.1.1.tar.gz.

File metadata

  • Download URL: ais_protocol-0.1.1.tar.gz
  • Upload date:
  • Size: 37.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.8

File hashes

Hashes for ais_protocol-0.1.1.tar.gz
Algorithm Hash digest
SHA256 9089999fe1291076c57352548989dfceb9b4ef93ace3c418ce18cfd59e506773
MD5 0b08202c58c916142bb35553647282e4
BLAKE2b-256 851ec641482ccfb12be42fc0923c380cb95ef7c2e04d7fb993376ff424fd9b49

See more details on using hashes here.

File details

Details for the file ais_protocol-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: ais_protocol-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 39.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.8

File hashes

Hashes for ais_protocol-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 c27212e89bb818fcce75b4986bf65e2661f24dcaa11634bdeb1676dd41c2844e
MD5 3ce78368c6e6fada68f6b13317e19724
BLAKE2b-256 515c67c480ae3b897b6d0158cca961805f770c1309eb11a94ad4af30087cfab8

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page