Passer directement au contenu principal

Ce navigateur n’est plus pris en charge.

Effectuez une mise à niveau vers Microsoft Edge pour tirer parti des dernières fonctionnalités, des mises à jour de sécurité et du support technique.

Télécharger Microsoft Edge Plus d’informations sur Internet Explorer et Microsoft Edge
microsoft-foundry.rest.security.o-auth2-auth

AgentOptimizationJobs

Cancel an agent optimization job

POST /agent_optimization_jobs/{jobId}:cancel

Requests cancellation of a running or queued job. Returns 409 Conflict if the job is already in a terminal state.

Paramètres de chemin d’accès

jobId string obligatoire

The ID of the job to cancel.

Paramètres de la requête

api-version string obligatoire

The API version to use for this operation.

Réponses

The request has succeeded.

Corps

Content-Type: application/json
id string obligatoire

Server-assigned unique identifier.

result AgentOptimizationJobResult

Partial or terminal result produced by an agent optimization job.

candidate_summary AgentOptimizationResultCandidateSummary

Summary of candidates produced by an agent optimization job.

completed_candidate_count integer obligatoire

Number of completed candidates. Does not include the baseline.

baseline_id string

Candidate ID of the original baseline. Omitted until the baseline candidate is available.

best_id string

Candidate ID of the highest-scoring candidate for evaluated jobs, or the selected transformed output for non-comparative jobs. Omitted until a candidate has been selected.

baseline_score number

Normalized score of the baseline candidate from 0.0 to 1.0 for a comparatively evaluated job. Omitted otherwise and until baseline evaluation completes.

best_score number

Best normalized score observed from 0.0 to 1.0 for a comparatively evaluated job. Omitted otherwise and until a candidate completes evaluation.

latest_promoted_candidate AgentOptimizationCandidatePromotionInfo

Promotion metadata recorded for a candidate.

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

The name of the agent.

version string

The version identifier of the agent.

token_usage AgentOptimizationJobTokenUsage[] obligatoire

Aggregate token usage per stage and model. Always present; empty array when no calls were measured.

latency_metrics AgentOptimizationJobLatency[] obligatoire

Aggregate latency per stage and model. Always present; empty when no server-measured latency is available.

termination_reason string | enum

Reason the optimization process ended. Early termination reasons still indicate a successful job; completed candidates remain available.

Un des éléments suivants :
string
enum
completedbudget_exhaustedcandidate_screening_stalled
status string | enum obligatoire

Extensible status values shared by Foundry jobs.

Un des éléments suivants :
string
enum
queuedin_progresssucceededfailedcancelledskipped
error OpenAI.Error
code string | null obligatoire
message string obligatoire
param string | null
type string
misalignment OpenAI.MisalignmentErrorDetailsResource
review_target string | null
error_type string | enum
Un des éléments suivants :
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 obligatoire

The public continuation instruction.

details OpenAI.Error[]

Additional errors that contributed to this failure.

additionalInfo object

Additional structured information about the failure.

debugInfo object

Diagnostic information supplied by the service for troubleshooting.

display_name string

Human-readable label. Omitted when no label is needed; it has no uniqueness, routing, or idempotency semantics.

target_configuration foundry_agent

Base target configuration for an optimization job.

Celui-ci peut avoir l’une des valeurs suivantes :
foundry_agent AgentOptimizationFoundryAgentTargetConfiguration

Identifies the Foundry agent that owns the configuration being optimized.

type enum obligatoire

Foundry-agent target discriminator.

foundry_agent
name string obligatoire

Registered Foundry agent name.

version string

Pinned agent version. Omitted to resolve and pin the latest version.

optimization_model_configuration AgentOptimizationModelConfiguration obligatoire

Identifies a model used by an optimization or evaluation step.

model string obligatoire

A non-empty Foundry model name or existing deployment name.

optimization_configuration agent_optimization | prompt_optimization | skill_optimization obligatoire

Base model for type-specific optimization configuration.

Celui-ci peut avoir l’une des valeurs suivantes :
agent_optimization AgentOptimizationConfiguration

Configuration for optimizing an agent for measured quality.

type enum obligatoire

Optimization type discriminator.

agent_optimization
goal string | enum

Goal for an agent-optimization job.

Un des éléments suivants :
string
enum
improve_quality
evaluation_configuration AgentOptimizationEvaluationConfiguration obligatoire

