Open-source Python framework for AI-driven code evolution
Top 42.6% on sourcepulse
OpenAlpha_Evolve is an open-source Python framework for autonomous coding agents that iteratively write, test, and improve code using LLMs. It's designed for researchers, developers, and enthusiasts interested in AI-driven algorithmic innovation and automated problem-solving. The system aims to discover and refine solutions autonomously through an evolutionary process.
How It Works
The framework employs a modular, agent-based architecture. A PromptDesignerAgent
crafts prompts for LLMs to generate initial code, mutate existing code (using diffs), or fix bugs. A CodeGeneratorAgent
uses an LLM (configured via LiteLLM) to produce Python code. An EvaluatorAgent
tests the code for syntax correctness and functional accuracy against user-defined input/output examples within Dockerized sandboxes. A SelectionControllerAgent
applies evolutionary principles to choose parents and survivors, while a TaskManagerAgent
orchestrates the entire iterative loop.
Quick Start & Requirements
pip install -r requirements.txt
.env
file (copy from .env.example
).python -m main
to start an evolutionary run.python app.py
to launch a Gradio interface for interactive task definition.Highlighted Details
settings.py
and .env
.Maintenance & Community
The project is open for contributions, encouraging bug reports, feature suggestions, and pull requests. Community interaction is facilitated through GitHub issues.
Licensing & Compatibility
Licensed under the MIT License. This permissive license allows for commercial use and integration with closed-source projects.
Limitations & Caveats
This is an experimental project; generated code may not always be optimal, correct, or secure. Thorough review and testing are recommended before production use. The effectiveness of the system is highly dependent on the quality and comprehensiveness of the task descriptions and input/output examples provided by the user.
2 months ago
Inactive