Key Capabilities
Everything you need to build sophisticated multi-agent applications
Architecture Overview
Hierarchical multi-agent system with unlimited nesting and tool integration
Workflow Lifecycle
Intelligent orchestration with Planning Agent and Tool/Agent Calls
Quick Start
Get up and running with AgentRouter in minutes
Install
Install AgentRouter SDK from PyPI with a simple pip command
Configure
Set up your manager agent with API key and model preferences
Build
Create workers, register tools, and define your workflow
Execute
Run your multi-agent system and handle complex tasks
# Install AgentRouter
pip install agentrouter
# Create your first multi-agent system
from agentrouter import ManagerAgent, WorkerAgent, tool
# Initialize Manager Agent
manager = ManagerAgent(
name="customer_service_manager",
api_key="your-api-key",
model="usf-mini",
backstory="Senior customer service manager",
goal="Resolve customer issues efficiently"
)
# Create Worker Agent
tech_support = manager.create_worker(
name="Technical_Support",
role="Diagnoses hardware/software issues, provides troubleshooting steps, and escalates complex technical problems" # REQUIRED
)
# Define a Tool
@tool(
schema={
"type": "function",
"function": {
"name": "search_knowledge_base",
"description": "Searches technical documentation for solutions, returns troubleshooting steps and fixes",
"parameters": {
"type": "object",
"properties": {
"query": {"type": "string"}
},
"required": ["query"]
}
}
}
)
def search_knowledge_base(query: str):
return {"results": f"Found solutions for: {query}"}
# Register the tool
tech_support.register_tool(search_knowledge_base)
# Execute a task
messages = [
{"role": "user", "content": "My laptop screen is flickering"}
]
response = await manager.execute(messages)
print(response)
Production Ready
Enterprise-grade with built-in error handling and monitoring
Fully Configurable
Customize timeouts, retries, and execution parameters
Scalable
Handle millions of requests with isolated agent instances