primisai


Nameprimisai JSON
Version 0.3.0 PyPI version JSON
download
home_pageNone
SummaryNexus is a powerful and flexible Python package for managing AI agents and coordinating complex tasks using LLMs.
upload_time2024-12-06 01:25:06
maintainerNone
docs_urlNone
authorNone
requires_python>=3.10
licenseMIT
keywords ai llm framework ai agents
VCS
bugtrack_url
requirements openai python-dotenv streamlit pytest
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # PrimisAI Nexus

![Continuous Delivery](https://github.com/PrimisAI/nexus/actions/workflows/cd.yaml/badge.svg) ![PyPI - Version](https://img.shields.io/pypi/v/primisai)
 ![Python Version from PEP 621 TOML](https://img.shields.io/python/required-version-toml?tomlFilePath=https%3A%2F%2Fraw.githubusercontent.com%2FPrimisAI%2Fnexus%2Fmain%2Fpyproject.toml)


PrimisAI Nexus is a powerful and flexible Python package for managing AI agents and coordinating complex tasks using LLMs. It provides a robust framework for creating, managing, and interacting with multiple specialized AI agents under the supervision of a central coordinator.

## Features

- **AI Base Class**: A foundational class for AI interactions.
- **Agent Class**: Extends the AI base class with additional features for specialized tasks.
- **Supervisor Class**: Manages multiple agents, coordinates tasks, and handles user interactions.
- **Debugger Utility**: Integrated debugging capabilities for logging and troubleshooting.
- **Flexible Configuration**: Easy-to-use configuration options for language models and agents.
- **Interactive Sessions**: Built-in support for interactive chat sessions with the AI system.

## Installation

You can install PrimisAI Nexus directly from PyPI using pip:

```bash
pip install primisai
```

### Building from Source

If you prefer to build the package from source, clone the repository and install it with pip:

```bash
git clone git@github.com:PrimisAI/nexus.git
cd nexus
pip install -e .
```

## Quick Start

Here's a simple example to get you started with Nexus:

```python
from primisai.nexus.core import AI, Agent, Supervisor
from primisai.nexus.utils.debugger import Debugger

# Configure your OpenAI API key
llm_config = {
    "api_key": "your-api-key-here",
    "model": "gpt-4o",
    "base_url": "https://api.openai.com/v1",
}

# Create a supervisor
supervisor = Supervisor("MainSupervisor", llm_config)

# Create and register agents
agent1 = Agent("Agent1", llm_config, system_message="You are a helpful assistant.")
agent2 = Agent("Agent2", llm_config, system_message="You are a creative writer.")

supervisor.register_agent(agent1)
supervisor.register_agent(agent2)

# Start an interactive session
supervisor.display_agent_graph()
supervisor.start_interactive_session()
```

## Documentation

For detailed documentation on each module and class, please refer to the inline docstrings in the source code.


## Advanced Usage

PrimisAI Nexus allows for complex interactions between multiple agents. You can create specialized agents for different tasks, register them with a supervisor, and let the supervisor manage the flow of information and task delegation.

```python
# Example of creating a specialized agent with tools
tools = [
    {
        "metadata": {
            "name": "search_tool",
            "description": "Searches the internet for information"
        },
        "tool": some_search_function
    }
]

research_agent = Agent("Researcher", llm_config, tools=tools, system_message="You are a research assistant.", use_tools=True)
supervisor.register_agent(research_agent)
```

## License

This project is licensed under the MIT License.

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "primisai",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.10",
    "maintainer_email": null,
    "keywords": "AI, LLM, framework, AI agents",
    "author": null,
    "author_email": "PrimisAI <info@primis.ai>",
    "download_url": "https://files.pythonhosted.org/packages/0d/c2/5a65708aa7e9fcbb0c94a64b1f8ae9b498342e2c1d9adef983da7d44101c/primisai-0.3.0.tar.gz",
    "platform": null,
    "description": "# PrimisAI Nexus\n\n![Continuous Delivery](https://github.com/PrimisAI/nexus/actions/workflows/cd.yaml/badge.svg) ![PyPI - Version](https://img.shields.io/pypi/v/primisai)\n ![Python Version from PEP 621 TOML](https://img.shields.io/python/required-version-toml?tomlFilePath=https%3A%2F%2Fraw.githubusercontent.com%2FPrimisAI%2Fnexus%2Fmain%2Fpyproject.toml)\n\n\nPrimisAI Nexus is a powerful and flexible Python package for managing AI agents and coordinating complex tasks using LLMs. It provides a robust framework for creating, managing, and interacting with multiple specialized AI agents under the supervision of a central coordinator.\n\n## Features\n\n- **AI Base Class**: A foundational class for AI interactions.\n- **Agent Class**: Extends the AI base class with additional features for specialized tasks.\n- **Supervisor Class**: Manages multiple agents, coordinates tasks, and handles user interactions.\n- **Debugger Utility**: Integrated debugging capabilities for logging and troubleshooting.\n- **Flexible Configuration**: Easy-to-use configuration options for language models and agents.\n- **Interactive Sessions**: Built-in support for interactive chat sessions with the AI system.\n\n## Installation\n\nYou can install PrimisAI Nexus directly from PyPI using pip:\n\n```bash\npip install primisai\n```\n\n### Building from Source\n\nIf you prefer to build the package from source, clone the repository and install it with pip:\n\n```bash\ngit clone git@github.com:PrimisAI/nexus.git\ncd nexus\npip install -e .\n```\n\n## Quick Start\n\nHere's a simple example to get you started with Nexus:\n\n```python\nfrom primisai.nexus.core import AI, Agent, Supervisor\nfrom primisai.nexus.utils.debugger import Debugger\n\n# Configure your OpenAI API key\nllm_config = {\n    \"api_key\": \"your-api-key-here\",\n    \"model\": \"gpt-4o\",\n    \"base_url\": \"https://api.openai.com/v1\",\n}\n\n# Create a supervisor\nsupervisor = Supervisor(\"MainSupervisor\", llm_config)\n\n# Create and register agents\nagent1 = Agent(\"Agent1\", llm_config, system_message=\"You are a helpful assistant.\")\nagent2 = Agent(\"Agent2\", llm_config, system_message=\"You are a creative writer.\")\n\nsupervisor.register_agent(agent1)\nsupervisor.register_agent(agent2)\n\n# Start an interactive session\nsupervisor.display_agent_graph()\nsupervisor.start_interactive_session()\n```\n\n## Documentation\n\nFor detailed documentation on each module and class, please refer to the inline docstrings in the source code.\n\n\n## Advanced Usage\n\nPrimisAI Nexus allows for complex interactions between multiple agents. You can create specialized agents for different tasks, register them with a supervisor, and let the supervisor manage the flow of information and task delegation.\n\n```python\n# Example of creating a specialized agent with tools\ntools = [\n    {\n        \"metadata\": {\n            \"name\": \"search_tool\",\n            \"description\": \"Searches the internet for information\"\n        },\n        \"tool\": some_search_function\n    }\n]\n\nresearch_agent = Agent(\"Researcher\", llm_config, tools=tools, system_message=\"You are a research assistant.\", use_tools=True)\nsupervisor.register_agent(research_agent)\n```\n\n## License\n\nThis project is licensed under the MIT License.\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "Nexus is a powerful and flexible Python package for managing AI agents and coordinating complex tasks using LLMs.",
    "version": "0.3.0",
    "project_urls": {
        "changelog": "https://github.com/PrimisAI/nexus/blob/main/CHANGELOG.md",
        "homepage": "https://github.com/PrimisAI/nexus",
        "issues": "https://github.com/PrimisAI/nexus/issues",
        "repository": "https://github.com/PrimisAI/nexus.git"
    },
    "split_keywords": [
        "ai",
        " llm",
        " framework",
        " ai agents"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "cb0b7699da39356f00e336086b4723aad5c94514f21ddf44aac1b7294e640cde",
                "md5": "a990fe80849d3d6c651edbdbfb06b31b",
                "sha256": "e90e8ebf5d2150612d501581d946f454f6d631108f4b147f09292c7fcae68e25"
            },
            "downloads": -1,
            "filename": "primisai-0.3.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "a990fe80849d3d6c651edbdbfb06b31b",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.10",
            "size": 16835,
            "upload_time": "2024-12-06T01:25:04",
            "upload_time_iso_8601": "2024-12-06T01:25:04.990430Z",
            "url": "https://files.pythonhosted.org/packages/cb/0b/7699da39356f00e336086b4723aad5c94514f21ddf44aac1b7294e640cde/primisai-0.3.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "0dc25a65708aa7e9fcbb0c94a64b1f8ae9b498342e2c1d9adef983da7d44101c",
                "md5": "ad904451b916c704f46ff6d814094041",
                "sha256": "e3b6217d5259e1c23c0b16b21791a20305abbbb8efc670743539557d8e3295fa"
            },
            "downloads": -1,
            "filename": "primisai-0.3.0.tar.gz",
            "has_sig": false,
            "md5_digest": "ad904451b916c704f46ff6d814094041",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.10",
            "size": 14318,
            "upload_time": "2024-12-06T01:25:06",
            "upload_time_iso_8601": "2024-12-06T01:25:06.686073Z",
            "url": "https://files.pythonhosted.org/packages/0d/c2/5a65708aa7e9fcbb0c94a64b1f8ae9b498342e2c1d9adef983da7d44101c/primisai-0.3.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-12-06 01:25:06",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "PrimisAI",
    "github_project": "nexus",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "requirements": [
        {
            "name": "openai",
            "specs": [
                [
                    "==",
                    "1.56.0"
                ]
            ]
        },
        {
            "name": "python-dotenv",
            "specs": [
                [
                    "==",
                    "1.0.1"
                ]
            ]
        },
        {
            "name": "streamlit",
            "specs": [
                [
                    ">=",
                    "1.38.0"
                ]
            ]
        },
        {
            "name": "pytest",
            "specs": [
                [
                    "==",
                    "8.3.4"
                ]
            ]
        }
    ],
    "lcname": "primisai"
}
        
Elapsed time: 0.48825s