Reusable quality-measurement configuration for agent optimization.

training_set target_completion | user_conversation_simulation obligatoire

Base discriminated model for an optimization evaluation set.

Celui-ci peut avoir l’une des valeurs suivantes :
target_completion AgentOptimizationTargetCompletionEvaluationSet

Evaluation set containing independent single-turn inputs.

type enum obligatoire

Target-completion set discriminator.

target_completion
source inline | dataset_reference obligatoire

Base source for a target-completion optimization evaluation set.

Celui-ci peut avoir l’une des valeurs suivantes :
inline AgentOptimizationTargetCompletionInlineDataSource

Supplies single-turn rows directly in the optimization request.

type enum obligatoire

Inline source discriminator.

inline
test_cases AgentOptimizationTargetCompletionTestCase[] obligatoire

Target-completion test cases.

dataset_reference AgentOptimizationTargetCompletionDatasetReferenceDataSource

References an explicitly versioned registered Foundry dataset for target-completion evaluation.

type enum obligatoire

Registered dataset source discriminator.

dataset_reference
name string obligatoire

Registered dataset name.

version string obligatoire

Registered dataset version.

user_conversation_simulation AgentOptimizationUserConversationSimulationEvaluationSet

Evaluation set containing scenarios for simulated conversations.

type enum obligatoire

User-conversation-simulation set discriminator.

user_conversation_simulation
source inline | dataset_reference obligatoire

Base source for a user-conversation-simulation optimization evaluation set.

Celui-ci peut avoir l’une des valeurs suivantes :
inline AgentOptimizationUserConversationSimulationInlineDataSource

Supplies Evals user-conversation simulation test cases directly in the optimization request.

type enum obligatoire

Inline source discriminator.

inline
test_cases UserConversationSimulationTestCase[] obligatoire

Conversation test scenarios.

dataset_reference AgentOptimizationUserConversationSimulationDatasetReferenceDataSource

References an explicitly versioned registered Foundry dataset for user-conversation-simulation evaluation.

type enum obligatoire

Registered dataset source discriminator.

dataset_reference
name string obligatoire

Registered dataset name.

version string obligatoire

Registered dataset version.

default_simulation_configuration UserConversationSimulationConfiguration

Configures the number, length, audio effects, and simulated user behavior of conversations.

max_num_turns integer

Hard limit on turns in each conversation. When omitted, the service defaults to 20.

conversation_repetitions integer

Number of independent conversation repetitions for each test case. Defaults to 1 when not specified at either the data-source or test-case level.

desired_num_turns integer

Target number of turns in each conversation. The effective value cannot exceed the effective max_num_turns. When omitted, no target is set and the simulation model determines the conversation length dynamically from the scenario.

audio_effects UserConversationSimulationAudioEffectsConfiguration

Configures effects applied to simulated conversation audio.

effects UserConversationSimulationAudioEffect[]

Effects to apply to simulated audio.

volume_percentage integer

Volume of the configured audio effects, as a percentage from 1 through 100. When omitted, the service defaults to 15.

user_behavior UserConversationSimulationUserBehaviorConfiguration

Configures conversation behavior for the simulated user.

interruption default

Configuration for simulated user interruption behavior.

Celui-ci peut avoir l’une des valeurs suivantes :
default UserConversationSimulationDefaultInterruptionConfiguration

Configures the default interruption behavior for the simulated user.

type enum obligatoire

The interruption type, always default.

default
validation_set target_completion | user_conversation_simulation

Base discriminated model for an optimization evaluation set.

Celui-ci peut avoir l’une des valeurs suivantes :
target_completion AgentOptimizationTargetCompletionEvaluationSet

Evaluation set containing independent single-turn inputs.

type enum obligatoire

Target-completion set discriminator.

target_completion
source inline | dataset_reference obligatoire

Base source for a target-completion optimization evaluation set.

Celui-ci peut avoir l’une des valeurs suivantes :
inline AgentOptimizationTargetCompletionInlineDataSource

Supplies single-turn rows directly in the optimization request.

type enum obligatoire

Inline source discriminator.

inline
test_cases AgentOptimizationTargetCompletionTestCase[] obligatoire

Target-completion test cases.

dataset_reference AgentOptimizationTargetCompletionDatasetReferenceDataSource

