Repolode
algorithmicsuperintelligence

algorithmicsuperintelligence/openevolve

An open-source evolutionary coding agent that uses LLMs to iteratively mutate and score code, aiming to discover better algorithms, implementing the AlphaEvolve approach.

Stars
7,603
Forks
1,190
Open issues
95
Last commit
16 hours ago

What is it?

OpenEvolve runs an evolutionary loop over source code: an LLM proposes changes to a program, an evaluator you write scores each candidate, and the best candidates feed the next round. Programs are stored in a MAP-Elites quality-diversity grid across several islands, so the search keeps varied solutions instead of converging on one local optimum. It is intended for problems where correctness and performance can be measured by a script, such as function minimization, circle packing, GPU kernel tuning or sorting algorithms.

The project can be installed from PyPI or run in Docker, and it can also be called as a Python library through functions such as run_evolution and evolve_function. Any OpenAI-compatible API works as the LLM backend, including Gemini, OpenAI, and local servers such as Ollama and vLLM. Ensembles of models can be weighted, and a Claude Code CLI or Codex app-server backend is available for users without an API key. Configuration is done in YAML, with options for seeding, cascade evaluation, error artifacts fed back to the model, and custom prompt templates.

The repository includes examples for Python, Rust, R and Metal shaders, along with a visualizer for the evolution tree and the MAP-Elites grid. Results are reproducible when seeds are fixed, and checkpoints are written during runs.

Key features

  • 01Evolves code using LLM-proposed mutations scored by a user-written evaluator.
  • 02Uses MAP-Elites quality-diversity grids across multiple islands to keep diverse populations.
  • 03Works with any OpenAI-compatible API, plus local models and Claude Code or Codex CLI backends.
  • 04Supports weighted LLM ensembles and cascade evaluation to filter weak candidates early.
  • 05Offers a Python library interface and a CLI, with Docker images available.
  • 06Includes a visualizer for evolution trees and MAP-Elites grids.

Use cases

  • Tuning a numerical routine or kernel where performance can be benchmarked automatically.
  • Searching for improved constructive solutions to math problems such as circle packing.
  • Evolving prompts or small programs against a measurable test suite.
  • Experimenting with LLM-driven algorithm discovery on local models.

Quick start

  1. 1

    Install OpenEvolve from PyPI

    pip install openevolve
  2. 2

    Set your LLM API key (the example defaults to Google Gemini; get a key from Google AI Studio)

    export OPENAI_API_KEY="your-gemini-api-key"
  3. 3

    Run the first example evolution

    python openevolve-run.py examples/function_minimization/initial_program.py examples/function_minimization/evaluator.py --config examples/function_minimization/config.yaml --iterations 50

Things to know

  • Each iteration calls an LLM, so runs incur API costs that can add up over many iterations.
  • Evolution runs need an OpenAI-compatible LLM API or the Claude Code CLI, so you must supply model access.

Topics

FAQ

What is openevolve?
An open-source evolutionary coding agent that uses LLMs to iteratively mutate and score code, aiming to discover better algorithms, implementing the AlphaEvolve approach. OpenEvolve runs an evolutionary loop over source code: an LLM proposes changes to a program, an evaluator you write scores each candidate, and the best candidates feed the next round. Programs are stored in a MAP-Elites quality-diversity grid across several islands, so the search keeps varied solutions instead of converging on one local optimum. It is intended for problems where correctness and performance can be measured by a script, such as function minimization, circle packing, GPU kernel tuning or sorting algorithms.
Is openevolve free to use? What license does it have?
openevolve is open source under the Apache-2.0 license. Check the license terms before using it in commercial products.
Is openevolve still maintained?
Actively maintained. The last commit to openevolve was on Oct 19, 2026.
What can I use openevolve for?
Tuning a numerical routine or kernel where performance can be benchmarked automatically. Searching for improved constructive solutions to math problems such as circle packing. Evolving prompts or small programs against a measurable test suite. Experimenting with LLM-driven algorithm discovery on local models.
How do I install openevolve?
Install OpenEvolve from PyPI: pip install openevolve Set your LLM API key (the example defaults to Google Gemini; get a key from Google AI Studio): export OPENAI_API_KEY="your-gemini-api-key" Run the first example evolution: python openevolve-run.py examples/function_minimization/initial_program.py examples/function_minimization/evaluator.py --config examples/function_minimization/config.yaml --iterations 50
Where can I get openevolve?
The source code and installation instructions are on GitHub: https://github.com/algorithmicsuperintelligence/openevolve

Summary generated by AI from the project's README. GitHub stats refresh daily.

Related projects