Skip to main content

Python implementation of the Agent Communication Protocol (ACP)

Project description

Agent Communication Protocol (ACP) - Enterprise Agent Communication Protocol

PyPI version License: Apache 2.0 Python 3.8+ Downloads GitHub stars Code style: black

๐Ÿข Enterprise-First Design

Purpose-built for enterprise environments where security, governance, and scale matter most.

ACP (Agent Communication Protocol) is the industry-standard protocol for enterprise-grade agent-to-agent communication. This Python implementation is specifically designed for large organizations deploying multiple AI agents across departments with centralized management and security controls.

Perfect For Enterprise Use Cases:

  • ๐Ÿ›๏ธ Multi-department AI deployments (Sales, Legal, HR, Finance agents)
  • ๐Ÿ” API Gateway integration (Apigee, Kong, AWS API Gateway)
  • ๐Ÿ“Š Centralized agent discovery and capability management
  • ๐Ÿ›ก๏ธ Enterprise security with OAuth 2.0, mTLS, and audit trails
  • ๐Ÿ“ˆ Production scale with high-throughput, low-latency communication
  • ๐ŸŽฏ Supervisor/Router patterns with specialist agent orchestration

Architecture Highlights:

Router Agent (Supervisor) โ†’ API Gateway โ†’ Specialist Agents (Servers)
     โ†“                           โ†“              โ†“
Orchestrates workflows    Apigee OAuth2    Department-specific
Multi-agent coordination  Rate limiting    Domain expertise
Central task routing      Security policies Scalable processing

ACP (Agent Communication Protocol) is the industry-standard protocol for secure, scalable agent-to-agent communication. Built on JSON-RPC 2.0, ACP enables AI agents to discover, authenticate, and collaborate across any platform.

๐Ÿš€ Why ACP for Enterprise?

  • ๐Ÿ›๏ธ Enterprise Standard: Purpose-built for large-scale organizational deployments
  • ๐Ÿ”’ Production Security: OAuth2, mTLS, API gateway integration, audit trails
  • ๐ŸŒ Multi-Cloud Ready: Deploy across AWS, Azure, GCP with consistent protocols
  • ๐Ÿ“Š Centralized Governance: Agent discovery, capability management, SLA monitoring
  • โšก Enterprise Scale: High-throughput, low-latency, multi-tenant architecture
  • ๐ŸŽฏ Proven Patterns: Router/supervisor architecture with specialist agent coordination

๐Ÿข See Enterprise Deployment Guide for Apigee integration, security patterns, and production deployment.

๐Ÿ“ฆ Quick Start

Installation

pip install acp-sdk-python

Basic Client Usage

import acp
from acp.models import TasksCreateParams, Message, Part

# Connect to an agent
client = acp.Client("https://agent.example.com/jsonrpc")

# Send a task
response = await client.tasks.create(TasksCreateParams(
    initialMessage=Message(
        role="user",
        parts=[Part(type="TextPart", content="Search for recent tickets")]
    ),
    priority="HIGH"
))

print(f"Task created: {response.taskId}")

Basic Server Usage

import acp

# Create ACP server
server = acp.Server(
    title="My Agent",
    description="An intelligent assistant agent"
)

@server.method_handler("tasks.create")
async def handle_task(params, context):
    """Handle incoming task requests"""
    # Your agent logic here
    return {
        "type": "task",
        "task": {
            "taskId": "task-123",
            "status": "SUBMITTED",
            "createdAt": "2024-01-01T00:00:00Z"
        }
    }

# Run the server
server.run(host="0.0.0.0", port=8000)

๐Ÿ—๏ธ Architecture

ACP provides a complete stack for agent communication:

โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚                    Your Application                 โ”‚
โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค
โ”‚  ๐Ÿ“ฑ ACP Client           ๐Ÿ–ฅ๏ธ  ACP Server            โ”‚
โ”‚  โ€ข Task Management      โ€ข Request Handling          โ”‚
โ”‚  โ€ข Streaming            โ€ข Authentication            โ”‚
โ”‚  โ€ข Discovery            โ€ข Validation                โ”‚
โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค
โ”‚             ๐ŸŒ ACP Protocol Layer                   โ”‚
โ”‚  โ€ข JSON-RPC 2.0         โ€ข OAuth2 Security          โ”‚
โ”‚  โ€ข Agent Discovery      โ€ข Real-time Streaming       โ”‚
โ”‚  โ€ข Error Handling       โ€ข Webhook Notifications     โ”‚
โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค
โ”‚                ๐Ÿ”ง Transport Layer                   โ”‚
โ”‚  โ€ข HTTPS/TLS            โ€ข WebSockets               โ”‚
โ”‚  โ€ข Load Balancing       โ€ข Rate Limiting            โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜

