AI/TLDR

AlphaEvolve

A Gemini-powered evolutionary coding agent that searches for faster algorithms against a scoring function you define

Autonomous Coding AgentsEnterprise
Updated
9 Jul 2026
Language
Python
License
Apache-2.0
Coverage
3 stories

Overview

AlphaEvolve is an evolutionary coding agent for general-purpose algorithm discovery and optimization. You provide a seed program that already works and a scoring function that says what "better" means; AlphaEvolve uses Gemini to propose code changes, evaluates each candidate against your metric, and evolves the population over many generations toward higher-scoring programs. Google's documentation frames it as a fit for algorithmic discovery, mathematical search and combinatorial optimization — including NP-complete and NP-hard problems where the win comes from redesigning the algorithm, not tidying the code.

It is deliberately not a general code assistant. The documentation is explicit that AlphaEvolve is not for basic code generation, linting or cleanup: it starts from functionally correct code that needs a better score, and it needs a large space of functionally correct alternatives to search through. The trade-off is compute — a run is a long loop of generate, evaluate, select, so cost scales with how many candidates you are willing to evaluate.

The service runs inside your own Google Cloud project through the Gemini Enterprise Agent Platform. The public repository is the client side: a Python library (`alpha_evolve`) plus runnable examples that wire AlphaEvolve into real Google Cloud environments, from a pure-Python loop with no infrastructure at all up to GPU training on GKE. The library is Apache-2.0, but running it requires a Google Cloud project with AlphaEvolve provisioned, which gives you the Gemini Enterprise App/Engine ID the examples expect.

What it does

  • Evolutionary search over programs: Gemini proposes code changes, each candidate is evaluated against your scoring function, and the population evolves across generations
  • You define the objective — the agent optimizes whatever metric your evaluator returns, rather than a fixed notion of code quality
  • An open Python client library (`alpha_evolve`) with runnable examples spanning local evaluation, Cloud Run and GPU training on GKE
  • Parallel evaluation via PARALLEL_EVALUATION and WORKER_CONCURRENCY settings, so candidates are scored concurrently
  • Runs inside your own Google Cloud project through the Gemini Enterprise Agent Platform
  • AlphaEvolve Skills for driving runs from an agent environment, documented alongside the library

Getting started

The Circle Packing example runs the full evolution loop with local Python evaluation and no cloud infrastructure beyond the AlphaEvolve API — the fastest way to watch the loop work. You need Python 3.9+, uv, the gcloud CLI, and a Google Cloud project with AlphaEvolve provisioned.

Clone the repo and install the library

The client package lives in src/ and installs with the examples extra.

bashbash
git clone https://github.com/Google-Cloud-AI/alphaevolve-on-googlecloud.git
cd alphaevolve-on-googlecloud
uv pip install -e ".[examples]"

Configure the Circle Packing example

`make setup` creates a .env from the template; edit it to set PROJECT_ID and the Gemini Enterprise App ID (GE_APP_ID) you got when AlphaEvolve was provisioned.

bashbash
cd examples/circle_packing
make setup

Authenticate

Application default credentials are what the client uses to reach the AlphaEvolve API.

bashbash
make auth

Run the experiment

`make run` uploads the seed algorithm, then evolves and evaluates candidates. Each generation's best score is logged, and the example plots the top packings at the end. Run `make help` in any example to see its targets.

bashbash
make run

Evaluate candidates in parallel

Set these in .env to score several candidates at once instead of one at a time.

bashbash
PARALLEL_EVALUATION=True
WORKER_CONCURRENCY=8

Commands and code are distilled from the project's own documentation — always check the official repo for the latest.

When to use it

  • Search for a faster implementation of a hot algorithm when you can write an automated benchmark that scores each candidate
  • Attack combinatorial optimization problems — packing, scheduling, routing — where many functionally correct programs exist and only the score separates them
  • Explore mathematical constructions by encoding the construction as a program and the objective as a metric
  • Tune a kernel or training configuration on GKE by letting the loop propose and measure variants instead of sweeping by hand

How AlphaEvolve compares

AlphaEvolve alongside other open-source autonomous coding agents tools AI/TLDR tracks, ranked by GitHub stars.

ToolStarsWhat it does
opencode★ 209kOpenCode is an open source AI coding agent that runs in your terminal, with built-in build and plan agents and an optional desktop app.
Claude Code★ 148kAnthropic's agentic coding tool for the terminal, IDE and GitHub: it understands your codebase, executes routine tasks, explains code and handles git workflows from natural-language commands.
OpenAI Codex★ 126kOpenAI's cloud and CLI coding agent that writes features, fixes bugs, and proposes code changes across a repo, running tasks in parallel.
Pi★ 108kMinimal terminal coding agent harness with four built-in tools, extended through TypeScript extensions, skills and prompt templates instead of forks.
Gemini CLI★ 107kAn open-source command-line AI agent from Google that connects your terminal to Gemini models for reading code, editing files, running shell commands, and searching the web.
autoresearch★ 96.5kKarpathy's minimal harness that hands a coding agent a single-GPU LLM training script and lets it run fixed five-minute experiments, keeping or discarding each change on its own.
OpenHands★ 88.8kAn open-source AI software-development agent that plans tasks, edits files, runs commands, and tests code, usable from a terminal CLI, a local web GUI, or a Python SDK.
AlphaEvolve★ 113A Gemini-powered evolutionary coding agent that searches for faster algorithms against a scoring function you define