AgentX is an AI controller that relies on three LLM chains to perform tasks. The code for AgentX was inspired by this example and this repository.
- A user interacts with AgentX, requesting assistance with a task.
- AgentX processes the request and retrieves the necessary tools to help with the task.
- AgentX selects the relevant tools from the available options: Auto-GPT, BabyAGI, HuggingFace, and Other AI Agent.
- Each selected tool is then used to complete the task:
- Auto-GPT completes the task using its capabilities.
- BabyAGI completes the task using its capabilities.
- HuggingFace completes the task using its capabilities.
- Other AI Agent completes the task using its capabilities.
- The results from each tool are combined into a coherent and comprehensive output.
- AgentX receives the combined results and processes them to provide the best response.
- Finally, AgentX presents the response to the user.
AgentX flowchart generated using Mermaid.js
- Clone this repository
- Create a Python 3.8 virtual environment:
python3.8 -m venv .venv
- Activate the virtual environment:
source .venv/bin/activate
- Copy
.env.example
to create.env
. - Set your OpenAI API key in
.env
. - Install the required modules by running
pip install -r requirements.txt
.
To run the AgentX controller, run the following command with the virtual environment activated:
python main.py
This will start the AgentX controller and run it until it completes all tasks or until it reaches the maximum number of iterations.
The following modules are required and can be installed using the command pip install -r requirements.txt
:
langchain
openai
pydantic
faiss-cpu
tiktoken
OPENAI_API_KEY=