A lightweight Python package for managing multi-agent orchestration. Easily define agents with custom instructions, tools, and models, and orchestrate their interactions seamlessly. Perfect for building modular, collaborative AI systems.
Project description
Agents Manager
A lightweight Python package for managing multi-agent orchestration. Easily define agents with custom instructions, tools, and models, and orchestrate their interactions seamlessly. Perfect for building modular, collaborative AI systems.
Features
- Define agents with specific roles and instructions
- Assign models to agents (e.g., OpenAI models)
- Equip agents with tools for performing tasks
- Seamlessly orchestrate interactions between multiple agents
Supported Models
- OpenAI
- Grok
- DeepSeek
- Anthropic
from agents_manager.models import OpenAi, Grok, DeepSeek, Anthropic
Installation
Install the package via pip:
pip install agents-manager
Quick Start
from agents_manager import Agent, AgentManager
from agents_manager.models import OpenAi, Grok, DeepSeek, Anthropic
from dotenv import load_dotenv
load_dotenv()
# Define the model
model = OpenAi(name="gpt-4o-mini")
# Define the OpenAi model
# model = OpenAi(name="gpt-4o-mini")
# Define the Grok model
# model = Grok(name="grok-2-latest")
# Define the DeepSeek model
# model = DeepSeek(name="deepseek-chat")
# Define the Anthropic model
# model = Anthropic(
# name="claude-3-5-sonnet-20241022",
# max_tokens= 1024,
# stream=True,
# )
def multiply(a: int, b: int) -> int:
"""
Multiply two numbers.
"""
return a * b
def transfer_to_agent_3_for_math_calculation() -> Agent:
"""
Transfer to agent 3 for math calculation.
"""
return agent3
def transfer_to_agent_2_for_math_calculation() -> Agent:
"""
Transfer to agent 2 for math calculation.
"""
return agent2
# Define agents
agent3 = Agent(
name="agent3",
instruction="You are a maths teacher, explain properly how you calculated the answer.",
model=model,
tools=[multiply]
)
agent2 = Agent(
name="agent2",
instruction="You are a maths calculator bro",
model=model,
tools=[transfer_to_agent_3_for_math_calculation]
)
agent1 = Agent(
name="agent1",
instruction="You are a helpful assistant",
model=model,
tools=[transfer_to_agent_2_for_math_calculation]
)
# Initialize Agent Manager and run agent
agent_manager = AgentManager()
agent_manager.add_agent(agent1)
response = agent_manager.run_agent("agent1", "What is 459 * 1?")
print(response)
How It Works
- Define Agents: Each agent has a name, a specific role (instruction), and a model.
- Assign Tools: Agents can be assigned tools (functions) to perform tasks.
- Create an Agent Manager: The
AgentManagermanages the orchestration of agents. - Run an Agent: Start an agent to process a request and interact with other agents as needed.
Use Cases
- AI-powered automation systems
- Multi-agent chatbots
- Complex workflow orchestration
- Research on AI agent collaboration
Contributing
Contributions are welcome! Feel free to submit issues and pull requests.
License
MIT License
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 agents_manager-1.0.8.tar.gz.
File metadata
- Download URL: agents_manager-1.0.8.tar.gz
- Upload date:
- Size: 10.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
35ce92b16499bd6fa0992e9fb258812330a8b0d8c63e52aa43a8632a9c38898b
|
|
| MD5 |
1df70871217b1141a2775d080587f365
|
|
| BLAKE2b-256 |
0bf8996ff599f25ffe90e91d58f1afd8afee206cd4f46a90f42f1f6f0b9c5af8
|
Provenance
The following attestation bundles were made for agents_manager-1.0.8.tar.gz:
Publisher:
publish-to-pypi.yml on sandeshnaroju/agents_manager
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
agents_manager-1.0.8.tar.gz -
Subject digest:
35ce92b16499bd6fa0992e9fb258812330a8b0d8c63e52aa43a8632a9c38898b - Sigstore transparency entry: 174242998
- Sigstore integration time:
-
Permalink:
sandeshnaroju/agents_manager@2c38b2c40ea51d889d3429c25113eba578ddea57 -
Branch / Tag:
refs/tags/v1.0.8 - Owner: https://github.com/sandeshnaroju
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-to-pypi.yml@2c38b2c40ea51d889d3429c25113eba578ddea57 -
Trigger Event:
push
-
Statement type:
File details
Details for the file agents_manager-1.0.8-py3-none-any.whl.
File metadata
- Download URL: agents_manager-1.0.8-py3-none-any.whl
- Upload date:
- Size: 13.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3860de8056f715787047a417f4cb083d569355d7fb1fafae0ce98750a5462c34
|
|
| MD5 |
18c478ce0ca1c12a4a29c0b8809fc243
|
|
| BLAKE2b-256 |
aa1d52b2b82437613b75c40a511571ea4c59f181327b94a220446d426e74cbff
|
Provenance
The following attestation bundles were made for agents_manager-1.0.8-py3-none-any.whl:
Publisher:
publish-to-pypi.yml on sandeshnaroju/agents_manager
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
agents_manager-1.0.8-py3-none-any.whl -
Subject digest:
3860de8056f715787047a417f4cb083d569355d7fb1fafae0ce98750a5462c34 - Sigstore transparency entry: 174243000
- Sigstore integration time:
-
Permalink:
sandeshnaroju/agents_manager@2c38b2c40ea51d889d3429c25113eba578ddea57 -
Branch / Tag:
refs/tags/v1.0.8 - Owner: https://github.com/sandeshnaroju
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-to-pypi.yml@2c38b2c40ea51d889d3429c25113eba578ddea57 -
Trigger Event:
push
-
Statement type: