Skip to main content

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
from agents_manager.models import OpenAi, Grok, DeepSeek

Installation

Install the package via pip:

pip install agents-manager

Quick Start

from agents_manager import Agent, AgentManager
from agents_manager.models import OpenAi

from dotenv import load_dotenv

load_dotenv()

# Define the model
model = OpenAi(name="gpt-4o-mini")

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

  1. Define Agents: Each agent has a name, a specific role (instruction), and a model.
  2. Assign Tools: Agents can be assigned tools (functions) to perform tasks.
  3. Create an Agent Manager: The AgentManager manages the orchestration of agents.
  4. 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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

agents_manager-1.0.5.tar.gz (9.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

agents_manager-1.0.5-py3-none-any.whl (11.6 kB view details)

Uploaded Python 3

File details

Details for the file agents_manager-1.0.5.tar.gz.

File metadata

  • Download URL: agents_manager-1.0.5.tar.gz
  • Upload date:
  • Size: 9.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for agents_manager-1.0.5.tar.gz
Algorithm Hash digest
SHA256 93cb0549bb33760f042fafb0713d564ab8941fb129244b209397728a7ca2786c
MD5 3cd495d7570a400b1a108c86c85f93c1
BLAKE2b-256 ffa9c977a1c654ab8dace01e081511661d4f5fa815361fb18c08e4898c3ef0e2

See more details on using hashes here.

Provenance

The following attestation bundles were made for agents_manager-1.0.5.tar.gz:

Publisher: publish-to-pypi.yml on sandeshnaroju/agents_manager

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file agents_manager-1.0.5-py3-none-any.whl.

File metadata

  • Download URL: agents_manager-1.0.5-py3-none-any.whl
  • Upload date:
  • Size: 11.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for agents_manager-1.0.5-py3-none-any.whl
Algorithm Hash digest
SHA256 18e39693a469c8d0649094cf73f1d1a9488285d8b25b82ec0e042f54ead47bae
MD5 24e064817c9aa3c80cd3ec7cee4ca9c1
BLAKE2b-256 a98ecf362fd4ff4417bb7f56b4ac673aaa621b694692f2b968bf4d47b8afba2a

See more details on using hashes here.

Provenance

The following attestation bundles were made for agents_manager-1.0.5-py3-none-any.whl:

Publisher: publish-to-pypi.yml on sandeshnaroju/agents_manager

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page