archeai


Namearcheai JSON
Version 0.0.7 PyPI version JSON
download
home_pageNone
SummaryArcheAI is a lightweight and scalable Python agent 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_time2025-01-05 17:32:58
maintainerNone
docs_urlNone
authorE5Anant (Anant Sharma)
requires_pythonNone
licenseNone
keywords agents archeai archeai multi-agent taskforce python light-weight agent-framework framework
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://img.shields.io/badge/archeai-0.0.6-mediumgreen)

[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)

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



[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

5. **large-scale AI agent networks** 🌐

   - Scalable architecture for complex workflows



</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. |

| `ask_user` | A boolean value indicating whether the agent should ask the user for input when generating responses. Defaults to `True`. |

| `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`. |

| `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

- `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

- `caching_dir`: Directory to store cached responses



#### Key Methods



- `start_force()`: Begin the task force's workflow

- `execute_agent(agent, prompt)`: Execute a specific agent's workflow

- `record_result(agent)`: Save the result of an agent's workflow

- `exit_force()`: End the task force's workflow also delete the cache



<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",

                verbose=True)



math_magician = Agent(llm=llm, 

                      tools=[calculate_tool], 

                      identity="Math Magician",

                      verbose=True)



# Assemble your task force!

force = TaskForce(agents=[greeter, math_magician], caching_dir='cache')

force.start_force()

force.execute_agent(greeter, "Hi I am mervin")

force.execute_agent(math_magician, "2+2")

force.exit_force()

```



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



</div>



---



## 🧐 Important Questions



<details>

<summary><strong>What does `record_result` func do?</strong></summary>



The `record_result` function is used to save the result of an agent's workflow. This can be useful for passing one agent's response to another.



This concludes in the scalability and simplicity of the architecture.



</details>



---



## 🚀 Advanced Features



- **Multi-LLM Support**: Seamlessly switch between different language models

- **Custom Tool Creation**: Easily create and integrate your own tools

- **Response Validation**: Ensure output quality with built-in validation

- **Easy Passing of Information**: Share information between agents with ease using the `record_result` function

- **Scalable Architecture**: Build large-scale AI agent networks with the TaskForce class

---



## 📈 Performance and Scalability



ArcheAI is designed for efficiency:



- Lightweight core for minimal overhead

- Scalable architecture for complex agent networks



---



<details>

<summary>Actual Use Case:</summary>



```python

from archeai.llms import Gemini

from archeai import Agent, Tool, TaskForce

from archeai.tools import get_current_time, web_search

import os



def list_dir():

    """Returns a list of items in the current working directory."""



    try:

        items = os.listdir()

        return items

    except OSError as e:

        print(f"Error listing directory: {e}")

        return []

def write_to_file(filename:str, content:str):

    """Writes the given content to a file with the specified filename.



    Args:

        filename (str): The name of the file to write to.

        content (str): The content to write to the file.

    """



    try:

        with open(filename, 'w') as f:

            f.write(content)

        print(f"Successfully wrote to '{filename}'")

    except OSError as e:

        print(f"Error writing to file: {e}")



def gcd(a:int, b:int):

    """

    Calculate the Greatest Common Divisor (GCD) of two numbers using the Euclidean algorithm.



    Parameters:

    a (int): The first number.

    b (int): The second number.



    Returns:

    int: The GCD of the two numbers.

    """

    while b:

        a, b = b, a % b

    return a+b



llm_instance = Gemini()



# Define the tools using the OwnTool class

write_tool = Tool(

    func=write_to_file,

    description="Writes the given content to a file to the given filename in dir",

    returns_value=False,

    llm = llm_instance,

    verbose=True

)



list_tool = Tool(

    func=list_dir,

    description="Provides the list of files and folders in current working dir.",

    returns_value=True,

    llm = llm_instance,

    verbose=True

)



time_tool = Tool(

    func=get_current_time,

    description="Provides the current time.",

    returns_value=True,

    llm = llm_instance,

    verbose=True

)



web_tool = Tool(

    func=web_search,

    description="Provides web search result on the given query.",

    returns_value=True,

    llm = llm_instance,

    verbose=True

)



# Initialize the language model instance



