REST Resource: projects.locations.collections.engines.sessions.alphaEvolveExperiments

Resource: AlphaEvolveExperiment

An experiment is a single run of the AlphaEvolve agent, an evolutionary coding agent powered by LLM for algorithm discovery and optimization.

JSON representation
{
  "name": string,
  "createTime": string,
  "config": {
    object (AlphaEvolveExperimentConfig)
  },
  "stats": {
    object (AlphaEvolveExperimentStats)
  },
  "state": enum (State),
  "initialAlphaEvolveProgram": string
}
Fields
name

string

Identifier. The full resource name of the experiment. Format: projects/{project}/locations/{location}/collections/{collection}/engines/{engine}/sessions/{session}/alphaEvolveExperiments/{alphaEvolveExperiment}

createTime

string (Timestamp format)

Output only. time when the experiment was created.

Uses RFC 3339, where generated output will always be Z-normalized and use 0, 3, 6 or 9 fractional digits. Offsets other than "Z" are also accepted. Examples: "2014-10-02T15:01:23Z", "2014-10-02T15:01:23.045123456Z" or "2014-10-02T15:01:23+05:30".

config

object (AlphaEvolveExperimentConfig)

Required. experiment configuration.

stats

object (AlphaEvolveExperimentStats)

Output only. experiment stats.

state

enum (State)

Output only. The state of the experiment.

initialAlphaEvolveProgram

string

Output only. Specifies the name of the seed program used to start the experiment.

AlphaEvolveExperimentConfig

Configuration of an experiment.

JSON representation
{
  "title": string,
  "problemDescription": string,
  "programLanguage": string,
  "runSettings": {
    object (RunSettings)
  },
  "generationSettings": {
    object (GenerationSettings)
  },
  "evolutionSettings": {
    object (EvolutionSettings)
  }
}
Fields
title

string

Required. title of the experiment.

problemDescription

string

Required. description of the problem to be solved by the experiment.

programLanguage

string

Required. Primary programming language of the code being optimized.

runSettings

object (RunSettings)

Required. Run settings for the experiment, controlling the overall behavior of the experiment run.

generationSettings

object (GenerationSettings)

Optional. Generation settings for the experiment, controlling how new program candidates are generated, including things LLM parameters and user-provided context and prompts.

evolutionSettings

object (EvolutionSettings)

Optional. Evolution settings for the experiment.

RunSettings

Run settings for the experiment.

JSON representation
{
  "maxPrograms": integer,
  "concurrency": integer,
  "maxDuration": string
}
Fields
maxPrograms

integer

Required. Maximum number of programs to generate during the experiment run. The initial program counts towards this limit. Must be greater than 1.

concurrency

integer

Required. Maximum number of programs that can be generated in parallel. Must be positive.

maxDuration

string (Duration format)

Optional. Maximum duration of the experiment. If unset, defaults to 24 hours.

A duration in seconds with up to nine fractional digits, ending with 's'. Example: "3.5s".

GenerationSettings

Generation settings for the experiment.

JSON representation
{
  "context": string,
  "includeFullProgramInPrompt": boolean,
  "models": [
    {
      object (ModelConfig)
    }
  ]
}
Fields
context

string

Optional. Additional user-provided context to be used during generation.

includeFullProgramInPrompt

boolean

Optional. When true, the LLM prompt includes the full program text (both mutable EVOLVE-BLOCK regions and immutable boilerplate). When false (default), only the mutable EVOLVE-BLOCK regions are shown, saving context window.

models[]

object (ModelConfig)

Optional. Per-model configuration. See ModelConfig for details. If left unset, the server selects a default model.

ModelConfig

Per-model configuration. Mutually exclusive with modelMixture and model: when models is set, both modelMixture and model must be left unset.

The same allowed-model list and at-most-2-models rule as for modelMixture apply. In addition, each entry may specify a per-model temperature for LLM sampling. Unlike modelMixture, weights here are relative: only their ratios matter (the server normalizes them), so callers may use any positive numbers without having to ensure they sum to 1.0.

JSON representation
{
  "name": string,
  "weight": number
}
Fields
name

string

Required. Model name (e.g. gemini-2.5-flash, gemini-3.1-pro-preview). See modelMixture for the list of allowed models.

weight

number

Optional. Relative weight for this model in the mixture. Must be a finite, strictly positive value. Weights across all entries are normalized server-side, so they need not sum to 1.0. Defaults to 1.0 when unset, which is convenient when configuring a single model or an even mixture.

Some Pro-tier models are capped at most 50% of the total weight; requests violating that cap are rejected with INVALID_ARGUMENT.

EvolutionSettings

Evolution settings for the experiment.

JSON representation
{
  "parentSamplingConfig": {
    object (ParentSamplingConfig)
  }
}
Fields
parentSamplingConfig

object (ParentSamplingConfig)

Optional. Parent sampling configuration.

ParentSamplingConfig

Configuration for parent sampling.

JSON representation
{
  "paretoSamplingConfig": {
    object (ParetoSamplingConfig)
  }
}
Fields
paretoSamplingConfig

object (ParetoSamplingConfig)

Optional. Pareto sampling configuration.

ParetoSamplingConfig

Configuration for Pareto sampling.

JSON representation
{
  "paretoSamplingProbability": number
}
Fields
paretoSamplingProbability

number

Optional. probability [0.0, 1.0] of sampling parent programs from the Pareto frontier instead of normal fitness-based sampling during candidate generation. Useful when optimizing multiple metrics simultaneously. Default 0.0 (disabled). Only effective when evaluation returns multiple metrics in scores_to_optimize.

AlphaEvolveExperimentStats

Stats about the experiment.

JSON representation
{
  "candidatesCount": integer,
  "evaluatedCandidatesCount": integer,
  "inputTokenCount": string,
  "outputTokenCount": string
}
Fields
candidatesCount

integer

Output only. Number of candidates generated.

evaluatedCandidatesCount

integer

Output only. Number of candidates evaluated.

inputTokenCount

string (int64 format)

Output only. Number of billed input tokens consumed by the experiment.

outputTokenCount

string (int64 format)

Output only. Number of billed output tokens consumed by the experiment.

State

experiment state values.

Enums
STATE_UNSPECIFIED Default value. This value is unused.
CREATED The experiment is created.
RUNNING The experiment is running.
PAUSED The experiment is paused.
COMPLETED The experiment is completed.
FAILED The experiment has failed.

Methods

acquirePrograms

Acquires one or more AlphaEvolveProgram from the generated queue of programs for evaluation.

create

Creates a new AlphaEvolveExperiment.

delete

Deletes an experiment provided the experiment is in an end state (e.g.

get

Get an existing [Experiment][].

list

List all AlphaEvolveExperiments in a given session.

resume

Resumes a workflow to process the AlphaEvolveExperiment.

start

Starts a workflow to process the AlphaEvolveExperiment.

submitProgramsEvaluations

Adds an AlphaEvolveProgramEvaluation to the experiment.