Skip to main content

Overview

The Agent Orchestration Protocol (AOP) is a powerful framework for deploying and managing agents as distributed services. AOP enables agents to be discovered, managed, and executed through a standardized protocol built on the Model Context Protocol (MCP), making it perfect for building scalable, production-ready multi-agent systems.

Key Features

  • Distributed Deployment: Deploy agents as independent services accessible via MCP
  • Service Discovery: Automatic agent registration and discovery
  • Queue-Based Execution: Built-in task queuing for reliability and performance
  • Monitoring & Stats: Real-time queue statistics and performance metrics
  • Persistence Mode: Automatic restart and failsafe protection
  • Network Resilience: Connection monitoring and automatic retry capabilities

Architecture

AOP transforms agents into MCP tools that can be:
  • Accessed remotely via HTTP or other transports
  • Discovered through standardized protocols
  • Managed centrally with queue-based task execution
  • Monitored for performance and health

Basic Usage

Creating an AOP Server

Adding Multiple Agents in Batch

Task Queue System

AOP includes a powerful task queue system for reliable, scalable task execution.

Queue Features

  • Priority-based queuing: Tasks with higher priority execute first
  • Automatic retries: Failed tasks retry automatically with backoff
  • Worker threads: Multiple workers process tasks concurrently
  • Task tracking: Monitor task status (pending, processing, completed, failed)
  • Statistics: Real-time metrics on queue performance

Task Lifecycle

Queue Configuration

Monitoring and Statistics

Getting Queue Statistics

Agent Discovery

Production Features

Persistence Mode

Enable automatic restart and failsafe protection:

Network Monitoring

Automatic network connection monitoring and retry:

Error Handling and Logging

Transport Options

AOP supports multiple transport types for different deployment scenarios:

Advanced Configuration

Custom Tool Schemas

Per-Agent Configuration

Best Practices

1. Use Queue-Based Execution

Always enable queuing for production deployments:

2. Set Appropriate Timeouts

Configure timeouts based on agent complexity:

3. Monitor Performance

Regularly check queue statistics:

4. Handle Graceful Shutdown

5. Use Agent Tags and Capabilities