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

Resource: AlphaEvolveProgram

Represents a single program to be used within the context of an AlphaEvolve experiment.

JSON representation
{
  "name": string,
  "createTime": string,
  "content": {
    object (AlphaEvolveProgramContent)
  },
  "evaluation": {
    object (AlphaEvolveProgramEvaluation)
  },
  "parentPrograms": [
    string
  ],
  "lockToken": string,
  "state": enum (ProgramState)
}
Fields
name

string

Identifier. Unique identifier for the program. Format: projects/{project}/locations/{location}/collections/{collection}/engines/{engine}/sessions/{session}/alphaEvolveExperiments/{alphaEvolveExperiment}/alphaEvolvePrograms/{alphaEvolveProgram}

createTime

string (Timestamp format)

Output only. time when the program 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".

content

object (AlphaEvolveProgramContent)

Optional. Content of the program.

evaluation

object (AlphaEvolveProgramEvaluation)

Optional. Evaluation results for the program.

parentPrograms[]

string

Output only. Optionally specifies which parent programs this program was evolved from. Format: projects/{project}/locations/{location}/collections/{collection}/engines/{engine}/sessions/{session}/alphaEvolveExperiments/{alphaEvolveExperiment}/alphaEvolvePrograms/{alphaEvolveProgram}

lockToken

string

Optional. Lock token for the program.

state

enum (ProgramState)

Output only. state of the program.

AlphaEvolveProgramContent

A self-contained message containing the content of a program. Can represent a collection of files.

JSON representation
{
  "description": string,
  "files": [
    {
      object (AlphaEvolveSourceFile)
    }
  ]
}
Fields
description

string

Optional. description of the program.

files[]

object (AlphaEvolveSourceFile)

Required. A list of source files that make up the overall program.

AlphaEvolveSourceFile

A single source file with its path, content and metadata.

JSON representation
{
  "path": string,
  "content": string,
  "programLanguage": string,
  "description": string
}
Fields
path

string

Required. The relative path of the file, including the filename. e.g., "src/main.py", "utils/helpers.js", "README.md"

content

string

Required. The raw content of the file. This is a string and not bytes, because it should be ultimately processed by the LLM as text.

programLanguage

string

Optional. The programming language of the file.

description

string

Optional. Additional description of the file.

AlphaEvolveProgramEvaluation

Evaluation results for a program candidate.

JSON representation
{
  "scores": {
    object (AlphaEvolveEvaluationScores)
  },
  "insights": {
    object (AlphaEvolveEvaluationInsights)
  }
}
Fields
scores

object (AlphaEvolveEvaluationScores)

Optional. Contains the evaluation scores for the target metrics to optimize.

insights

object (AlphaEvolveEvaluationInsights)

Optional. Represents various insights about the candidate, which are not directly used as optimization target, but that can be used to improve subsequent generations, and as such can be used to construct the evolution prompt.

AlphaEvolveEvaluationScores

Contains the evaluation scores for the target metrics to optimize.

JSON representation
{
  "scores": [
    {
      object (AlphaEvolveEvaluationScore)
    }
  ]
}
Fields
scores[]

object (AlphaEvolveEvaluationScore)

Required. List of evaluation scores.

AlphaEvolveEvaluationScore

Score for a single metric.

JSON representation
{
  "metric": string,
  "score": number
}
Fields
metric

string

Required. name of the metric.

score

number

Required. Score of a program for this metric.

AlphaEvolveEvaluationInsights

Evaluation insights for a program.

JSON representation
{
  "insights": [
    {
      object (AlphaEvolveEvaluationInsight)
    }
  ]
}
Fields
insights[]

object (AlphaEvolveEvaluationInsight)

Optional. List of evaluation insights.

AlphaEvolveEvaluationInsight

A single evaluation insight.

JSON representation
{
  "label": string,
  "text": string
}
Fields
label

string

Optional. label of the insight.

text

string

Optional. Text of the insight.

ProgramState

state of a program in an experiment.

Enums
PROGRAM_STATE_UNSPECIFIED Default value. This value is unused.
INITIALIZED The program is initialized.
GENERATING The program is in generation.
EVALUATING The program is pending evaluation.
COMPLETED The program is completed.

Methods

create

Creates a new AlphaEvolveProgram.

get

Gets an existing AlphaEvolveProgram.

list

List all AlphaEvolvePrograms in a given experiment that follow the criteria provided in the request.