Skip to main content

This browser is no longer supported.

Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.

Download Microsoft Edge More info about Internet Explorer and Microsoft Edge
microsoft-foundry.rest.security.o-auth2-auth

AgentOptimizationJobs

Get a candidate for an agent optimization job

GET /agent_optimization_jobs/{jobId}/candidates/{candidateId}

Retrieves a single candidate. Mutation values are always included.

Path parameters

jobId string required

The ID of the parent optimization job.

candidateId string required

The candidate identifier.

Query parameters

api-version string required

The API version to use for this operation.

Responses

The request has succeeded.

Body

Content-Type: application/json
candidate_id string required

Server-assigned candidate identifier.

job_id string required

Identifier of the parent optimization job.

name string required

Display name of the candidate (e.g., 'baseline', 'instruction-v2').

status string | enum required

The candidate's lifecycle state.

Any of the following:
string
enum
generatingevaluatingcompletedfailed
started_at integer required
output agent_optimization | prompt_optimization

Base candidate output. Job types define derived output models with their own fields.

One of the following:
agent_optimization AgentOptimizationAgentCandidateOutput

Candidate output produced by an agent-optimization job.

type enum required
agent_optimization
mutations AgentOptimizationMutation[]

Typed configuration mutations applied to the baseline. Omitted for the baseline candidate. LIST without expand=mutations returns mutation items with only type; expanded LIST and candidate GET populate each mutation's value.

prompt_optimization AgentOptimizationPromptCandidateOutput

Candidate output produced by a prompt-optimization job.

type enum required
prompt_optimization
mutations AgentOptimizationMutation[]

Typed configuration mutations applied to the baseline. Omitted for the baseline candidate. LIST without expand=mutations returns mutation items with only type; expanded LIST and candidate GET populate each mutation's value.

rationale string

Human-readable explanation of why the optimizer produced this candidate. Populated on candidate GET when available and omitted from LIST.

agent_version string

Foundry agent version associated with this candidate. Omitted when no temporary or evaluated agent version was created.

evaluation AgentOptimizationCandidateEvaluation

Comparative evaluation summary for a candidate.

score number

Average composite score across evaluated tasks. Omitted until scoring produces an aggregate score.

avg_tokens number

Average total tokens consumed per task. Omitted when token usage was not measured.

avg_latency_ms integer

A duration encoded as an integer number of milliseconds.

eval_id string

Foundry evaluation identifier used to score this candidate. Omitted when unavailable.

eval_run_id string

Foundry evaluation run identifier used to score this candidate. Omitted when unavailable.

completed_at integer
promotion AgentOptimizationCandidatePromotionInfo

Promotion metadata recorded for a candidate.

promoted_at integer required
promoted_agent AgentReference required
type enum required
agent_reference
name string required

The name of the agent.

version string

The version identifier of the agent.

Client error

Body

Content-Type: application/json
error OpenAI.Error required
code string | null required
message string required
param string | null
type string
misalignment OpenAI.MisalignmentErrorDetailsResource
review_target string | null
error_type string | enum
Any of the following:
string
enum
potentially_unintended_data_transferpotentially_unintended_data_accesspotentially_unintended_destructive_activityother
detailed_explanation string

The public explanation for this block.

steer OpenAI._MisalignmentSteer
message string required

The public continuation instruction.

details OpenAI.Error[]
additionalInfo object
debugInfo object

Server error

Body

Content-Type: application/json
error OpenAI.Error required
code string | null required
message string required
param string | null
type string
misalignment OpenAI.MisalignmentErrorDetailsResource
review_target string | null
error_type string | enum
Any of the following:
string
enum
potentially_unintended_data_transferpotentially_unintended_data_accesspotentially_unintended_destructive_activityother
detailed_explanation string

The public explanation for this block.

steer OpenAI._MisalignmentSteer
message string required

The public continuation instruction.

details OpenAI.Error[]
additionalInfo object
debugInfo object

Request

GET /agent_optimization_jobs/{jobId}/candidates/{candidateId} HTTP/1.1

Response

Status: 200
Content-Type: application/json
Status: 4XX
Content-Type: application/json
Status: 5XX
Content-Type: application/json
en-us
Your Privacy Choices
  • AI Disclaimer
  • Previous Versions
  • Blog
  • Contribute
  • Privacy
  • Consumer Health Privacy
  • Terms of Use
  • Trademarks
  • © Microsoft 2026