content_saver = Agent(

        llm=llm_instance,

        identity="content_saver",

        tools=[write_tool],

        verbose=True,

        description="A content saver which can save any content in markdown format to a given file.",

        expected_output="In markdown format",

)



researcher = Agent(

        llm=llm_instance,

        identity="researcher",

        tools=[time_tool, web_tool],

        description="A researcher having access to web and can get info about any topic.",

        expected_output="A summary of the research",

        verbose=True,

                )



writer = Agent(

        llm=llm_instance,

        identity="writer",

        tools=[],

        description="A writer which can write on any topic with information.",

        expected_output="In markdown format",

        verbose=True,

                )



# Define the task force

task_force = TaskForce(

    agents=[content_saver, researcher, writer],

    caching_dir="cache",

)



# Run the task force

task_force.start_force()

task_force.execute_agent(researcher, "What are wormholes?")

researcher_result = task_force.record_result(researcher)

print(researcher_result)

task_force.execute_agent(writer, f"Write an article on wormholes. Here is the information: {researcher_result}")

writer_result = task_force.record_result(writer)

task_force.execute_agent(content_saver, f"Save this information in wormholes.md: {writer_result}")

task_force.exit_force()



```



The Tools used from archeai in the use case are totally experimental and are not recommended to use.



</details>



<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)](



</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, framework",
    "author": "E5Anant (Anant Sharma)",
    "author_email": "e5anant2011@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/87/fa/18ae14df56e094fa192d9283b4ef0ffe54c40220924dc25f3be0d0b26d5e/archeai-0.0.7.tar.gz",
    "platform": null,
    "description": "\r\n\r\n\r\n\r\n\r\n<div align=\"center\">\r\n\r\n\r\n\r\n# Welcome to ArcheAI! \ud83d\ude80\r\n\r\n\r\n\r\n*Building AI agents should feel like assembling a dream team, not wrestling with complex code.*\r\n\r\n\r\n\r\n![Pypi Version](https://img.shields.io/badge/archeai-0.0.6-mediumgreen)\r\n\r\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)\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\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\r\n\r\n</div>\r\n\r\n\r\n\r\n---\r\n\r\n\r\n\r\n## \ud83c\udf1f Why ArcheAI?\r\n\r\n\r\n\r\n<div style=\"background-color: #f0f0f0; padding: 15px; border-radius: 5px;\">\r\n\r\n\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\r\n\r\n> \"Another AI agent framework? What makes ArcheAI different?\" \ud83e\udd14\r\n\r\n\r\n\r\nLet's break it down:\r\n\r\n\r\n\r\n1. **Simplicity First** \ud83e\uddd8\r\n\r\n   - Strip away unnecessary complexity\r\n\r\n   - Clean and elegant API\r\n\r\n2. **Unleash Your Creativity** \ud83c\udfa8\r\n\r\n   - Modular design for experimentation\r\n\r\n   - Support for various LLMs (Gemini, Groq, Cohere, OpenAI, Anthropic)\r\n\r\n3. **Power in Collaboration** \ud83e\udd1d\r\n\r\n   - TaskForce feature for seamless agent orchestration\r\n\r\n4. **Built for Exploration** \ud83d\udd2d\r\n\r\n   - Flexible foundation ready to adapt to new technologies\r\n\r\n5. **large-scale AI agent networks** \ud83c\udf10\r\n\r\n   - Scalable architecture for complex workflows\r\n\r\n\r\n\r\n</div>\r\n\r\n\r\n\r\n---\r\n\r\n\r\n\r\n## \u2699\ufe0f Installation\r\n\r\n\r\n\r\nGet started with ArcheAI in just one line:\r\n\r\n\r\n\r\n```bash\r\n\r\npip install archeai\r\n\r\n```\r\n\r\n\r\n\r\n---\r\n\r\n\r\n\r\n## \ud83d\udcda Core Concepts\r\n\r\n\r\n\r\n<details open>\r\n\r\n<summary><h3>\ud83d\udc64 The Agent Class</h3></summary>\r\n\r\n\r\n\r\nThe Agent class is the heart of ArcheAI. It represents an individual AI agent within your system.\r\n\r\n\r\n\r\n#### Key Attributes\r\n\r\n\r\n\r\n| Attribute | Description |\r\n\r\n|-----------|-------------|\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\r\n| `tools` | A list of `Tool` objects that define the actions the agent can perform. |\r\n\r\n| `identity` | A string representing the agent's name or identifier. |\r\n\r\n| `description` | A brief description of the agent's role or purpose. |\r\n\r\n| `expected_output` | A string describing the expected format or style of the agent's responses. |\r\n\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\r\n| `max_iterations` | The maximum number of iterations the agent will attempt to generate a valid response. Defaults to `3`. |\r\n\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\r\n| `output_file` | The name of the file where the agent's responses will be saved. Defaults to `None`. |\r\n\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\r\n\r\n\r\n#### Methods\r\n\r\n- `rollout()`: Execute the agent's main workflow\r\n\r\n\r\n\r\n</details>\r\n\r\n\r\n\r\n<details>\r\n\r\n<summary><h3>\ud83e\uddf0 The Tool Class</h3></summary>\r\n\r\n\r\n\r\nTools are actions or capabilities that an agent can perform.\r\n\r\n\r\n\r\n```python\r\n\r\nfrom archeai import Tool\r\n\r\n\r\n\r\ndef get_weather(city: str):\r\n\r\n    \"\"\"Fetches the current weather for a given city.\"\"\"\r\n\r\n    # Implementation...\r\n\r\n    return weather_data\r\n\r\n\r\n\r\nweather_tool = Tool(\r\n\r\n    func=get_weather,\r\n\r\n    description=\"Gets the current weather for a specified city.\",\r\n\r\n    params={'city': {'description': 'The city to check weather for', 'type': 'str', 'default': 'unknown'}}\r\n\r\n)\r\n\r\n```\r\n\r\n\r\n\r\n#### Key Attributes\r\n\r\n\r\n\r\n| Attribute | Description |\r\n\r\n|-----------|-------------|\r\n\r\n| `func` | The Python function that defines the tool's action. |\r\n\r\n| `name` | The name of the tool (automatically derived from the function name). |\r\n\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\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\r\n| `instance` | Optional instance of a class if the tool is a bound method. |\r\n\r\n| `llm` | Optional LLM object for more advanced tool interactions (e.g., using the LLM to help determine tool parameters). |\r\n\r\n| `verbose` | A boolean indicating whether the tool should print verbose output during execution. Defaults to `False`. |\r\n\r\n| `params` | An Optional dictionary containing information about the tool's parameters (automatically extracted if not provided). |\r\n\r\n\r\n\r\n</details>\r\n\r\n\r\n\r\n<details>\r\n\r\n<summary><h3>\ud83d\udc65 The TaskForce Class</h3></summary>\r\n\r\n\r\n\r\nManage a group of Agent objects for collaboration and complex workflows.\r\n\r\n\r\n\r\n#### Key Attributes\r\n\r\n\r\n\r\n- `agents`: List of Agent objects in the task force\r\n\r\n- `caching_dir`: Directory to store cached responses\r\n\r\n\r\n\r\n#### Key Methods\r\n\r\n\r\n\r\n- `start_force()`: Begin the task force's workflow\r\n\r\n- `execute_agent(agent, prompt)`: Execute a specific agent's workflow\r\n\r\n- `record_result(agent)`: Save the result of an agent's workflow\r\n\r\n- `exit_force()`: End the task force's workflow also delete the cache\r\n\r\n\r\n\r\n<details>\r\n\r\n<summary>Workflow Diagram</summary>\r\n\r\n\r\n\r\n![Workflow](https://raw.githubusercontent.com/E5Anant/archeAI/main/assets/WorkFlow.png)\r\n\r\n\r\n\r\n</details>\r\n\r\n\r\n\r\n</details>\r\n\r\n\r\n\r\n---\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\r\n\r\n<div style=\"background-color: #e6f7ff; padding: 15px; border-radius: 5px;\">\r\n\r\n\r\n\r\n```python\r\n\r\nfrom archeai import Agent, Tool, TaskForce\r\n\r\nfrom archeai.llms import Gemini\r\n\r\n\r\n\r\n# Initialize your LLM\r\n\r\nllm = Gemini()\r\n\r\n\r\n\r\n# Define tools\r\n\r\ndef say_hello(name: str):\r\n\r\n    return f\"Hello there, {name}! \ud83d\udc4b\"\r\n\r\n\r\n\r\ndef calculate(equation: str):\r\n\r\n    return eval(equation)\r\n\r\n\r\n\r\nhello_tool = Tool(func=say_hello, \r\n\r\n                  description=\"Greets the user by name.\",\r\n\r\n                  params={'name': {'description': 'The name to greet.', 'type': 'str', 'default': 'unknown'}})\r\n\r\n\r\n\r\ncalculate_tool = Tool(func=calculate, \r\n\r\n                      description=\"Evaluates an equation.\",\r\n\r\n                      params={'equation': {'description': 'The equation to evaluate.', 'type': 'str', 'default': 'unknown'}})\r\n\r\n\r\n\r\n# Create agents\r\n\r\ngreeter = Agent(llm=llm, \r\n\r\n                tools=[hello_tool], \r\n\r\n                identity=\"Friendly Greeter\",\r\n\r\n                verbose=True)\r\n\r\n\r\n\r\nmath_magician = Agent(llm=llm, \r\n\r\n                      tools=[calculate_tool], \r\n\r\n                      identity=\"Math Magician\",\r\n\r\n                      verbose=True)\r\n\r\n\r\n\r\n# Assemble your task force!\r\n\r\nforce = TaskForce(agents=[greeter, math_magician], caching_dir='cache')\r\n\r\nforce.start_force()\r\n\r\nforce.execute_agent(greeter, \"Hi I am mervin\")\r\n\r\nforce.execute_agent(math_magician, \"2+2\")\r\n\r\nforce.exit_force()\r\n\r\n```\r\n\r\n\r\n\r\nThis example demonstrates creating agents with tools and using a TaskForce to manage execution.\r\n\r\n\r\n\r\n</div>\r\n\r\n\r\n\r\n---\r\n\r\n\r\n\r\n## \ud83e\uddd0 Important Questions\r\n\r\n\r\n\r\n<details>\r\n\r\n<summary><strong>What does `record_result` func do?</strong></summary>\r\n\r\n\r\n\r\nThe `record_result` function is used to save the result of an agent's workflow. This can be useful for passing one agent's response to another.\r\n\r\n\r\n\r\nThis concludes in the scalability and simplicity of the architecture.\r\n\r\n\r\n\r\n</details>\r\n\r\n\r\n\r\n---\r\n\r\n\r\n\r\n## \ud83d\ude80 Advanced Features\r\n\r\n\r\n\r\n- **Multi-LLM Support**: Seamlessly switch between different language models\r\n\r\n- **Custom Tool Creation**: Easily create and integrate your own tools\r\n\r\n- **Response Validation**: Ensure output quality with built-in validation\r\n\r\n- **Easy Passing of Information**: Share information between agents with ease using the `record_result` function\r\n\r\n- **Scalable Architecture**: Build large-scale AI agent networks with the TaskForce class\r\n\r\n---\r\n\r\n\r\n\r\n## \ud83d\udcc8 Performance and Scalability\r\n\r\n\r\n\r\nArcheAI is designed for efficiency:\r\n\r\n\r\n\r\n- Lightweight core for minimal overhead\r\n\r\n- Scalable architecture for complex agent networks\r\n\r\n\r\n\r\n---\r\n\r\n\r\n\r\n<details>\r\n\r\n<summary>Actual Use Case:</summary>\r\n\r\n\r\n\r\n```python\r\n\r\nfrom archeai.llms import Gemini\r\n\r\nfrom archeai import Agent, Tool, TaskForce\r\n\r\nfrom archeai.tools import get_current_time, web_search\r\n\r\nimport os\r\n\r\n\r\n\r\ndef list_dir():\r\n\r\n    \"\"\"Returns a list of items in the current working directory.\"\"\"\r\n\r\n\r\n\r\n    try:\r\n\r\n        items = os.listdir()\r\n\r\n        return items\r\n\r\n    except OSError as e:\r\n\r\n        print(f\"Error listing directory: {e}\")\r\n\r\n        return []\r\n\r\ndef write_to_file(filename:str, content:str):\r\n\r\n    \"\"\"Writes the given content to a file with the specified filename.\r\n\r\n\r\n\r\n    Args:\r\n\r\n        filename (str): The name of the file to write to.\r\n\r\n        content (str): The content to write to the file.\r\n\r\n    \"\"\"\r\n\r\n\r\n\r\n    try:\r\n\r\n        with open(filename, 'w') as f:\r\n\r\n            f.write(content)\r\n\r\n        print(f\"Successfully wrote to '{filename}'\")\r\n\r\n    except OSError as e:\r\n\r\n        print(f\"Error writing to file: {e}\")\r\n\r\n\r\n\r\ndef gcd(a:int, b:int):\r\n\r\n    \"\"\"\r\n\r\n    Calculate the Greatest Common Divisor (GCD) of two numbers using the Euclidean algorithm.\r\n\r\n\r\n\r\n    Parameters:\r\n\r\n    a (int): The first number.\r\n\r\n    b (int): The second number.\r\n\r\n\r\n\r\n    Returns:\r\n\r\n    int: The GCD of the two numbers.\r\n\r\n    \"\"\"\r\n\r\n    while b:\r\n\r\n        a, b = b, a % b\r\n\r\n    return a+b\r\n\r\n\r\n\r\nllm_instance = Gemini()\r\n\r\n\r\n\r\n# Define the tools using the OwnTool class\r\n\r\nwrite_tool = Tool(\r\n\r\n    func=write_to_file,\r\n\r\n    description=\"Writes the given content to a file to the given filename in dir\",\r\n\r\n    returns_value=False,\r\n\r\n    llm = llm_instance,\r\n\r\n    verbose=True\r\n\r\n)\r\n\r\n\r\n\r\nlist_tool = Tool(\r\n\r\n    func=list_dir,\r\n\r\n    description=\"Provides the list of files and folders in current working dir.\",\r\n\r\n    returns_value=True,\r\n\r\n    llm = llm_instance,\r\n\r\n    verbose=True\r\n\r\n)\r\n\r\n\r\n\r\ntime_tool = Tool(\r\n\r\n    func=get_current_time,\r\n\r\n    description=\"Provides the current time.\",\r\n\r\n    returns_value=True,\r\n\r\n    llm = llm_instance,\r\n\r\n    verbose=True\r\n\r\n)\r\n\r\n\r\n\r\nweb_tool = Tool(\r\n\r\n    func=web_search,\r\n\r\n    description=\"Provides web search result on the given query.\",\r\n\r\n    returns_value=True,\r\n\r\n    llm = llm_instance,\r\n\r\n    verbose=True\r\n\r\n)\r\n\r\n\r\n\r\n# Initialize the language model instance\r\n\r\n\r\n\r\ncontent_saver = Agent(\r\n\r\n        llm=llm_instance,\r\n\r\n        identity=\"content_saver\",\r\n\r\n        tools=[write_tool],\r\n\r\n        verbose=True,\r\n\r\n        description=\"A content saver which can save any content in markdown format to a given file.\",\r\n\r\n        expected_output=\"In markdown format\",\r\n\r\n)\r\n\r\n\r\n\r\nresearcher = Agent(\r\n\r\n        llm=llm_instance,\r\n\r\n        identity=\"researcher\",\r\n\r\n        tools=[time_tool, web_tool],\r\n\r\n        description=\"A researcher having access to web and can get info about any topic.\",\r\n\r\n        expected_output=\"A summary of the research\",\r\n\r\n        verbose=True,\r\n\r\n                )\r\n\r\n\r\n\r\nwriter = Agent(\r\n\r\n        llm=llm_instance,\r\n\r\n        identity=\"writer\",\r\n\r\n        tools=[],\r\n\r\n        description=\"A writer which can write on any topic with information.\",\r\n\r\n        expected_output=\"In markdown format\",\r\n\r\n        verbose=True,\r\n\r\n                )\r\n\r\n\r\n\r\n# Define the task force\r\n\r\ntask_force = TaskForce(\r\n\r\n    agents=[content_saver, researcher, writer],\r\n\r\n    caching_dir=\"cache\",\r\n\r\n)\r\n\r\n\r\n\r\n# Run the task force\r\n\r\ntask_force.start_force()\r\n\r\ntask_force.execute_agent(researcher, \"What are wormholes?\")\r\n\r\nresearcher_result = task_force.record_result(researcher)\r\n\r\nprint(researcher_result)\r\n\r\ntask_force.execute_agent(writer, f\"Write an article on wormholes. Here is the information: {researcher_result}\")\r\n\r\nwriter_result = task_force.record_result(writer)\r\n\r\ntask_force.execute_agent(content_saver, f\"Save this information in wormholes.md: {writer_result}\")\r\n\r\ntask_force.exit_force()\r\n\r\n\r\n\r\n```\r\n\r\n\r\n\r\nThe Tools used from archeai in the use case are totally experimental and are not recommended to use.\r\n\r\n\r\n\r\n</details>\r\n\r\n\r\n\r\n<div align=\"center\">\r\n\r\n\r\n\r\n## \ud83e\udd1d Contributing\r\n\r\n\r\n\r\nWe welcome contributions! Please feel free to:\r\n\r\n\r\n\r\n[Open an issue](https://github.com/E5Anant/archeAI/issues)\r\n\r\n[Submit a pull request](https://github.com/E5Anant/archeAI/pulls)\r\n\r\n\r\n\r\nCheck out our [Contribution Guidelines](https://github.com/E5Anant/archeAI/blob/main/CONTRIBUTING.md) for more information.\r\n\r\n\r\n\r\n## \ud83d\udcc4 License\r\n\r\n\r\n\r\nThis project is licensed under the [MIT License](https://github.com/E5Anant/archeAI/blob/main/LICENSE).\r\n\r\n\r\n\r\n## \u2b50 Don't Forget to Star!\r\n\r\n\r\n\r\nIf you find ArcheAI helpful, please give us a star on GitHub!\r\n\r\n\r\n\r\n[![GitHub stars](https://img.shields.io/github/stars/E5Anant/archeAI.svg?style=social&label=Star)](\r\n\r\n\r\n\r\n</div>\r\n\r\n",
    "bugtrack_url": null,
    "license": null,
    "summary": "ArcheAI is a lightweight and scalable Python agent 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.7",
    "project_urls": null,
    "split_keywords": [
        "agents",
        " archeai",
        " archeai",
        " multi-agent",
        " taskforce",
        " python",
        " light-weight",
        " agent-framework",
        " framework"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "878f38b99a9ec26a3c5b61bbef8d83743a138687a48305ac6930a636887a97da",
                "md5": "12f09acfebf32685583eb9496597f3b8",
                "sha256": "ccdbc5daf62adcc73dfd7120a4014d8e1d173783ab0c556ff7120633df55ee49"
            },
            "downloads": -1,
            "filename": "archeai-0.0.7-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "12f09acfebf32685583eb9496597f3b8",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": null,
            "size": 30450,
            "upload_time": "2025-01-05T17:32:54",
            "upload_time_iso_8601": "2025-01-05T17:32:54.690988Z",
            "url": "https://files.pythonhosted.org/packages/87/8f/38b99a9ec26a3c5b61bbef8d83743a138687a48305ac6930a636887a97da/archeai-0.0.7-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "87fa18ae14df56e094fa192d9283b4ef0ffe54c40220924dc25f3be0d0b26d5e",
                "md5": "3dada0f9d7462f66f40921df85995ebc",
                "sha256": "57243d781c9e3eea9325c588b251c6035eb4ec68cb68c9a63b0acf76cd9260ea"
            },
            "downloads": -1,
            "filename": "archeai-0.0.7.tar.gz",
            "has_sig": false,
            "md5_digest": "3dada0f9d7462f66f40921df85995ebc",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 29238,
            "upload_time": "2025-01-05T17:32:58",
            "upload_time_iso_8601": "2025-01-05T17:32:58.110146Z",
            "url": "https://files.pythonhosted.org/packages/87/fa/18ae14df56e094fa192d9283b4ef0ffe54c40220924dc25f3be0d0b26d5e/archeai-0.0.7.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-01-05 17:32:58",
    "github": false,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "lcname": "archeai"
}
        
Elapsed time: 3.88568s