AgentOptimizationCandidate Class

  • java.lang.Object
    • com.azure.ai.agents.models.AgentOptimizationCandidate

Implements

public final class AgentOptimizationCandidate
implements JsonSerializable<AgentOptimizationCandidate>

A candidate generated by an optimization job.

Method Summary

Modifier and Type Method and Description
static AgentOptimizationCandidate fromJson(JsonReader jsonReader)

Reads an instance of AgentOptimizationCandidate from the JsonReader.

String getAgentVersion()

Get the agentVersion property: Foundry agent version associated with this candidate.

String getCandidateId()

Get the candidateId property: Server-assigned candidate identifier.

AgentOptimizationCandidateEvaluation getEvaluation()

Get the evaluation property: Comparative evaluation summary.

String getJobId()

Get the jobId property: Identifier of the parent optimization job.

String getName()

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

AgentOptimizationCandidateOutput getOutput()

Get the output property: Typed output generated for this candidate.

AgentOptimizationCandidatePromotionInfo getPromotion()

Get the promotion property: Promotion metadata.

String getRationale()

Get the rationale property: Human-readable explanation of why the optimizer produced this candidate.

OffsetDateTime getStartedAt()

Get the startedAt property: Timestamp when work on this candidate slot began, represented in Unix time.

AgentOptimizationCandidateStatus getStatus()

Get the status property: The candidate's current lifecycle state.

JsonWriter toJson(JsonWriter jsonWriter)

Methods inherited from java.lang.Object

Method Details

fromJson

public static AgentOptimizationCandidate fromJson(JsonReader jsonReader)

Reads an instance of AgentOptimizationCandidate from the JsonReader.

Parameters:

jsonReader - The JsonReader being read.

Returns:

An instance of AgentOptimizationCandidate if the JsonReader was pointing to an instance of it, or null if it was pointing to JSON null.

Throws:

IOException

- If the deserialized JSON object was missing any required properties.

getAgentVersion

public String getAgentVersion()

Get the agentVersion property: Foundry agent version associated with this candidate. Omitted when no temporary or evaluated agent version was created.

Returns:

the agentVersion value.

getCandidateId

public String getCandidateId()

Get the candidateId property: Server-assigned candidate identifier.

Returns:

the candidateId value.

getEvaluation

public AgentOptimizationCandidateEvaluation getEvaluation()

Get the evaluation property: Comparative evaluation summary. Omitted when this candidate was not comparatively evaluated.

Returns:

the evaluation value.

getJobId

public String getJobId()

Get the jobId property: Identifier of the parent optimization job.

Returns:

the jobId value.

getName

public String getName()

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

Returns:

the name value.

getOutput

public AgentOptimizationCandidateOutput getOutput()

Get the output property: Typed output generated for this candidate. The output type matches the parent job's optimization type. Omitted until output is available.

Returns:

the output value.

getPromotion

public AgentOptimizationCandidatePromotionInfo getPromotion()

Get the promotion property: Promotion metadata. Omitted if this candidate has not been promoted.

Returns:

the promotion value.

getRationale

public String getRationale()

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

Returns:

the rationale value.

getStartedAt

public OffsetDateTime getStartedAt()

Get the startedAt property: Timestamp when work on this candidate slot began, represented in Unix time.

Returns:

the startedAt value.

getStatus

public AgentOptimizationCandidateStatus getStatus()

Get the status property: The candidate's current lifecycle state.

Returns:

the status value.

toJson

public JsonWriter toJson(JsonWriter jsonWriter)

Parameters:

jsonWriter

Throws:

Applies to