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+

๐Ÿข 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-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 MIT License - 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.0.0.tar.gz (135.2 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.0.0-py3-none-any.whl (69.7 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: acp_sdk_python-1.0.0.tar.gz
  • Upload date:
  • Size: 135.2 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.0.0.tar.gz
Algorithm Hash digest
SHA256 90d0545488eca34fe0272733d2774e2e96c22f23b9cbb03f8c0f8d87a6d07518
MD5 656d9032b9b0a9f0d04208bc51cd0de9
BLAKE2b-256 35bf6cc0e63cf39120454862a988cc3f27c297d4f1b959807bae57428b5c6b2f

See more details on using hashes here.

File details

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

File metadata

  • Download URL: acp_sdk_python-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 69.7 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.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 07f2509a9f8d59d08c0a9e5f23cc148dfb3a822842d1921d2120a8794de0c7c0
MD5 05f64a6831f26b0dac98c6960f41908a
BLAKE2b-256 003ec73eacb94c5b21931d203ee54b7ed079f39a68bc7eba420453c36381fcf5

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