- Resource: AlphaEvolveExperiment
- AlphaEvolveExperimentConfig
- RunSettings
- GenerationSettings
- ModelConfig
- EvolutionSettings
- ParentSamplingConfig
- ParetoSamplingConfig
- AlphaEvolveExperimentStats
- State
- Methods
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 ( |
| Fields | |
|---|---|
name |
Identifier. The full resource name of the experiment. Format: |
createTime |
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: |
config |
Required. experiment configuration. |
stats |
Output only. experiment stats. |
state |
Output only. The state of the experiment. |
initialAlphaEvolveProgram |
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 ( |
| Fields | |
|---|---|
title |
Required. title of the experiment. |
problemDescription |
Required. description of the problem to be solved by the experiment. |
programLanguage |
Required. Primary programming language of the code being optimized. |
runSettings |
Required. Run settings for the experiment, controlling the overall behavior of the experiment run. |
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 |
Optional. Evolution settings for the experiment. |
RunSettings
Run settings for the experiment.
| JSON representation |
|---|
{ "maxPrograms": integer, "concurrency": integer, "maxDuration": string } |
| Fields | |
|---|---|
maxPrograms |
Required. Maximum number of programs to generate during the experiment run. The initial program counts towards this limit. Must be greater than 1. |
concurrency |
Required. Maximum number of programs that can be generated in parallel. Must be positive. |
maxDuration |
Optional. Maximum duration of the experiment. If unset, defaults to 24 hours. A duration in seconds with up to nine fractional digits, ending with ' |
GenerationSettings
Generation settings for the experiment.
| JSON representation |
|---|
{
"context": string,
"includeFullProgramInPrompt": boolean,
"models": [
{
object ( |
| Fields | |
|---|---|
context |
Optional. Additional user-provided context to be used during generation. |
includeFullProgramInPrompt |
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[] |
Optional. Per-model configuration. See |
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 |
Required. Model name (e.g. |
weight |
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 ( |
| Fields | |
|---|---|
parentSamplingConfig |
Optional. Parent sampling configuration. |
ParentSamplingConfig
Configuration for parent sampling.
| JSON representation |
|---|
{
"paretoSamplingConfig": {
object ( |
| Fields | |
|---|---|
paretoSamplingConfig |
Optional. Pareto sampling configuration. |
ParetoSamplingConfig
Configuration for Pareto sampling.
| JSON representation |
|---|
{ "paretoSamplingProbability": number } |
| Fields | |
|---|---|
paretoSamplingProbability |
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 |
Output only. Number of candidates generated. |
evaluatedCandidatesCount |
Output only. Number of candidates evaluated. |
inputTokenCount |
Output only. Number of billed input tokens consumed by the experiment. |
outputTokenCount |
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 |
|
|---|---|
|
Acquires one or more AlphaEvolveProgram from the generated queue of programs for evaluation. |
|
Creates a new AlphaEvolveExperiment. |
|
Deletes an experiment provided the experiment is in an end state (e.g. |
|
Get an existing [Experiment][]. |
|
List all AlphaEvolveExperiments in a given session. |
|
Resumes a workflow to process the AlphaEvolveExperiment. |
|
Starts a workflow to process the AlphaEvolveExperiment. |
|
Adds an AlphaEvolveProgramEvaluation to the experiment. |