agents-manager


Nameagents-manager JSON
Version 1.1.2 PyPI version JSON
download
home_pageNone
SummaryA 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.
upload_time2025-02-25 18:40:34
maintainerNone
docs_urlNone
authorNone
requires_python>=3.7
licenseMIT
keywords agents multi-agent orchestration ai
VCS
bugtrack_url
requirements annotated-types anthropic anyio backports.tarfile build certifi charset-normalizer distro docutils dotenv exceptiongroup h11 httpcore httpx id idna importlib_metadata jaraco.classes jaraco.context jaraco.functools jiter keyring markdown-it-py mdurl more-itertools nh3 openai packaging pydantic pydantic_core Pygments pyproject_hooks python-dotenv readme_renderer requests requests-toolbelt rfc3986 rich sniffio tomli tqdm twine typing_extensions urllib3 zipp
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # 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
- Llama

```python

from agents_manager.models import OpenAi, Grok, DeepSeek, Anthropic, Llama

```

## Installation

Install the package via pip:

```sh
pip install agents-manager
```

## Quick Start

```python
from agents_manager import Agent, AgentManager
from agents_manager.models import OpenAi, Grok, DeepSeek, Anthropic, Llama

from dotenv import load_dotenv

load_dotenv()

# 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,
#     )

# Define the Llama model
# model = Llama(name="llama3.1-70b")

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


            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "agents-manager",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.7",
    "maintainer_email": null,
    "keywords": "agents, multi-agent, orchestration, AI",
    "author": null,
    "author_email": "Naroju Sandesh <sandeshnaroju@gmail.com>",
    "download_url": "https://files.pythonhosted.org/packages/c1/67/3303b05102d3b7dc9fdf03b750e575058b2df5d2790fcf50dbe5bfc443e9/agents_manager-1.1.2.tar.gz",
    "platform": null,
    "description": "# Agents Manager\n\nA 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.\n\n## Features\n\n- Define agents with specific roles and instructions\n- Assign models to agents (e.g., OpenAI models)\n- Equip agents with tools for performing tasks\n- Seamlessly orchestrate interactions between multiple agents\n\n## Supported Models\n\n- OpenAI\n- Grok\n- DeepSeek\n- Anthropic\n- Llama\n\n```python\n\nfrom agents_manager.models import OpenAi, Grok, DeepSeek, Anthropic, Llama\n\n```\n\n## Installation\n\nInstall the package via pip:\n\n```sh\npip install agents-manager\n```\n\n## Quick Start\n\n```python\nfrom agents_manager import Agent, AgentManager\nfrom agents_manager.models import OpenAi, Grok, DeepSeek, Anthropic, Llama\n\nfrom dotenv import load_dotenv\n\nload_dotenv()\n\n# Define the OpenAi model\nmodel = OpenAi(name=\"gpt-4o-mini\")\n\n\n# Define the Grok model\n# model = Grok(name=\"grok-2-latest\")\n\n\n# Define the DeepSeek model\n# model = DeepSeek(name=\"deepseek-chat\")\n\n\n# Define the Anthropic model\n# model = Anthropic(\n#         name=\"claude-3-5-sonnet-20241022\",\n#         max_tokens= 1024,\n#         stream=True,\n#     )\n\n# Define the Llama model\n# model = Llama(name=\"llama3.1-70b\")\n\ndef multiply(a: int, b: int) -> int:\n    \"\"\"\n    Multiply two numbers.\n    \"\"\"\n    return a * b\n\n\ndef transfer_to_agent_3_for_math_calculation() -> Agent:\n    \"\"\"\n    Transfer to agent 3 for math calculation.\n    \"\"\"\n    return agent3\n\n\ndef transfer_to_agent_2_for_math_calculation() -> Agent:\n    \"\"\"\n    Transfer to agent 2 for math calculation.\n    \"\"\"\n    return agent2\n\n# Define agents\nagent3 = Agent(\n    name=\"agent3\",\n    instruction=\"You are a maths teacher, explain properly how you calculated the answer.\",\n    model=model,\n    tools=[multiply]\n)\n\nagent2 = Agent(\n    name=\"agent2\",\n    instruction=\"You are a maths calculator bro\",\n    model=model,\n    tools=[transfer_to_agent_3_for_math_calculation]\n)\n\nagent1 = Agent(\n    name=\"agent1\",\n    instruction=\"You are a helpful assistant\",\n    model=model,\n    tools=[transfer_to_agent_2_for_math_calculation]\n)\n\n# Initialize Agent Manager and run agent\nagent_manager = AgentManager()\nagent_manager.add_agent(agent1)\n\nresponse = agent_manager.run_agent(\"agent1\", \"What is 459 * 1?\")\n\nprint(response)\n```\n\n## How It Works\n\n1. **Define Agents**: Each agent has a name, a specific role (instruction), and a model.\n2. **Assign Tools**: Agents can be assigned tools (functions) to perform tasks.\n3. **Create an Agent Manager**: The `AgentManager` manages the orchestration of agents.\n4. **Run an Agent**: Start an agent to process a request and interact with other agents as needed.\n\n## Use Cases\n\n- AI-powered automation systems\n- Multi-agent chatbots\n- Complex workflow orchestration\n- Research on AI agent collaboration\n\n## Contributing\n\nContributions are welcome! Feel free to submit issues and pull requests.\n\n## License\n\nMIT License\n\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "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.",
    "version": "1.1.2",
    "project_urls": {
        "Homepage": "https://github.com/sandeshnaroju/agents_manager",
        "Repository": "https://github.com/sandeshnaroju/agents_manager"
    },
    "split_keywords": [
        "agents",
        " multi-agent",
        " orchestration",
        " ai"
    ],
    "urls": [
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "ce8ee914b90ea20071dd995bfe07e30a0d16a0d62f2dbab42f963b8d6ea01f99",
                "md5": "04403c9e433869ee405bfd80d419a5e1",
                "sha256": "7f993421f696b12f68ba38d0d0af6d826b7fa6c620effb804edfe3ffb7cf6ca7"
            },
            "downloads": -1,
            "filename": "agents_manager-1.1.2-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "04403c9e433869ee405bfd80d419a5e1",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.7",
            "size": 14456,
            "upload_time": "2025-02-25T18:40:32",
            "upload_time_iso_8601": "2025-02-25T18:40:32.943718Z",
            "url": "https://files.pythonhosted.org/packages/ce/8e/e914b90ea20071dd995bfe07e30a0d16a0d62f2dbab42f963b8d6ea01f99/agents_manager-1.1.2-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "c1673303b05102d3b7dc9fdf03b750e575058b2df5d2790fcf50dbe5bfc443e9",
                "md5": "5daf9459fc6630d357cc90b7f21d97d5",
                "sha256": "a03eefb92e63ac2a682ade41fd441490d3dc72b68b05785d9f4588a5d36177fc"
            },
            "downloads": -1,
            "filename": "agents_manager-1.1.2.tar.gz",
            "has_sig": false,
            "md5_digest": "5daf9459fc6630d357cc90b7f21d97d5",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.7",
            "size": 10995,
            "upload_time": "2025-02-25T18:40:34",
            "upload_time_iso_8601": "2025-02-25T18:40:34.319190Z",
            "url": "https://files.pythonhosted.org/packages/c1/67/3303b05102d3b7dc9fdf03b750e575058b2df5d2790fcf50dbe5bfc443e9/agents_manager-1.1.2.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-02-25 18:40:34",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "sandeshnaroju",
    "github_project": "agents_manager",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "requirements": [
        {
            "name": "annotated-types",
            "specs": [
                [
                    "==",
                    "0.7.0"
                ]
            ]
        },
        {
            "name": "anthropic",
            "specs": [
                [
                    "==",
                    "0.47.1"
                ]
            ]
        },
        {
            "name": "anyio",
            "specs": [
                [
                    "==",
                    "4.8.0"
                ]
            ]
        },
        {
            "name": "backports.tarfile",
            "specs": [
                [
                    "==",
                    "1.2.0"
                ]
            ]
        },
        {
            "name": "build",
            "specs": [
                [
                    "==",
                    "1.2.2.post1"
                ]
            ]
        },
        {
            "name": "certifi",
            "specs": [
                [
                    "==",
                    "2025.1.31"
                ]
            ]
        },
        {
            "name": "charset-normalizer",
            "specs": [
                [
                    "==",
                    "3.4.1"
                ]
            ]
        },
        {
            "name": "distro",
            "specs": [
                [
                    "==",
                    "1.9.0"
                ]
            ]
        },
        {
            "name": "docutils",
            "specs": [
                [
                    "==",
                    "0.21.2"
                ]
            ]
        },
        {
            "name": "dotenv",
            "specs": [
                [
                    "==",
                    "0.9.9"
                ]
            ]
        },
        {
            "name": "exceptiongroup",
            "specs": [
                [
                    "==",
                    "1.2.2"
                ]
            ]
        },
        {
            "name": "h11",
            "specs": [
                [
                    "==",
                    "0.14.0"
                ]
            ]
        },
        {
            "name": "httpcore",
            "specs": [
                [
                    "==",
                    "1.0.7"
                ]
            ]
        },
        {
            "name": "httpx",
            "specs": [
                [
                    "==",
                    "0.28.1"
                ]
            ]
        },
        {
            "name": "id",
            "specs": [
                [
                    "==",
                    "1.5.0"
                ]
            ]
        },
        {
            "name": "idna",
            "specs": [
                [
                    "==",
                    "3.10"
                ]
            ]
        },
        {
            "name": "importlib_metadata",
            "specs": [
                [
                    "==",
                    "8.6.1"
                ]
            ]
        },
        {
            "name": "jaraco.classes",
            "specs": [
                [
                    "==",
                    "3.4.0"
                ]
            ]
        },
        {
            "name": "jaraco.context",
            "specs": [
                [
                    "==",
                    "6.0.1"
                ]
            ]
        },
        {
            "name": "jaraco.functools",
            "specs": [
                [
                    "==",
                    "4.1.0"
                ]
            ]
        },
        {
            "name": "jiter",
            "specs": [
                [
                    "==",
                    "0.8.2"
                ]
            ]
        },
        {
            "name": "keyring",
            "specs": [
                [
                    "==",
                    "25.6.0"
                ]
            ]
        },
        {
            "name": "markdown-it-py",
            "specs": [
                [
                    "==",
                    "3.0.0"
                ]
            ]
        },
        {
            "name": "mdurl",
            "specs": [
                [
                    "==",
                    "0.1.2"
                ]
            ]
        },
        {
            "name": "more-itertools",
            "specs": [
                [
                    "==",
                    "10.6.0"
                ]
            ]
        },
        {
            "name": "nh3",
            "specs": [
                [
                    "==",
                    "0.2.20"
                ]
            ]
        },
        {
            "name": "openai",
            "specs": [
                [
                    "==",
                    "1.63.2"
                ]
            ]
        },
        {
            "name": "packaging",
            "specs": [
                [
                    "==",
                    "24.2"
                ]
            ]
        },
        {
            "name": "pydantic",
            "specs": [
                [
                    "==",
                    "2.10.6"
                ]
            ]
        },
        {
            "name": "pydantic_core",
            "specs": [
                [
                    "==",
                    "2.27.2"
                ]
            ]
        },
        {
            "name": "Pygments",
            "specs": [
                [
                    "==",
                    "2.19.1"
                ]
            ]
        },
        {
            "name": "pyproject_hooks",
            "specs": [
                [
                    "==",
                    "1.2.0"
                ]
            ]
        },
        {
            "name": "python-dotenv",
            "specs": [
                [
                    "==",
                    "1.0.1"
                ]
            ]
        },
        {
            "name": "readme_renderer",
            "specs": [
                [
                    "==",
                    "44.0"
                ]
            ]
        },
        {
            "name": "requests",
            "specs": [
                [
                    "==",
                    "2.32.3"
                ]
            ]
        },
        {
            "name": "requests-toolbelt",
            "specs": [
                [
                    "==",
                    "1.0.0"
                ]
            ]
        },
        {
            "name": "rfc3986",
            "specs": [
                [
                    "==",
                    "2.0.0"
                ]
            ]
        },
        {
            "name": "rich",
            "specs": [
                [
                    "==",
                    "13.9.4"
                ]
            ]
        },
        {
            "name": "sniffio",
            "specs": [
                [
                    "==",
                    "1.3.1"
                ]
            ]
        },
        {
            "name": "tomli",
            "specs": [
                [
                    "==",
                    "2.2.1"
                ]
            ]
        },
        {
            "name": "tqdm",
            "specs": [
                [
                    "==",
                    "4.67.1"
                ]
            ]
        },
        {
            "name": "twine",
            "specs": [
                [
                    "==",
                    "6.1.0"
                ]
            ]
        },
        {
            "name": "typing_extensions",
            "specs": [
                [
                    "==",
                    "4.12.2"
                ]
            ]
        },
        {
            "name": "urllib3",
            "specs": [
                [
                    "==",
                    "2.3.0"
                ]
            ]
        },
        {
            "name": "zipp",
            "specs": [
                [
                    "==",
                    "3.21.0"
                ]
            ]
        }
    ],
    "lcname": "agents-manager"
}
        
Elapsed time: 0.55220s