
Security News
New CVE Forecasting Tool Predicts 47,000 Disclosures in 2025
CVEForecast.org uses machine learning to project a record-breaking surge in vulnerability disclosures in 2025.
multi-agent-orchestrator
Advanced tools
DEPRECATED: Use 'agent-squad' instead. Multi-agent orchestrator framework.
⚠️ IMPORTANT: This package has been renamed to agent-squad. Please use pip install agent-squad instead.See: https://pypi.org/project/agent-squad |
Flexible and powerful framework for managing multiple AI agents and handling complex conversations.
The Multi-Agent Orchestrator is a flexible framework for managing multiple AI agents and handling complex conversations. It intelligently routes queries and maintains context across interactions.
The system offers pre-built components for quick deployment, while also allowing easy integration of custom agents and conversation messages storage solutions.
This adaptability makes it suitable for a wide range of applications, from simple chatbots to sophisticated AI systems, accommodating diverse requirements and scaling efficiently.
To quickly get a feel for the Multi-Agent Orchestrator, we've provided a Demo App with a few basic agents. This interactive demo showcases the orchestrator's capabilities in a user-friendly interface. To learn more about setting up and running the demo app, please refer to our Demo App section.
In the screen recording below, we demonstrate an extended version of the demo app that uses 6 specialized agents:
Watch as the system seamlessly switches context between diverse topics, from booking flights to checking weather, solving math problems, and providing health information. Notice how the appropriate agent is selected for each query, maintaining coherence even with brief follow-up inputs.
The demo highlights the system's ability to handle complex, multi-turn conversations while preserving context and leveraging specialized agents across various domains.
Click on the image below to see a screen recording of the demo app on the GitHub repository of the project:
Check out our documentation for comprehensive guides on setting up and using the Multi-Agent Orchestrator!
# Optional: Set up a virtual environment
python -m venv venv
source venv/bin/activate # On Windows use `venv\Scripts\activate`
pip install multi-agent-orchestrator[aws]
Here's an equivalent Python example demonstrating the use of the Multi-Agent Orchestrator with a Bedrock LLM Agent and a Lex Bot Agent:
import sys
import asyncio
from multi_agent_orchestrator.orchestrator import MultiAgentOrchestrator
from multi_agent_orchestrator.agents import BedrockLLMAgent, LexBotAgent, BedrockLLMAgentOptions, LexBotAgentOptions, AgentStreamResponse
orchestrator = MultiAgentOrchestrator()
tech_agent = BedrockLLMAgent(BedrockLLMAgentOptions(
name="Tech Agent",
streaming=True,
description="Specializes in technology areas including software development, hardware, AI, \
cybersecurity, blockchain, cloud computing, emerging tech innovations, and pricing/costs \
related to technology products and services.",
model_id="anthropic.claude-3-sonnet-20240229-v1:0",
))
orchestrator.add_agent(tech_agent)
health_agent = BedrockLLMAgent(BedrockLLMAgentOptions(
name="Health Agent",
streaming=True,
description="Specializes in health and well being",
))
orchestrator.add_agent(health_agent)
async def main():
# Example usage
response = await orchestrator.route_request(
"What is AWS Lambda?",
'user123',
'session456',
{},
True
)
# Handle the response (streaming or non-streaming)
if response.streaming:
print("\n** RESPONSE STREAMING ** \n")
# Send metadata immediately
print(f"> Agent ID: {response.metadata.agent_id}")
print(f"> Agent Name: {response.metadata.agent_name}")
print(f"> User Input: {response.metadata.user_input}")
print(f"> User ID: {response.metadata.user_id}")
print(f"> Session ID: {response.metadata.session_id}")
print(f"> Additional Parameters: {response.metadata.additional_params}")
print("\n> Response: ")
# Stream the content
async for chunk in response.output:
async for chunk in response.output:
if isinstance(chunk, AgentStreamResponse):
print(chunk.text, end='', flush=True)
else:
print(f"Received unexpected chunk type: {type(chunk)}", file=sys.stderr)
else:
# Handle non-streaming response (AgentProcessingResult)
print("\n** RESPONSE ** \n")
print(f"> Agent ID: {response.metadata.agent_id}")
print(f"> Agent Name: {response.metadata.agent_name}")
print(f"> User Input: {response.metadata.user_input}")
print(f"> User ID: {response.metadata.user_id}")
print(f"> Session ID: {response.metadata.session_id}")
print(f"> Additional Parameters: {response.metadata.additional_params}")
print(f"\n> Response: {response.output.content}")
if __name__ == "__main__":
asyncio.run(main())
The following example demonstrates how to use the Multi-Agent Orchestrator with two different types of agents: a Bedrock LLM Agent with Converse API support and a Lex Bot Agent. This showcases the flexibility of the system in integrating various AI services.
This example showcases:
If you want to use Anthropic or OpenAI for classifier and/or agents, make sure to install the multi-agent-orchestrator with the relevant extra feature.
pip install "multi-agent-orchestrator[anthropic]"
pip install "multi-agent-orchestrator[openai]"
For a complete installation (including Anthropic and OpenAi):
pip install multi-agent-orchestrator[all]
This guide explains how to build and install the multi-agent-orchestrator package from source code.
Navigate to the Python package directory:
cd python
Install the build dependencies:
python -m pip install build
Build the package:
python -m build
This process will create distribution files in the python/dist
directory, including a wheel (.whl
) file.
Locate the current version number in setup.cfg
.
Install the built package using pip:
pip install ./dist/multi_agent_orchestrator-<VERSION>-py3-none-any.whl
Replace <VERSION>
with the version number from setup.cfg
.
If the version in setup.cfg
is 1.2.3
, the installation command would be:
pip install ./dist/multi_agent_orchestrator-1.2.3-py3-none-any.whl
sudo
or activate a virtual environment.dist
directory before rebuilding if you encounter issues: rm -rf python/dist/*
We welcome contributions! Please see our Contributing Guide for more details.
This project is licensed under the Apache 2.0 licence - see the LICENSE file for details.
This project uses the JetBrainsMono NF font, licensed under the SIL Open Font License 1.1. For full license details, see FONT-LICENSE.md.
FAQs
DEPRECATED: Use 'agent-squad' instead. Multi-agent orchestrator framework.
We found that multi-agent-orchestrator demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
CVEForecast.org uses machine learning to project a record-breaking surge in vulnerability disclosures in 2025.
Security News
Browserslist-rs now uses static data to reduce binary size by over 1MB, improving memory use and performance for Rust-based frontend tools.
Research
Security News
Eight new malicious Firefox extensions impersonate games, steal OAuth tokens, hijack sessions, and exploit browser permissions to spy on users.