References an explicitly versioned registered Foundry dataset for target-completion evaluation.

type enum obligatoire

Registered dataset source discriminator.

dataset_reference
name string obligatoire

Registered dataset name.

version string obligatoire

Registered dataset version.

user_conversation_simulation AgentOptimizationUserConversationSimulationEvaluationSet

Evaluation set containing scenarios for simulated conversations.

type enum obligatoire

User-conversation-simulation set discriminator.

user_conversation_simulation
source inline | dataset_reference obligatoire

Base source for a user-conversation-simulation optimization evaluation set.

Celui-ci peut avoir l’une des valeurs suivantes :
inline AgentOptimizationUserConversationSimulationInlineDataSource

Supplies Evals user-conversation simulation test cases directly in the optimization request.

type enum obligatoire

Inline source discriminator.

inline
test_cases UserConversationSimulationTestCase[] obligatoire

Conversation test scenarios.

dataset_reference AgentOptimizationUserConversationSimulationDatasetReferenceDataSource

References an explicitly versioned registered Foundry dataset for user-conversation-simulation evaluation.

type enum obligatoire

Registered dataset source discriminator.

dataset_reference
name string obligatoire

Registered dataset name.

version string obligatoire

Registered dataset version.

default_simulation_configuration UserConversationSimulationConfiguration

Configures the number, length, audio effects, and simulated user behavior of conversations.

max_num_turns integer

Hard limit on turns in each conversation. When omitted, the service defaults to 20.

conversation_repetitions integer

Number of independent conversation repetitions for each test case. Defaults to 1 when not specified at either the data-source or test-case level.

desired_num_turns integer

Target number of turns in each conversation. The effective value cannot exceed the effective max_num_turns. When omitted, no target is set and the simulation model determines the conversation length dynamically from the scenario.

audio_effects UserConversationSimulationAudioEffectsConfiguration

Configures effects applied to simulated conversation audio.

effects UserConversationSimulationAudioEffect[]

Effects to apply to simulated audio.

volume_percentage integer

Volume of the configured audio effects, as a percentage from 1 through 100. When omitted, the service defaults to 15.

user_behavior UserConversationSimulationUserBehaviorConfiguration

Configures conversation behavior for the simulated user.

interruption default

Configuration for simulated user interruption behavior.

Celui-ci peut avoir l’une des valeurs suivantes :
default UserConversationSimulationDefaultInterruptionConfiguration

Configures the default interruption behavior for the simulated user.

type enum obligatoire

The interruption type, always default.

default
evaluators AgentOptimizationEvaluator[] obligatoire

Evaluator references used to score candidate quality.

evaluation_model EvaluationModelConfiguration obligatoire

Configures the model that plays the simulated user. This model is separate from the evaluated target.

model string obligatoire

Model deployment that generates simulated user turns, in the format {connectionName}/modelDeploymentName.

sampling_params ModelSamplingParams

Represents a set of parameters used to control the sampling behavior of a language model during text generation.

temperature number

The temperature parameter for sampling. Defaults to 1.0.

top_p number

The top-p parameter for nucleus sampling. Defaults to 1.0.

seed integer

The random seed for reproducibility. Defaults to 42.

max_completion_tokens integer

The maximum number of tokens allowed in the completion.

voice_model azure-standard

Voice configuration used to convert text to speech for evaluation through the Voice Live endpoint.

Celui-ci peut avoir l’une des valeurs suivantes :
azure-standard EvaluationAzureStandardVoiceModelConfiguration

Configures an Azure standard neural voice used to convert text to speech for evaluation through the Voice Live endpoint.

type enum obligatoire

The voice kind. Always azure-standard.

azure-standard
name string obligatoire

The Azure neural voice name.

temperature number

The synthesis temperature, from 0 to 1. When omitted, the service defaults to the underlying voice model's default temperature.

max_concurrent_agent_runs integer

Maximum number of target-agent runs executed concurrently during each single-turn evaluation. If omitted, the service defaults to 1. Conversation evaluation supports only 1.

candidate_search_configuration AgentOptimizationCandidateSearchConfiguration obligatoire

Candidate search settings.

max_candidates integer

Maximum number of non-baseline candidates to fully evaluate. If omitted, the service defaults to 1.

baseline_agent_configuration AgentOptimizationBaselineAgentConfiguration

