Simplify the Complex, Amplify the Intelligent for Enterprise. Orchestrate multiple agents with ease: register agents, integrate tools, define custom instructions, and leverage multiple models.
Project description
AgentRouter SDK
Simplify the Complex, Amplify the Intelligent for Enterprise
Orchestrate multiple agents with ease: register agents, integrate tools, define custom instructions, and leverage multiple models. Enterprise-grade and production-ready, with full control, deep customization, strong defaults, clear boundaries, and developer-focused APIs.
๐ Full Documentation: https://agents-docs.us.inc
Overview
AgentRouter is an enterprise-grade, production-ready framework that provides:
- ๐๏ธ Hierarchical Agent Management - Create manager and worker agents with unlimited nesting
- ๐ง Tool Integration - Easy tool creation with OpenAI-compatible schemas
- ๐ Enterprise-Ready - Built-in error handling, logging, and monitoring
- ๐ Complete Isolation - Full isolation between agent instances
- ๐ค OpenAI Compatible - Works seamlessly with OpenAI message formats
- ๐ Visual Tracing - Zero-overhead tracing with beautiful execution visualizations
Why AgentRouter?
๐ฏ Purpose-Built for Enterprise Scale
Unlike generic agent frameworks, AgentRouter is designed from the ground up for production environments handling millions of requests daily. Every architectural decision prioritizes reliability, performance, and maintainability.
๐ True Hierarchical Management
While other frameworks offer basic agent coordination, AgentRouter provides unlimited nesting depth with intelligent message routing, automatic context propagation, and seamless worker sharing across multiple managers.
๐ก Key Differentiators
1. Complete Agent Isolation
- Each agent instance is fully isolated with no state leakage
- Concurrent execution without interference
- Secure multi-tenant deployments
2. Shared Worker Pattern
- Reuse specialized workers across multiple managers
- Reduce resource consumption and API costs
- Maintain consistency across workflows
3. Intelligent Configuration Inheritance
- Workers automatically inherit parent configurations
- Override specific settings when needed
- Centralized credential management
4. Production-Grade Features
- Built-in retry mechanisms and circuit breakers
- Comprehensive error handling and recovery
- Structured logging and monitoring hooks
- Configurable timeouts at every level
5. Zero-Overhead Tracing
- Performance profiling adds < 1ns when disabled
- Beautiful visualization of execution flows
- Export to multiple formats (Mermaid, HTML, JSON)
6. OpenAI Drop-in Compatibility
- Use existing OpenAI code with minimal changes
- Enhanced with multi-agent capabilities
- Support for any OpenAI-compatible model provider
๐ When to Choose AgentRouter
โ Perfect for:
- Complex multi-department workflows
- Applications requiring agent specialization
- Systems needing audit trails and compliance
- High-volume production deployments
- Teams wanting gradual migration from OpenAI
โ Consider alternatives if you need:
- Simple single-agent chatbots
- Prototype or proof-of-concept only
- Fully autonomous agent swarms
- Non-Python environments
๐ Learn more about our architecture โ
Architecture
graph TB
subgraph "AgentRouter Architecture"
M[Manager Agent<br/>Orchestrator<br/>API Key, Model, Config]
W1[Worker Agent L1<br/>Inventory Mgmt<br/>Inherits Config]
W2[Worker Agent L1<br/>Payment Process<br/>Shared Worker]
W3[Worker Agent L1<br/>Shipping Coord<br/>Own API Key]
SW1[Sub-Worker L2<br/>Stock Verification]
SW2[Sub-Worker L2<br/>Product Info]
SW3[Sub-Worker L2<br/>Fraud Detection]
SW4[Sub-Worker L2<br/>Route Planning]
T1[Tool]
T2[Tool]
T3[Tool]
T4[Tool]
T5[Tool]
T6[Tool]
T7[Tool]
T8[Tool]
M --> W1
M --> W2
M --> W3
W1 --> SW1
W1 --> SW2
W3 --> SW3
W3 --> SW4
SW1 -.-> T1
SW1 -.-> T2
SW2 -.-> T3
SW2 -.-> T4
SW3 -.-> T5
SW3 -.-> T6
SW4 -.-> T7
SW4 -.-> T8
end
style M fill:#667eea,stroke:#764ba2,stroke-width:2px,color:#fff
style W1 fill:#764ba2,stroke:#f472b6,stroke-width:2px,color:#fff
style W2 fill:#764ba2,stroke:#f472b6,stroke-width:2px,color:#fff
style W3 fill:#764ba2,stroke:#f472b6,stroke-width:2px,color:#fff
style SW1 fill:#764ba2,stroke:#f472b6,stroke-width:1px,color:#fff
style SW2 fill:#764ba2,stroke:#f472b6,stroke-width:1px,color:#fff
style SW3 fill:#764ba2,stroke:#f472b6,stroke-width:1px,color:#fff
style SW4 fill:#764ba2,stroke:#f472b6,stroke-width:1px,color:#fff
style T1 fill:#f59e0b,stroke:#ef4444,stroke-width:1px,color:#fff
style T2 fill:#f59e0b,stroke:#ef4444,stroke-width:1px,color:#fff
style T3 fill:#f59e0b,stroke:#ef4444,stroke-width:1px,color:#fff
style T4 fill:#f59e0b,stroke:#ef4444,stroke-width:1px,color:#fff
style T5 fill:#f59e0b,stroke:#ef4444,stroke-width:1px,color:#fff
style T6 fill:#f59e0b,stroke:#ef4444,stroke-width:1px,color:#fff
style T7 fill:#f59e0b,stroke:#ef4444,stroke-width:1px,color:#fff
style T8 fill:#f59e0b,stroke:#ef4444,stroke-width:1px,color:#fff
Key Features
๐๏ธ Hierarchical Multi-Agent System
- Unlimited nesting depth for complex workflows
- Shared worker agents across multiple parents
- Dynamic agent creation and attachment
๐ง Tool Integration
- OpenAI-compatible function schemas
- Automatic validation and error handling
- Support for async operations
๐ Production Ready
- Configurable timeouts and retries
- Built-in monitoring and logging
- Scale to millions of users per day
๐ Visualization & Tracing
- Zero-overhead tracing (< 1ns when disabled)
- Multiple output formats: Mermaid, HTML, JSON
- Pipeline validation before execution
Installation
pip install agentrouter
Quick Start
from agentrouter import ManagerAgent, WorkerAgent, tool
# Create a manager agent
manager = ManagerAgent(
name="Customer_Service_Manager",
model="usf-mini",
api_key="your-api-key"
)
# Create and attach workers
tech_support = manager.create_worker(
name="Technical_Support",
role="Technical Support Specialist"
)
# Execute tasks
messages = [{"role": "user", "content": "Help needed"}]
response = await manager.execute(messages)
๐ View Complete Quick Start Guide โ
Documentation
Getting Started
- ๐ Quick Start Guide - Get up and running in minutes
- ๐ฆ Installation - Installation and setup instructions
- โ๏ธ Configuration - Configuration options and best practices
Architecture & Concepts
- ๐๏ธ Architecture Overview - System design and concepts
- ๐ Execution Flow - Understanding agent execution
- ๐ฒ Nested Workers - Building hierarchical systems
- ๐ง Tools Integration - Working with tools
- ๐ข Enterprise Features - Production-ready features
Examples & Cookbook
- ๐ Cookbook Overview - Collection of recipes and patterns
- ๐๏ธ Customer Service - Multi-department coordination
- ๐ผ Finance Portfolio - Financial analysis system
- ๐ฅ Healthcare Diagnosis - Medical diagnostic workflow
- ๐ญ Manufacturing - Supply chain management
- ๐ Education Platform - Adaptive learning system
Advanced Topics
- ๐ Plugin System - Extending with plugins
- ๐ Visualization Guide - Tracing and visualization
- ๐ Performance Optimization - Scaling best practices
License
AgentRouter SDK is licensed under the Modified Commercial Use License. See the LICENSE file for full details.
โ You are free to:
- Use AgentRouter for ANY commercial purpose
- Build commercial applications and services with AgentRouter
- Deploy AgentRouter in production environments
- Integrate AgentRouter into your products
- Use AgentRouter for research and development
โ You cannot:
- Create competing orchestration frameworks based on AgentRouter's code
- Fork and modify AgentRouter to create competitive products
- Use AgentRouter's source code as inspiration for competitive products
For additional support or custom licensing arrangements, please contact the UltraSafe AI Team at support@us.inc.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file agentrouter-0.0.1b1.tar.gz.
File metadata
- Download URL: agentrouter-0.0.1b1.tar.gz
- Upload date:
- Size: 101.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4c3d7c780dda36e1968d5009d299ee94e632280a3af8e54c88c1d37f59d32fb6
|
|
| MD5 |
a55af2dadade581edeac3e5c1b506a7a
|
|
| BLAKE2b-256 |
67b58f41b7c5a1476fd2413d363bf985d12a9156d5e7050c1dd592c4fad0896c
|
File details
Details for the file agentrouter-0.0.1b1-py3-none-any.whl.
File metadata
- Download URL: agentrouter-0.0.1b1-py3-none-any.whl
- Upload date:
- Size: 98.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0e60e8b97643c9e7aa027dff708c42ff14935f2f742d40663d661601796cd9a4
|
|
| MD5 |
06f7a79249434e5c8aaecb49516347d1
|
|
| BLAKE2b-256 |
7bcde40794b6979789ade2f00d9ede20ccbf7926ccf31529eb68f2da15f4a097
|