Skip to main content

beta_agents

Creates, updates, deletes, gets or lists a beta_agents resource.

Overview

Namebeta_agents
TypeResource
Idazure.ai_projects.beta_agents

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
idstringServer-assigned unique identifier. Required.
created_atstring (date-time)The timestamp when the job was created, represented in Unix time. Required.
errorobjectError details — populated only on failure.
inputsobjectCaller-supplied inputs.
progressobjectProgress snapshot. May be present in terminal states reflecting last-known progress.
resultobjectResult produced on success.
statusstringCurrent lifecycle status. Required. Known values are: "queued", "in_progress", "succeeded", "failed", and "cancelled". (queued, in_progress, succeeded, failed, cancelled)
updated_atstring (date-time)The timestamp when the job was last updated, represented in Unix time. Required.
warningsarrayNon-fatal warnings emitted at any point during optimization.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
get_optimization_jobselectjob_id, endpointGet info about an agent optimization job. Get an optimization job by id.
list_optimization_jobsselectendpointlimit, order, after, before, status, agent_nameReturns a list of agent optimization jobs. List optimization jobs. Supports cursor pagination and optional status / agent_name filters.
create_optimization_jobexecendpointOperation-IdCreates an agent optimization job. Create an optimization job. Returns 201 with the queued job. Honours Operation-Id for idempotent retry.
delete_optimization_jobexecjob_id, endpointDeletes an agent optimization job. Delete the job and its candidate artifacts. Cancels first if non-terminal.
cancel_optimization_jobexecjob_id, endpointCancels an agent optimization job. Request cancellation of a running or queued job. Returns an error if the job is already in a terminal state.

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
endpointstringThe service endpoint host (no scheme), e.g. myaccount.table.cosmos.azure.com:443 - value of the client endpoint parameter. (default: )
job_idstringThe ID of the job to cancel. Required.
Operation-IdstringClient-generated unique ID for idempotent retries. When absent, the server creates the job unconditionally. Default value is None.
afterstring
agent_namestringFilter to jobs targeting this agent name. Default value is None.
beforestringA cursor for use in pagination. before is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with obj_foo, your subsequent call can include before=obj_foo in order to fetch the previous page of the list. Default value is None.
limitintegerA limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 20. Default value is None.
orderstringSort order by the created_at timestamp of the objects. asc for ascending order anddesc for descending order. Known values are: "asc" and "desc". Default value is None.
statusstringFilter to jobs in this lifecycle state. Known values are: "queued", "in_progress", "succeeded", "failed", and "cancelled". Default value is None.

SELECT examples

Get info about an agent optimization job. Get an optimization job by id.

SELECT
id,
created_at,
error,
inputs,
progress,
result,
status,
updated_at,
warnings
FROM azure.ai_projects.beta_agents
WHERE job_id = '{{ job_id }}' -- required
AND endpoint = '{{ endpoint }}' -- required
;

Lifecycle Methods

Creates an agent optimization job. Create an optimization job. Returns 201 with the queued job. Honours Operation-Id for idempotent retry.

EXEC azure.ai_projects.beta_agents.create_optimization_job 
@endpoint='{{ endpoint }}' --required,
@Operation-Id='{{ Operation-Id }}'
@@json=
'{
"inputs": "{{ inputs }}"
}'
;