Caller-supplied baseline agent values that cannot be resolved from the target agent.

system_prompt string

Caller-supplied baseline system prompt. Omitted to resolve the baseline from the target; a prompt agent's stored definition is authoritative.

current_model string

A non-empty Foundry model name or existing deployment name.

skills AgentOptimizationSkill[]

Skills available for optimization. Omitted when no manual skill surface is supplied.

tools OpenAI.ChatCompletionTool[]

Function tools available for optimization. Omitted when no manual tool surface is supplied. The optimizer may change function and argument descriptions while preserving names and parameter JSON Schema.

agent_optimization_space AgentOptimizationSpace obligatoire

The agent attributes and alternative values available to an agent-optimization search.

target_attributes TargetAttribute[]

Agent attributes the optimizer may change. If omitted, the service defaults to instructions.

model_search_space AgentOptimizationModelName[]

Alternative model names or existing deployment names available when model is an optimization target.

prompt_optimization PromptOptimizationConfiguration

Configuration for a one-shot prompt transformation without comparative evaluation.

type enum obligatoire

Optimization type discriminator.

prompt_optimization
context OptimizationContext[]

Steering context for prompt optimization. Agent trace and skill reference context are supported only by skill optimization. Omitted when no context is supplied.

skill_optimization SkillOptimizationConfiguration

Configuration for generating a single skill candidate from trace evidence. The candidate can contain zero or more skill outcomes; no new learnings can produce an empty skill_results array without publishing versions. Optional evaluation reuses a non-generated baseline candidate.

type enum obligatoire

Skill optimization discriminator.

skill_optimization
context OptimizationContext[] obligatoire

At least one context item containing trace evidence, optional steering guidance, and optional exact baseline references. Supply agent_traces context; use separate steering_prompt and skill_references items for guidance and baselines. For skill optimization only, a steering prompt must be non-empty and at most 100 KiB (102,400 UTF-8 bytes), enforced by the service; oversized prompts are rejected rather than truncated.

training_split_ratio number

Fraction of generated question groups assigned to learning, strictly greater than 0 and less than 1. Defaults to 0.7 when omitted. Normalized questions and shared source traces stay in the same group, and every generated row belongs to learning or validation. The service rejects splits that leave either side empty. Caller-provided validation data is not split.

evaluation_configuration SkillOptimizationEvaluationConfiguration

Skill-only evaluation inputs. Training-trace grading can inform single-shot learning; supported before/after comparison reports impact without gating publication.

validation_set AgentOptimizationTargetCompletionEvaluationSet

Evaluation set containing independent single-turn inputs.

type enum obligatoire

Target-completion set discriminator.

target_completion
source inline | dataset_reference obligatoire

Base source for a target-completion optimization evaluation set.

Celui-ci peut avoir l’une des valeurs suivantes :
inline AgentOptimizationTargetCompletionInlineDataSource

Supplies single-turn rows directly in the optimization request.

type enum obligatoire

Inline source discriminator.

inline
test_cases AgentOptimizationTargetCompletionTestCase[] obligatoire

Target-completion test cases.

dataset_reference AgentOptimizationTargetCompletionDatasetReferenceDataSource

References an explicitly versioned registered Foundry dataset for target-completion evaluation.

type enum obligatoire

Registered dataset source discriminator.

dataset_reference
name string obligatoire

Registered dataset name.

version string obligatoire

Registered dataset version.

evaluators AgentOptimizationEvaluator[]

Existing evaluator reference. At submission, supply exactly one reference or evaluator_generation_configuration, not both; the service validates this combination. After preparation, contains the resolved exact evaluator version used for training grading and supported baseline and learned-candidate evaluation.

evaluation_model EvaluationModelConfiguration obligatoire

Configures the model that plays the simulated user. This model is separate from the evaluated target.

model string obligatoire

Model deployment that generates simulated user turns, in the format {connectionName}/modelDeploymentName.

sampling_params ModelSamplingParams

Represents a set of parameters used to control the sampling behavior of a language model during text generation.

temperature number

The temperature parameter for sampling. Defaults to 1.0.

top_p number

The top-p parameter for nucleus sampling. Defaults to 1.0.

seed integer

The random seed for reproducibility. Defaults to 42.

max_completion_tokens integer

The maximum number of tokens allowed in the completion.

