- [May 2025] 🎉 EvoAgentX has been officially released!
- Installation
- Configuration
- Examples: Automatic WorkFlow Generation
- Demo Video
- Tutorial and Use Cases
We recommend installing EvoAgentX using pip:
pip install evoagentxFor local development or detailed setup (e.g., using conda), refer to the Installation Guide for EvoAgentX.
Example (optional, for local development):
git clone https://github.com/EvoAgentX/EvoAgentX.git
cd EvoAgentX
# Create a new conda environment
conda create -n evoagentx python=3.10
# Activate the environment
conda activate evoagentx
# Install the package
pip install -r requirements.txt
# OR install in development mode
pip install -e .To use LLMs with EvoAgentX (e.g., OpenAI), you must set up your API key.
- Linux/macOS:
export OPENAI_API_KEY=<your-openai-api-key>- Windows Command Prompt:
set OPENAI_API_KEY=<your-openai-api-key>- Windows PowerShell:
$env:OPENAI_API_KEY="<your-openai-api-key>" # " is required Once set, you can access the key in your Python code with:
import os
OPENAI_API_KEY = os.getenv("OPENAI_API_KEY")- Create a .env file in your project root:
OPENAI_API_KEY=<your-openai-api-key>Then load it in Python:
from dotenv import load_dotenv
import os
load_dotenv() # Loads environment variables from .env file
OPENAI_API_KEY = os.getenv("OPENAI_API_KEY")🔐 Tip: Don’t forget to add
.envto your.gitignoreto avoid committing secrets.
Once the API key is set, initialise the LLM with:
from evoagentx.models import OpenAILLMConfig, OpenAILLM
# Load the API key from environment
OPENAI_API_KEY = os.getenv("OPENAI_API_KEY")
# Define LLM configuration
openai_config = OpenAILLMConfig(
model="gpt-4o-mini", # Specify the model name
openai_key=OPENAI_API_KEY, # Pass the key directly
stream=True, # Enable streaming response
output_response=True # Print response to stdout
)
# Initialize the language model
llm = OpenAILLM(config=openai_config)
# Generate a response from the LLM
response = llm.generate(prompt="What is Agentic Workflow?")📖 More details on supported models and config options: LLM module guide.
Once your API key and language model are configured, you can automatically generate and execute multi-agent workflows in EvoAgentX.
🧩 Core Steps:
- Define a natural language goal
- Generate the workflow with WorkFlowGenerator
- Instantiate agents using AgentManager
- Execute the workflow via WorkFlow
💡 Minimal Example:
from evoagentx.workflow import WorkFlowGenerator, WorkFlowGraph, WorkFlow
from evoagentx.agents import AgentManager
goal = "Generate html code for the Tetris game"
workflow_graph = WorkFlowGenerator(llm=llm).generate_workflow(goal)
agent_manager = AgentManager()
agent_manager.add_agents_from_workflow(workflow_graph, llm_config=openai_config)
workflow = WorkFlow(graph=workflow_graph, agent_manager=agent_manager, llm=llm)
output = workflow.execute()
print(output)You can also:
- 📊 Visualise the workflow:
workflow_graph.display() - 💾 Save/load workflows:
save_module()/from_file()
📂 For a complete working example, check out the
workflow_demo.py
🎥 Demo video coming soon – stay tuned!
In the meantime, check out the EvoAgentX Quickstart Guide for a step-by-step guide to get started with EvoAgentX.
Explore how to effectively use EvoAgentX with the following resources:
| Cookbook | Description |
|---|---|
| Build Your First Agent | A comprehensive guide to creating your first agent step-by-step. |
| Building Workflows Manually | Learn how to design and implement collaborative agent workflows. |
| Benchmark and Evaluation Tutorial | Guidelines for evaluating and benchmarking agent performance. |
| SEW Optimizer Tutorial | Learn optimization techniques for enhancing agent workflows. |
🛠️ Follow the tutorials to build and optimize your EvoAgentX workflows.
💡 Discover real-world applications and unleash the potential of EvoAgentX in your projects!
📢 Stay connected and be part of the EvoAgentX journey!
🚩 Join our community to get the latest updates, share your ideas, and collaborate with AI enthusiasts worldwide.
- Discord — Chat, discuss, and collaborate in real-time.
- X (formerly Twitter) — Follow us for news, updates, and insights.
- WeChat — Connect with our Chinese community.
If you have any questions or feedback about this project, please feel free to contact us. We highly appreciate your suggestions!
- Email: [email protected]
We will respond to all questions within 2-3 business days.
Thanks go to these awesome contributors
We appreciate your interest in contributing to our open-source initiative. We provide a document of contributing guidelines which outlines the steps for contributing to EvoAgentX. Please refer to this guide to ensure smooth collaboration and successful contributions. 🤝🚀
Source code in this repository is made available under the MIT License.