Skip to main content

OpenEvolve

OpenEvolve Logo

The most advanced open-source evolutionary coding agent

Turn your LLMs into autonomous code optimizers that discover breakthrough algorithms

PyPI version PyPI Downloads License

Quick Start • Used In Research • Examples • Docs • Discussions


OpenEvolve is an open-source implementation of Google DeepMind's AlphaEvolve. It uses LLMs to mutate programs and evolves them with MAP-Elites and island populations, so you can point it at any problem you can score. It has become a standard tool and baseline for LLM-driven algorithm discovery: cited in hundreds of research papers, with 7,600+ GitHub stars, 1,200+ forks, 80+ contributors and 17,000+ monthly PyPI downloads.

Used In Research

Producing new results

Paper How OpenEvolve is used
New Bounds for Zarankiewicz Numbers via Reinforced LLM Evolutionary Search New bounds in extremal combinatorics, obtained with OpenEvolve
Let the Barbarians In: How AI Can Accelerate Systems Performance Research Ten systems performance case studies, using OpenEvolve among other tools
Algorithmic Algorithm Development with LLMs Contraction order optimization for tensor networks
Even with AI, Bijection Discovery is Still Hard Combinatorial bijection discovery

Security research

Paper How OpenEvolve is used
Trojan Hippo Bench Adaptive red-teaming benchmark for persistent memory attacks on LLM agents
Divide and Inject Refining indirect prompt injection fragments
LLM-Guided Prompt Evolution for Password Guessing Evolving prompts that maximize cracking rate
Targeted Black-Box Attacks on Perceptual Hash Algorithms Evolutionary attack framework based on GigaEvo and OpenEvolve

Building on OpenEvolve

Paper Relationship
Hill Sampling for Test-Time Scaling Builds on OpenEvolve's problems and evaluators
CodeEvolve: Runtime-Enriched Target Selection Extends OpenEvolve for Java and Salesforce Apex
GraphIR Neural architecture search states integrated into OpenEvolve

New evolutionary agents also routinely benchmark against OpenEvolve, including HarnessTTT, FrugalEvo, SEDIMA, EvoDuet, LoongFlow and AscendOptimizer.

Using OpenEvolve in your work? Open a pull request to add it here, and see Citation.

Results

Domain Achievement Example
GPU optimization Hardware-optimized kernel discovery, with 2-3x speedups on real hardware MLX Metal Kernels
Mathematics State-of-the-art circle packing (n=26) Circle Packing
Algorithm design Adaptive sorting algorithms Rust Adaptive Sort
Scientific computing Automated filter design Signal Processing
Multi-language Python, Rust, R, Metal shaders All Examples
Generation 1 Generation 190 Generation 460 (final)
Initial Progress Final
Random placement Learning structure State-of-the-art result

Compared with manual optimization:

Aspect Manual Optimization OpenEvolve
Time to solution Days to weeks Hours
Exploration breadth Limited by human creativity Unlimited LLM creativity
Reproducibility Hard to replicate Fully deterministic
Multi-objective Complex tradeoffs Automatic Pareto optimization
Scaling Doesn't scale Parallel evolution across islands

Quick Start

Requires Python 3.10+ and access to an LLM.

git clone https://github.com/algorithmicsuperintelligence/openevolve.git
cd openevolve
pip install -e .

# The example uses Google Gemini by default (free tier available)
# Get your API key from: https://aistudio.google.com/apikey
export OPENAI_API_KEY="your-gemini-api-key"  # Yes, use OPENAI_API_KEY

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

To use another provider, change api_base and the model in config.yaml. See LLM Providers.

Or use it as a library (pip install openevolve):

from openevolve import evolve_function

def bubble_sort(arr):
    for i in range(len(arr)):
        for j in range(len(arr) - 1):
            if arr[j] > arr[j + 1]:
                arr[j], arr[j + 1] = arr[j + 1], arr[j]
    return arr