๐Ÿ”ง Core Features

1. Task Management

  • Asynchronous Processing: Submit tasks and receive results when ready
  • Priority Handling: HIGH, MEDIUM, LOW priority levels
  • Progress Tracking: Real-time status updates and notifications
  • Artifact Exchange: Secure file and data transfer

2. Real-time Streaming

  • Bidirectional Communication: Interactive conversations between agents
  • Message Chunking: Efficient handling of large data streams
  • Connection Management: Automatic reconnection and error recovery

3. Agent Discovery

  • Agent Cards: Standardized capability discovery via /.well-known/agent.json
  • Skill Registry: Declare and discover agent capabilities
  • Version Management: Semantic versioning for protocol compatibility

4. Enterprise Security

  • OAuth2 Authentication: Industry-standard authentication flows
  • Scope-based Authorization: Fine-grained permission control
  • HTTPS Everywhere: Encrypted transport for all communications
  • Token Management: Automatic token refresh and validation

๐Ÿ› ๏ธ CLI Tools

ACP includes professional command-line tools:

# Protocol information
acp schema info              # Show protocol specification
acp schema methods           # List available methods

# Agent discovery
acp agent-card validate      # Validate agent card files
acp agent-card examples      # Show example configurations

# Development tools
acp server start             # Start development server
acp validate request.json    # Validate ACP requests

๐Ÿ“š Documentation

๐ŸŒŸ Examples

Example Description Link
Basic Client Simple task submission View
Basic Server Handle incoming requests View
Confluence Agent Enterprise search agent View
Streaming Chat Real-time conversations View

๐Ÿข Enterprise Features

ACP is designed for production enterprise environments:

  • ๐ŸŽฏ High Availability: Load balancing and failover support
  • ๐Ÿ“Š Observability: Structured logging and metrics collection
  • ๐Ÿ”„ Scalability: Horizontal scaling with connection pooling
  • ๐Ÿ›ก๏ธ Security: Enterprise-grade authentication and authorization
  • ๐Ÿ“ˆ Performance: Optimized for high-throughput workloads

๐Ÿค Contributing

ACP is an open protocol welcoming contributions:

  1. Protocol: Propose enhancements to the core specification
  2. Implementation: Improve the Python reference implementation
  3. Documentation: Help make ACP more accessible
  4. Testing: Add test cases and improve reliability

See our Contributing Guide for details.

๐Ÿ“„ License

This project is licensed under the Apache License 2.0 - see the LICENSE file for details.

๐Ÿ”— Links


Agent Communication Protocol (ACP)
The Standard for Agent-to-Agent Communication

Made with โค๏ธ by the ACP community

Download files

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

Source Distribution

acp_sdk_python-1.1.2.tar.gz (135.7 kB view details)

Uploaded Source

Built Distribution

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

acp_sdk_python-1.1.2-py3-none-any.whl (70.1 kB view details)

Uploaded Python 3

File details

Details for the file acp_sdk_python-1.1.2.tar.gz.

File metadata

  • Download URL: acp_sdk_python-1.1.2.tar.gz
  • Upload date:
  • Size: 135.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.3

File hashes

Hashes for acp_sdk_python-1.1.2.tar.gz
Algorithm Hash digest
SHA256 d0dd49fdae31756c1c92a946e963d757d253272e936e0fd9eb4e2accee418859
MD5 5b9bcb8cec9f686c85a2a135794108ea
BLAKE2b-256 a11037aa29bdeea0f6b9cb73247639c09db556dfc1b6b2fdfa489afc5d1ae359

See more details on using hashes here.

File details

Details for the file acp_sdk_python-1.1.2-py3-none-any.whl.

File metadata

  • Download URL: acp_sdk_python-1.1.2-py3-none-any.whl
  • Upload date:
  • Size: 70.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.3

File hashes

Hashes for acp_sdk_python-1.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 641299de59000950a988bf908c6ffbf0fcaf531d5f3fef7ad08e3fb5d0dcfa48
MD5 fdcc31d09bbe416893611c89d99f3e35
BLAKE2b-256 9707e32a8a17e02f55dca586b3e81a557b3887eec892637ef6bf3d4c3216c091

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