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.3.tar.gz (38.3 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.3-py3-none-any.whl (40.2 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: ais_protocol-0.1.3.tar.gz
  • Upload date:
  • Size: 38.3 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.3.tar.gz
Algorithm Hash digest
SHA256 e5993fafeb8df5afcad77dee6d71248a2f4b3b1a70a66189de36131e89ef8a1b
MD5 6c2a7ef32f4f3f7be330c98a85887e87
BLAKE2b-256 077dbdaa8b530272b40031c56c07ad62058ec47df6d47b6823b3064257988187

See more details on using hashes here.

File details

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

File metadata

  • Download URL: ais_protocol-0.1.3-py3-none-any.whl
  • Upload date:
  • Size: 40.2 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.3-py3-none-any.whl
Algorithm Hash digest
SHA256 e7576f9b2e2dc7f9229c8d7b352c5caceb665268567e45fb79b11f0fbc77ad48
MD5 c48ea143b1917638e81149b4a53d266d
BLAKE2b-256 3f49f3b12cc1014f3554510d09ff86e428ddeaae813b68d58d2838cc3b7dda34

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