if __name__ == "__main__":
    result = evolve_function(
        bubble_sort,
        test_cases=[([3, 1, 2], [1, 2, 3]), ([5, 2, 8], [2, 5, 8])],
        iterations=50,
    )
    print(result.best_code)

run_evolution also takes inline code and an evaluator function. The __main__ guard is required on macOS and Windows, where multiprocessing uses spawn.

A Docker image is available too:

docker pull ghcr.io/algorithmicsuperintelligence/openevolve:latest

docker run --rm -v $(pwd):/app ghcr.io/algorithmicsuperintelligence/openevolve:latest \
  examples/function_minimization/initial_program.py \
  examples/function_minimization/evaluator.py --iterations 100

How It Works

OpenEvolve Architecture

  • Quality-diversity evolution: MAP-Elites keeps diverse programs across feature dimensions.
  • Island populations: separate populations with periodic migration prevent premature convergence.
  • LLM ensembles: weighted combinations of models, from any OpenAI-compatible API or the Claude Code, GitHub Copilot and Codex CLIs.
  • Artifact feedback: errors and evaluator output feed the next generation's prompt.
  • Reproducibility: every component is seeded.

Mark the code to evolve with EVOLVE-BLOCK-START and EVOLVE-BLOCK-END comments. More in How It Works.

Good fits are performance optimization, algorithm discovery, scientific computing, competitive programming and multi-objective problems.

Examples

Project Domain What it evolves
Function Minimization Optimization Random search to simulated annealing
Circle Packing Mathematics The n=26 AlphaEvolve task
AlphaEvolve Math Problems Mathematics Problems from AlphaEvolve's appendices
MLX GPU Kernels Hardware Apple Silicon Metal kernels
Rust Adaptive Sort Algorithms Data-aware sorting
Symbolic Regression Science Equation discovery on LLM-SRBench
Prompt Optimization LLMs Prompts instead of code
Online Judge Programming Competitive programming solutions
Web Scraper + OptiLLM AI integration Test-time compute

Running Google's AlphaEvolve examples? See the interoperability walkthrough.

Documentation

Articles:

Contributing

Contributions are welcome. See the Contributing Guide and good first issue labels.

Citation

If you use OpenEvolve in your research, please cite:

@software{openevolve,
  title = {OpenEvolve: an open-source evolutionary coding agent},
  author = {Asankhaya Sharma},
  year = {2025},
  publisher = {GitHub},
  url = {https://github.com/algorithmicsuperintelligence/openevolve}
}

Metadata

Release files for openevolve 0.4.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for openevolve 0.4.1
File Size Uploaded Provenance Actions
openevolve-0.4.1.tar.gz 339.5 kB With provenance Details for openevolve-0.4.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for openevolve 0.4.1
File Interpreter ABI Platform Actions
openevolve-0.4.1-py3-none-any.whl Python 3 none any Details for openevolve-0.4.1-py3-none-any.whl

Total release size: 510.9 kB

Release files / openevolve-0.4.1.tar.gz

Download URL openevolve-0.4.1.tar.gz
Size 339.5 kB
Tags Source
SHA-256 checksum
How to use checksums
ee7667c7a25b8e9ec4e3820a6100f239925bf61caab5ade2bb0ccc66ea42c3d0
BLAKE2b-256 checksum
How to use checksums
827f6a2acf7fdfc189aa6b52b2ac73c0c6e5866ffb50b6c437ab9b4da6eba5cd
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 2, 2026.

Transparency log

Release files / openevolve-0.4.1-py3-none-any.whl

Download URL openevolve-0.4.1-py3-none-any.whl
Size 171.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
f96ec21c566c4b8f430cd55d67226ee139c3d4db9c10aed40ad0021daeef31b2
BLAKE2b-256 checksum
How to use checksums
ffadd60d6a9ab31f416be799c473b47ef45576ed5d732c659b72fb1447da711e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 2, 2026.

Transparency log

Security for openevolve 0.4.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

All 2 files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for openevolve-0.4.1.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 2, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.4.1 This release

2 release files Full provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page