Agent Zero is a project that i made for myself so as to improve the overall quality of the agentic system. This project demonstrates the use of multiple AI agents working together in a group chat environment. It utilizes OpenAI's GPT 4o model and Anthropic's Claude 3.5 sonnet model to create a collaborative AI system.
- Multiple AI agents: OpenAI assistant, Anthropic assistant (Claude), and a dedicated code writer agent (Currently configured to use claude)
- Group chat management for coordinating agent interactions
- Exponential backoff retry mechanism for handling rate limits
- YAML-based prompt configuration
Note: This execution asks for user input after each assistant speaks, you can turn this off by changing
human_input = "NEVER"
- Python 3.7+
- OpenAI API key
- Anthropic API key
-
Clone the repository:
git clone https://github.com/yourusername/agent-zero.git cd agent-zero -
Install the required dependencies:
pip install -r requirements.txt -
Set up your environment variables:
export OPENAI_API_KEY='your_openai_api_key_here' export ANTHROPIC_API_KEY='your_anthropic_api_key_here'
-
Prepare your prompt in a
prompt.yamlfile:prompt: "Your prompt text here"
-
Run the main script:
python agent_zero.py
- Modify the
openai_llm_configandclaude_llm_configdictionaries inagent_zero.pyto adjust model parameters or API endpoints. - The
GroupChatis configured for a maximum of 12 rounds. Adjust themax_roundparameter in theGroupChatinitialization if needed.
- If you encounter rate limit errors, the script will automatically retry with exponential backoff.
- Ensure that your API keys are correctly set in the environment variables.
- Check that the
prompt.yamlfile is in the same directory as the script and contains a valid prompt.
Contributions to Agent Zero are welcome! Please feel free to submit a Pull Request.
