A flexible multi-agent framework code generator supporting multiple LLM providers and frameworks
Project description
Evi - Multi-Agent Framework Generator
Evi is a flexible, modular code generator for multi-agent systems that supports multiple agent frameworks (CrewAI, LangGraph, ReAct) and LLM providers (OpenAI, Gemini).
Features
-
Multiple Agent Frameworks
-
Multiple LLM Providers
- OpenAI (GPT-3.5, GPT-4)
- Google Gemini (Pro, Pro Vision)
-
Dual Interfaces
- Command-line interface (CLI) for scripting and automation
- Streamlit web interface with visualization and interactive controls
-
Modular, Pluggable Architecture
- Easily extend with new providers or frameworks
- Customizable templates using Jinja2
-
Advanced Features
- Multiple output formats (Python code or JSON configuration)
- Agent workflow visualization
- Configurable model parameters
Installation
Basic Installation
pip install evi
With GUI Support
pip install evi[streamlit]
With Framework-Specific Dependencies
pip install evi[crewai] # For CrewAI support
pip install evi[langgraph] # For LangGraph support
pip install evi[react] # For ReAct support
Full Installation
pip install evi[all]
For Development
pip install evi[dev]
Usage
Command-Line Interface
# Generate CrewAI code using OpenAI
evi --prompt "Create a team of researchers to analyze climate data" --framework crewai --provider openai
# Generate LangGraph configuration using Gemini
evi --prompt "Create a customer service workflow" --framework langgraph --provider gemini --output json
# Save output to a file
evi --prompt "Create a team of researchers to analyze climate data" --output-file my_agents.py
Streamlit Interface
# Launch the Streamlit web interface
evi-gui
Python API
from evi.core import EviGenerator
# Create a generator instance
generator = EviGenerator(provider="openai", framework="crewai")
# Generate code from a prompt
code = generator.generate(
"Create a research team with three agents that analyze financial data",
output_format="code"
)
# Generate JSON configuration
config = generator.generate(
"Create a research team with three agents that analyze financial data",
output_format="json"
)
# Print or save the generated code
print(code)
with open("my_agents.py", "w") as f:
f.write(code)
API Key Configuration
Evi requires API keys for accessing LLM providers:
Environment Variables
# For OpenAI
export OPENAI_API_KEY=your_api_key_here
# For Gemini
export GEMINI_API_KEY=your_api_key_here
Using .env File
Create a .env file in your project directory:
OPENAI_API_KEY=your_api_key_here
GEMINI_API_KEY=your_api_key_here
Then in your Python code:
from dotenv import load_dotenv
load_dotenv() # This loads the .env file
Framework-Specific Examples
CrewAI Example
from evi.core import EviGenerator
prompt = """
Create a research crew with two agents:
1. A data collector that finds information online
2. An analyst that summarizes and provides insights
The crew should analyze recent developments in quantum computing.
"""
generator = EviGenerator(provider="openai", framework="crewai")
code = generator.generate(prompt, output_format="code")
# Save the generated code
with open("quantum_research_crew.py", "w") as f:
f.write(code)
LangGraph Example
from evi.core import EviGenerator
prompt = """
Create a customer support workflow that:
1. Classifies the initial customer query
2. Routes to either technical support or billing department
3. Generates a response based on the department's knowledge base
"""
generator = EviGenerator(provider="openai", framework="langgraph")
code = generator.generate(prompt, output_format="code")
# Save the generated code
with open("customer_support_workflow.py", "w") as f:
f.write(code)
ReAct Example
from evi.core import EviGenerator
prompt = """
Create a reasoning agent that can:
1. Answer questions about physics
2. Break down complex problems into steps
3. Generate analogies to explain difficult concepts
"""
generator = EviGenerator(provider="gemini", framework="react")
code = generator.generate(prompt, output_format="code")
# Save the generated code
with open("physics_tutor_agent.py", "w") as f:
f.write(code)
Architecture
Evi is built with a modular, pluggable architecture:
- Core: Central controller that orchestrates the generation process
- Providers: Interfaces to LLM providers (OpenAI, Gemini)
- Frameworks: Handlers for different agent frameworks (CrewAI, LangGraph, ReAct)
- Templates: Jinja2 templates for code generation
This architecture makes it easy to extend Evi with new providers or frameworks by implementing the appropriate interfaces.
Contributing
We welcome contributions! Please see CONTRIBUTING.md for details on how to contribute to Evi.
License
This project is licensed under the MIT License - see the LICENSE file for details.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file evi_ai-0.1.0.tar.gz.
File metadata
- Download URL: evi_ai-0.1.0.tar.gz
- Upload date:
- Size: 18.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4c5ea46be6f56aed8890620e07b277baab415701bd619ee1de72efadd22a9dff
|
|
| MD5 |
4f81f88becbffc2de823a81e72272bf0
|
|
| BLAKE2b-256 |
d4c80f5a72a01a91f7e2ba342b509970d2d380ca917c6a7fd789614b4fc2827f
|
File details
Details for the file evi_ai-0.1.0-py3-none-any.whl.
File metadata
- Download URL: evi_ai-0.1.0-py3-none-any.whl
- Upload date:
- Size: 29.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4ea1d39f90ce59965318ae5147590c107f89437080fb4f46282115a4bb797630
|
|
| MD5 |
5ded77f45c090952ed509aff05482af8
|
|
| BLAKE2b-256 |
5844e20711f5891d09fe9ba0a68979d07c4bfc97160c46a08045c939645050ef
|