archeai


Namearcheai JSON
Version 0.0.5 PyPI version JSON
download
home_pageNone
SummaryArcheAI is a lightweight Python framework that simplifies AI agent development. Build smarter, more capable agents with ease using ArcheAI's easy tool integration, LLM interaction, and agent orchestration.
upload_time2024-11-14 18:50:05
maintainerNone
docs_urlNone
authorE5Anant (Anant Sharma)
requires_pythonNone
licenseNone
keywords agents archeai archeai multi-agent taskforce python light-weight agent-framework archeai tooluse tools taskforce
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            

<div align="center">

# Welcome to ArcheAI! 🚀

*Building AI agents should feel like assembling a dream team, not wrestling with complex code.*

[![PyPI version](https://badge.fury.io/py/archeai.svg)](https://badge.fury.io/py/archeai)
[![GitHub stars](https://img.shields.io/github/stars/E5Anant/archeAI.svg?style=social&label=Star)](https://github.com/E5Anant/archeAI)
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)

[Documentation](https://github.com/E5Anant/archeAI#readme) | [PyPI Package](https://pypi.org/project/archeai/) | [GitHub Repository](https://github.com/E5Anant/archeAI)

</div>

---

## 🌟 Why ArcheAI?

<div style="background-color: #f0f0f0; padding: 15px; border-radius: 5px;">

ArcheAI is a lightweight Python framework designed to make AI agent development intuitive, flexible, and downright fun! 🎉

> "Another AI agent framework? What makes ArcheAI different?" 🤔

Let's break it down:

1. **Simplicity First** 🧘
   - Strip away unnecessary complexity
   - Clean and elegant API
2. **Unleash Your Creativity** 🎨
   - Modular design for experimentation
   - Support for various LLMs (Gemini, Groq, Cohere, OpenAI, Anthropic)
3. **Power in Collaboration** 🤝
   - TaskForce feature for seamless agent orchestration
4. **Built for Exploration** 🔭
   - Flexible foundation ready to adapt to new technologies

</div>

---

## ⚙️ Installation

Get started with ArcheAI in just one line:

```bash
pip install archeai
```

---

## 📚 Core Concepts

<details open>
<summary><h3>👤 The Agent Class</h3></summary>

The Agent class is the heart of ArcheAI. It represents an individual AI agent within your system.

#### Key Attributes

| Attribute | Description |
|-----------|-------------|
| `llm` | An instance of the LLM (Large Language Model) class that the agent will use for language processing and decision-making. |
| `tools` | A list of `Tool` objects that define the actions the agent can perform. |
| `identity` | A string representing the agent's name or identifier. |
| `description` | A brief description of the agent's role or purpose. |
| `expected_output` | A string describing the expected format or style of the agent's responses. |
| `objective` | The current task or goal that the agent is trying to achieve. |
| `memory` | A boolean value indicating whether the agent should use memory (to retain context from previous interactions). Defaults to `True`. |
| `ask_user` | A boolean value indicating whether the agent should ask the user for input when generating responses. Defaults to `True`. |
| `memory_dir` | The directory where the agent's memory files will be stored. Defaults to `memories`. |
| `max_chat_responses` | The maximum number of previous conversation turns to store in memory. Defaults to `12`. |
| `max_summary_entries` | The maximum number of summary entries to store in memory. Defaults to `3`. |
| `max_iterations` | The maximum number of iterations the agent will attempt to generate a valid response. Defaults to `3`. |
| `check_response_validity` | A boolean value indicating whether the agent should check the validity of the response before it is returned. Defaults to `False`. |
| `allow_full_delegation` | Whether the agent should allow full delegation switching to `True` would give all the previous responses from different agents. Switching to False would only allow the last response, Defaults to `False` |
| `output_file` | The name of the file where the agent's responses will be saved. Defaults to `None`. |
| `verbose` | A boolean value indicating whether the agent should print verbose output during execution. Defaults to `False`. |


#### Methods

- `add_tool(tool)`: Add a new tool to the agent
- `remove_tool(tool_name)`: Remove a tool by name
- `rollout()`: Execute the agent's main workflow

</details>

<details>
<summary><h3>🧰 The Tool Class</h3></summary>

Tools are actions or capabilities that an agent can perform.

```python
from archeai import Tool

def get_weather(city: str):
    """Fetches the current weather for a given city."""
    # Implementation...
    return weather_data

weather_tool = Tool(
    func=get_weather,
    description="Gets the current weather for a specified city.",
    params={'city': {'description': 'The city to check weather for', 'type': 'str', 'default': 'unknown'}}
)
```

#### Key Attributes

| Attribute | Description |
|-----------|-------------|
| `func` | The Python function that defines the tool's action. |
| `name` | The name of the tool (automatically derived from the function name). |
| `description` | A brief description of what the tool does. This is used by the agent to understand the tool's purpose. |
| `returns_value` | A boolean indicating whether the tool returns a value that can be used by other tools or included in the response. Defaults to `True`. |
| `instance` | Optional instance of a class if the tool is a bound method. |
| `llm` | Optional LLM object for more advanced tool interactions (e.g., using the LLM to help determine tool parameters). |
| `verbose` | A boolean indicating whether the tool should print verbose output during execution. Defaults to `False`. |
| `params` | An Optional dictionary containing information about the tool's parameters (automatically extracted if not provided). |

</details>

<details>
<summary><h3>👥 The TaskForce Class</h3></summary>

Manage a group of Agent objects for collaboration and complex workflows.

#### Key Attributes

- `agents`: List of Agent objects in the task force
- `objective`: Overall goal or task for the task force
- `mindmap`: Overall plan or mind map (auto-generated if not provided)

#### Key Methods

- `rollout()`: Starts the task force's execution

<details>
<summary>Workflow Diagram</summary>

![Workflow](https://raw.githubusercontent.com/E5Anant/archeAI/main/assets/WorkFlow.png)

</details>

</details>

---

## 🧑‍🤝‍🧑 Basic Example: Building Your First Team

<div style="background-color: #e6f7ff; padding: 15px; border-radius: 5px;">

```python
from archeai import Agent, Tool, TaskForce
from archeai.llms import Gemini

# Initialize your LLM
llm = Gemini()

# Define tools
def say_hello(name: str):
    return f"Hello there, {name}! 👋"

def calculate(equation: str):
    return eval(equation)

hello_tool = Tool(func=say_hello, 
                  description="Greets the user by name.",
                  params={'name': {'description': 'The name to greet.', 'type': 'str', 'default': 'unknown'}})

calculate_tool = Tool(func=calculate, 
                      description="Evaluates an equation.",
                      params={'equation': {'description': 'The equation to evaluate.', 'type': 'str', 'default': 'unknown'}})

# Create agents
greeter = Agent(llm=llm, 
                tools=[hello_tool], 
                identity="Friendly Greeter",
                memory=False,
                verbose=True)

math_magician = Agent(llm=llm, 
                      tools=[calculate_tool], 
                      identity="Math Magician",
                      memory=False,
                      verbose=True)

# Assemble your task force!
my_taskforce = TaskForce(agents=[greeter, math_magician], 
                         objective="Hi I am Mervin greet me, can you solve 3-4*2*5/4/2.1*6 for me and give a explanation.") 

# Start the interaction
response = my_taskforce.rollout()
print(response)
```

This example demonstrates creating agents with tools and using a TaskForce to manage execution.

</div>

---

## 🧐 Important Questions

<details>
<summary><strong>What is MindMap?</strong></summary>

A mind map is a visual representation of the task force's workflow and goals. It's automatically generated if not provided, helping to organize and structure the collaboration between agents.

</details>

<details>
<summary><strong>What does allow_full_delegation mean?</strong></summary>

The `allow_full_delegation` parameter controls how much information is shared between agents:

- When `False` (default): Only the last response is shared
- When `True`: All previous responses from different agents are shared

This allows for more comprehensive or limited collaboration depending on your needs.

</details>

---

## 🚀 Advanced Features

- **Multi-LLM Support**: Seamlessly switch between different language models
- **Custom Tool Creation**: Easily create and integrate your own tools
- **Memory Management**: Fine-tune agent memory for context retention
- **Response Validation**: Ensure output quality with built-in validation

---

## 📈 Performance and Scalability

ArcheAI is designed for efficiency:

- Lightweight core for minimal overhead
- Asynchronous capabilities for improved performance
- Scalable architecture for complex agent networks

---

<div align="center">

## 🤝 Contributing

We welcome contributions! Please feel free to:

[Open an issue](https://github.com/E5Anant/archeAI/issues)
[Submit a pull request](https://github.com/E5Anant/archeAI/pulls)

Check out our [Contribution Guidelines](https://github.com/E5Anant/archeAI/blob/main/CONTRIBUTING.md) for more information.

## 📄 License

This project is licensed under the [MIT License](https://github.com/E5Anant/archeAI/blob/main/LICENSE).

## ⭐ Don't Forget to Star!

If you find ArcheAI helpful, please give us a star on GitHub!

[![GitHub stars](https://img.shields.io/github/stars/E5Anant/archeAI.svg?style=social&label=Star)](https://github.com/E5Anant/archeAI)

</div>

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "archeai",
    "maintainer": null,
    "docs_url": null,
    "requires_python": null,
    "maintainer_email": null,
    "keywords": "agents, archeai, archeAI, multi-agent, taskforce, python, light-weight, agent-framework, ArcheAI, tooluse, tools, taskforce",
    "author": "E5Anant (Anant Sharma)",
    "author_email": "e5anant2011@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/3c/9d/74622097fa78a858bbfe070d7e8fa21c2ee5f2ed759474b131fd938d1e86/archeai-0.0.5.tar.gz",
    "platform": null,
    "description": "\r\n\r\n<div align=\"center\">\r\n\r\n# Welcome to ArcheAI! \ud83d\ude80\r\n\r\n*Building AI agents should feel like assembling a dream team, not wrestling with complex code.*\r\n\r\n[![PyPI version](https://badge.fury.io/py/archeai.svg)](https://badge.fury.io/py/archeai)\r\n[![GitHub stars](https://img.shields.io/github/stars/E5Anant/archeAI.svg?style=social&label=Star)](https://github.com/E5Anant/archeAI)\r\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)\r\n\r\n[Documentation](https://github.com/E5Anant/archeAI#readme) | [PyPI Package](https://pypi.org/project/archeai/) | [GitHub Repository](https://github.com/E5Anant/archeAI)\r\n\r\n</div>\r\n\r\n---\r\n\r\n## \ud83c\udf1f Why ArcheAI?\r\n\r\n<div style=\"background-color: #f0f0f0; padding: 15px; border-radius: 5px;\">\r\n\r\nArcheAI is a lightweight Python framework designed to make AI agent development intuitive, flexible, and downright fun! \ud83c\udf89\r\n\r\n> \"Another AI agent framework? What makes ArcheAI different?\" \ud83e\udd14\r\n\r\nLet's break it down:\r\n\r\n1. **Simplicity First** \ud83e\uddd8\r\n   - Strip away unnecessary complexity\r\n   - Clean and elegant API\r\n2. **Unleash Your Creativity** \ud83c\udfa8\r\n   - Modular design for experimentation\r\n   - Support for various LLMs (Gemini, Groq, Cohere, OpenAI, Anthropic)\r\n3. **Power in Collaboration** \ud83e\udd1d\r\n   - TaskForce feature for seamless agent orchestration\r\n4. **Built for Exploration** \ud83d\udd2d\r\n   - Flexible foundation ready to adapt to new technologies\r\n\r\n</div>\r\n\r\n---\r\n\r\n## \u2699\ufe0f Installation\r\n\r\nGet started with ArcheAI in just one line:\r\n\r\n```bash\r\npip install archeai\r\n```\r\n\r\n---\r\n\r\n## \ud83d\udcda Core Concepts\r\n\r\n<details open>\r\n<summary><h3>\ud83d\udc64 The Agent Class</h3></summary>\r\n\r\nThe Agent class is the heart of ArcheAI. It represents an individual AI agent within your system.\r\n\r\n#### Key Attributes\r\n\r\n| Attribute | Description |\r\n|-----------|-------------|\r\n| `llm` | An instance of the LLM (Large Language Model) class that the agent will use for language processing and decision-making. |\r\n| `tools` | A list of `Tool` objects that define the actions the agent can perform. |\r\n| `identity` | A string representing the agent's name or identifier. |\r\n| `description` | A brief description of the agent's role or purpose. |\r\n| `expected_output` | A string describing the expected format or style of the agent's responses. |\r\n| `objective` | The current task or goal that the agent is trying to achieve. |\r\n| `memory` | A boolean value indicating whether the agent should use memory (to retain context from previous interactions). Defaults to `True`. |\r\n| `ask_user` | A boolean value indicating whether the agent should ask the user for input when generating responses. Defaults to `True`. |\r\n| `memory_dir` | The directory where the agent's memory files will be stored. Defaults to `memories`. |\r\n| `max_chat_responses` | The maximum number of previous conversation turns to store in memory. Defaults to `12`. |\r\n| `max_summary_entries` | The maximum number of summary entries to store in memory. Defaults to `3`. |\r\n| `max_iterations` | The maximum number of iterations the agent will attempt to generate a valid response. Defaults to `3`. |\r\n| `check_response_validity` | A boolean value indicating whether the agent should check the validity of the response before it is returned. Defaults to `False`. |\r\n| `allow_full_delegation` | Whether the agent should allow full delegation switching to `True` would give all the previous responses from different agents. Switching to False would only allow the last response, Defaults to `False` |\r\n| `output_file` | The name of the file where the agent's responses will be saved. Defaults to `None`. |\r\n| `verbose` | A boolean value indicating whether the agent should print verbose output during execution. Defaults to `False`. |\r\n\r\n\r\n#### Methods\r\n\r\n- `add_tool(tool)`: Add a new tool to the agent\r\n- `remove_tool(tool_name)`: Remove a tool by name\r\n- `rollout()`: Execute the agent's main workflow\r\n\r\n</details>\r\n\r\n<details>\r\n<summary><h3>\ud83e\uddf0 The Tool Class</h3></summary>\r\n\r\nTools are actions or capabilities that an agent can perform.\r\n\r\n```python\r\nfrom archeai import Tool\r\n\r\ndef get_weather(city: str):\r\n    \"\"\"Fetches the current weather for a given city.\"\"\"\r\n    # Implementation...\r\n    return weather_data\r\n\r\nweather_tool = Tool(\r\n    func=get_weather,\r\n    description=\"Gets the current weather for a specified city.\",\r\n    params={'city': {'description': 'The city to check weather for', 'type': 'str', 'default': 'unknown'}}\r\n)\r\n```\r\n\r\n#### Key Attributes\r\n\r\n| Attribute | Description |\r\n|-----------|-------------|\r\n| `func` | The Python function that defines the tool's action. |\r\n| `name` | The name of the tool (automatically derived from the function name). |\r\n| `description` | A brief description of what the tool does. This is used by the agent to understand the tool's purpose. |\r\n| `returns_value` | A boolean indicating whether the tool returns a value that can be used by other tools or included in the response. Defaults to `True`. |\r\n| `instance` | Optional instance of a class if the tool is a bound method. |\r\n| `llm` | Optional LLM object for more advanced tool interactions (e.g., using the LLM to help determine tool parameters). |\r\n| `verbose` | A boolean indicating whether the tool should print verbose output during execution. Defaults to `False`. |\r\n| `params` | An Optional dictionary containing information about the tool's parameters (automatically extracted if not provided). |\r\n\r\n</details>\r\n\r\n<details>\r\n<summary><h3>\ud83d\udc65 The TaskForce Class</h3></summary>\r\n\r\nManage a group of Agent objects for collaboration and complex workflows.\r\n\r\n#### Key Attributes\r\n\r\n- `agents`: List of Agent objects in the task force\r\n- `objective`: Overall goal or task for the task force\r\n- `mindmap`: Overall plan or mind map (auto-generated if not provided)\r\n\r\n#### Key Methods\r\n\r\n- `rollout()`: Starts the task force's execution\r\n\r\n<details>\r\n<summary>Workflow Diagram</summary>\r\n\r\n![Workflow](https://raw.githubusercontent.com/E5Anant/archeAI/main/assets/WorkFlow.png)\r\n\r\n</details>\r\n\r\n</details>\r\n\r\n---\r\n\r\n## \ud83e\uddd1\u200d\ud83e\udd1d\u200d\ud83e\uddd1 Basic Example: Building Your First Team\r\n\r\n<div style=\"background-color: #e6f7ff; padding: 15px; border-radius: 5px;\">\r\n\r\n```python\r\nfrom archeai import Agent, Tool, TaskForce\r\nfrom archeai.llms import Gemini\r\n\r\n# Initialize your LLM\r\nllm = Gemini()\r\n\r\n# Define tools\r\ndef say_hello(name: str):\r\n    return f\"Hello there, {name}! \ud83d\udc4b\"\r\n\r\ndef calculate(equation: str):\r\n    return eval(equation)\r\n\r\nhello_tool = Tool(func=say_hello, \r\n                  description=\"Greets the user by name.\",\r\n                  params={'name': {'description': 'The name to greet.', 'type': 'str', 'default': 'unknown'}})\r\n\r\ncalculate_tool = Tool(func=calculate, \r\n                      description=\"Evaluates an equation.\",\r\n                      params={'equation': {'description': 'The equation to evaluate.', 'type': 'str', 'default': 'unknown'}})\r\n\r\n# Create agents\r\ngreeter = Agent(llm=llm, \r\n                tools=[hello_tool], \r\n                identity=\"Friendly Greeter\",\r\n                memory=False,\r\n                verbose=True)\r\n\r\nmath_magician = Agent(llm=llm, \r\n                      tools=[calculate_tool], \r\n                      identity=\"Math Magician\",\r\n                      memory=False,\r\n                      verbose=True)\r\n\r\n# Assemble your task force!\r\nmy_taskforce = TaskForce(agents=[greeter, math_magician], \r\n                         objective=\"Hi I am Mervin greet me, can you solve 3-4*2*5/4/2.1*6 for me and give a explanation.\") \r\n\r\n# Start the interaction\r\nresponse = my_taskforce.rollout()\r\nprint(response)\r\n```\r\n\r\nThis example demonstrates creating agents with tools and using a TaskForce to manage execution.\r\n\r\n</div>\r\n\r\n---\r\n\r\n## \ud83e\uddd0 Important Questions\r\n\r\n<details>\r\n<summary><strong>What is MindMap?</strong></summary>\r\n\r\nA mind map is a visual representation of the task force's workflow and goals. It's automatically generated if not provided, helping to organize and structure the collaboration between agents.\r\n\r\n</details>\r\n\r\n<details>\r\n<summary><strong>What does allow_full_delegation mean?</strong></summary>\r\n\r\nThe `allow_full_delegation` parameter controls how much information is shared between agents:\r\n\r\n- When `False` (default): Only the last response is shared\r\n- When `True`: All previous responses from different agents are shared\r\n\r\nThis allows for more comprehensive or limited collaboration depending on your needs.\r\n\r\n</details>\r\n\r\n---\r\n\r\n## \ud83d\ude80 Advanced Features\r\n\r\n- **Multi-LLM Support**: Seamlessly switch between different language models\r\n- **Custom Tool Creation**: Easily create and integrate your own tools\r\n- **Memory Management**: Fine-tune agent memory for context retention\r\n- **Response Validation**: Ensure output quality with built-in validation\r\n\r\n---\r\n\r\n## \ud83d\udcc8 Performance and Scalability\r\n\r\nArcheAI is designed for efficiency:\r\n\r\n- Lightweight core for minimal overhead\r\n- Asynchronous capabilities for improved performance\r\n- Scalable architecture for complex agent networks\r\n\r\n---\r\n\r\n<div align=\"center\">\r\n\r\n## \ud83e\udd1d Contributing\r\n\r\nWe welcome contributions! Please feel free to:\r\n\r\n[Open an issue](https://github.com/E5Anant/archeAI/issues)\r\n[Submit a pull request](https://github.com/E5Anant/archeAI/pulls)\r\n\r\nCheck out our [Contribution Guidelines](https://github.com/E5Anant/archeAI/blob/main/CONTRIBUTING.md) for more information.\r\n\r\n## \ud83d\udcc4 License\r\n\r\nThis project is licensed under the [MIT License](https://github.com/E5Anant/archeAI/blob/main/LICENSE).\r\n\r\n## \u2b50 Don't Forget to Star!\r\n\r\nIf you find ArcheAI helpful, please give us a star on GitHub!\r\n\r\n[![GitHub stars](https://img.shields.io/github/stars/E5Anant/archeAI.svg?style=social&label=Star)](https://github.com/E5Anant/archeAI)\r\n\r\n</div>\r\n",
    "bugtrack_url": null,
    "license": null,
    "summary": "ArcheAI is a lightweight Python framework that simplifies AI agent development. Build smarter, more capable agents with ease using ArcheAI's easy tool integration, LLM interaction, and agent orchestration.",
    "version": "0.0.5",
    "project_urls": null,
    "split_keywords": [
        "agents",
        " archeai",
        " archeai",
        " multi-agent",
        " taskforce",
        " python",
        " light-weight",
        " agent-framework",
        " archeai",
        " tooluse",
        " tools",
        " taskforce"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "15fc3f180e5ab03f52b3caa7f93fd1aba20ef052551f24ecff5f1527d07ccf91",
                "md5": "bffa19e2a85b5d24ddfa7f78172d2049",
                "sha256": "514083049b64d63aab6208e1fb9ab3fc4a97455bc8943604cbc57f219e825a12"
            },
            "downloads": -1,
            "filename": "archeai-0.0.5-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "bffa19e2a85b5d24ddfa7f78172d2049",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": null,
            "size": 33844,
            "upload_time": "2024-11-14T18:50:03",
            "upload_time_iso_8601": "2024-11-14T18:50:03.844997Z",
            "url": "https://files.pythonhosted.org/packages/15/fc/3f180e5ab03f52b3caa7f93fd1aba20ef052551f24ecff5f1527d07ccf91/archeai-0.0.5-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "3c9d74622097fa78a858bbfe070d7e8fa21c2ee5f2ed759474b131fd938d1e86",
                "md5": "4b5e511093f4486f0f1c79d7ea97f9f1",
                "sha256": "b331360227e538747e29c9d205a67452ae41c042895db5ddca704e8d4db82358"
            },
            "downloads": -1,
            "filename": "archeai-0.0.5.tar.gz",
            "has_sig": false,
            "md5_digest": "4b5e511093f4486f0f1c79d7ea97f9f1",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 31722,
            "upload_time": "2024-11-14T18:50:05",
            "upload_time_iso_8601": "2024-11-14T18:50:05.127482Z",
            "url": "https://files.pythonhosted.org/packages/3c/9d/74622097fa78a858bbfe070d7e8fa21c2ee5f2ed759474b131fd938d1e86/archeai-0.0.5.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-11-14 18:50:05",
    "github": false,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "lcname": "archeai"
}
        
Elapsed time: 0.38162s