voice_model azure-standard

Voice configuration used to convert text to speech for evaluation through the Voice Live endpoint.

Celui-ci peut avoir l’une des valeurs suivantes :
azure-standard EvaluationAzureStandardVoiceModelConfiguration

Configures an Azure standard neural voice used to convert text to speech for evaluation through the Voice Live endpoint.

type enum obligatoire

The voice kind. Always azure-standard.

azure-standard
name string obligatoire

The Azure neural voice name.

temperature number

The synthesis temperature, from 0 to 1. When omitted, the service defaults to the underlying voice model's default temperature.

max_concurrent_agent_runs integer

Maximum number of target-agent runs executed concurrently during each target-completion evaluation, from 1 to 10. If omitted, the service defaults to 1.

evaluator_generation_configuration agent_traces

Base configuration for service-generated optimization evaluators. Currently supported for skill optimization only. Uses evaluation_configuration.evaluation_model; no separate generation model is accepted.

Celui-ci peut avoir l’une des valeurs suivantes :
agent_traces AgentOptimizationTraceEvaluatorGenerationConfiguration

Generates an evaluator from the job's trace evidence or a separate evaluator-only trace selection.

type enum obligatoire

Generate evaluators from the agent_traces context.

agent_traces
trace_window fixed | trace_ids

Trace selection window for a one-time skill optimization job.

Celui-ci peut avoir l’une des valeurs suivantes :
fixed AgentOptimizationFixedTraceWindow

Selects the latest readable trace conversations in a half-open interval, independently of feedback availability.

type enum obligatoire

Fixed-window discriminator.

fixed
start_time integer obligatoire
end_time integer obligatoire
max_traces integer

Maximum number of trace conversations to select, from 1 to 100 inclusive. If omitted, the service defaults to 100. Selects the latest matching readable traces before collecting their annotations or evaluation results; feedback availability does not affect selection priority.

trace_ids AgentOptimizationTraceIdsTraceWindow

Selects explicit trace IDs within the configured telemetry source and a lookback interval ending at job creation.

type enum obligatoire

Explicit trace-ID selection discriminator.

trace_ids
trace_ids string[] obligatoire

At least one explicit trace identifier to look up within the configured telemetry source. Service support, maximum list size, duplicate handling, and missing-ID behavior are TBD.

lookback_hours integer obligatoire

Telemetry lookup horizon in hours, at least 1. The half-open lookup interval starts this many hours before job creation and ends at job creation; retries do not move the anchor.

run_duration_ms integer obligatoire

A duration encoded as an integer number of milliseconds.

created_at integer obligatoire
updated_at integer obligatoire
warnings string[]

Non-fatal warnings emitted during optimization. Omitted when no warnings were produced.

Client error

Corps

Content-Type: application/json
error OpenAI.Error obligatoire
code string | null obligatoire
message string obligatoire
param string | null
type string
misalignment OpenAI.MisalignmentErrorDetailsResource
review_target string | null
error_type string | enum
Un des éléments suivants :
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 obligatoire

The public continuation instruction.

details OpenAI.Error[]

Additional errors that contributed to this failure.

additionalInfo object

Additional structured information about the failure.

debugInfo object

Diagnostic information supplied by the service for troubleshooting.

Server error

Corps

Content-Type: application/json
error OpenAI.Error obligatoire
code string | null obligatoire
message string obligatoire
param string | null
type string
misalignment OpenAI.MisalignmentErrorDetailsResource
review_target string | null
error_type string | enum
Un des éléments suivants :
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 obligatoire

The public continuation instruction.

details OpenAI.Error[]

Additional errors that contributed to this failure.

additionalInfo object

Additional structured information about the failure.

debugInfo object

Diagnostic information supplied by the service for troubleshooting.

Requête

POST /agent_optimization_jobs/{jobId}:cancel HTTP/1.1

Response

Status: 200
Content-Type: application/json
Status: 4XX
Content-Type: application/json
Status: 5XX
Content-Type: application/json
fr-fr
Vos choix en matière de confidentialité
  • Clause d’exclusion de responsabilité sur l’IA
  • Versions antérieures
  • Blog
  • Collaboration
  • Confidentialité
  • Confidentialité de la santé des consommateurs
  • Conditions d’utilisation
  • Accessibilité
  • Marques
  • © Microsoft 2026