run_steps
Creates, updates, deletes, gets or lists a run_steps resource.
Overview
| Name | run_steps |
| Type | Resource |
| Id | azure.ai_agents.run_steps |
Fields
The following fields are returned by SELECT queries:
- get
- list
| Name | Datatype | Description |
|---|---|---|
id | string | The identifier, which can be referenced in API endpoints. Required. |
assistant_id | string | The ID of the agent associated with the run step. Required. |
run_id | string | The ID of the run that this run step is a part of. Required. |
thread_id | string | The ID of the thread that was run. Required. |
cancelled_at | string (date-time) | The Unix timestamp, in seconds, representing when this was cancelled. Required. |
completed_at | string (date-time) | The Unix timestamp, in seconds, representing when this completed. Required. |
created_at | string (date-time) | The Unix timestamp, in seconds, representing when this object was created. Required. |
expired_at | string (date-time) | The Unix timestamp, in seconds, representing when this item expired. Required. |
failed_at | string (date-time) | The Unix timestamp, in seconds, representing when this failed. Required. |
last_error | object | If applicable, information about the last error encountered by this run step. Required. |
metadata | object | A set of up to 16 key/value pairs that can be attached to an object, used for storing additional information about that object in a structured format. Keys may be up to 64 characters in length and values may be up to 512 characters in length. Required. |
object | string | The object type, which is always 'thread.run.step'. Required. Default value is "thread.run.step". |
status | string | The status of this run step. Required. Known values are: "in_progress", "cancelled", "failed", "completed", and "expired". (in_progress, cancelled, failed, completed, expired) |
step_details | object | The details for this run step. Required. |
type | string | The type of run step, which can be either message_creation or tool_calls. Required. Known values are: "message_creation", "tool_calls", and "activities". (message_creation, tool_calls, activities) |
usage | object | Usage statistics related to the run step. This value will be null while the run step's status is in_progress. |
| Name | Datatype | Description |
|---|---|---|
id | string | The identifier, which can be referenced in API endpoints. Required. |
assistant_id | string | The ID of the agent associated with the run step. Required. |
run_id | string | The ID of the run that this run step is a part of. Required. |
thread_id | string | The ID of the thread that was run. Required. |
cancelled_at | string (date-time) | The Unix timestamp, in seconds, representing when this was cancelled. Required. |
completed_at | string (date-time) | The Unix timestamp, in seconds, representing when this completed. Required. |
created_at | string (date-time) | The Unix timestamp, in seconds, representing when this object was created. Required. |
expired_at | string (date-time) | The Unix timestamp, in seconds, representing when this item expired. Required. |
failed_at | string (date-time) | The Unix timestamp, in seconds, representing when this failed. Required. |
last_error | object | If applicable, information about the last error encountered by this run step. Required. |
metadata | object | A set of up to 16 key/value pairs that can be attached to an object, used for storing additional information about that object in a structured format. Keys may be up to 64 characters in length and values may be up to 512 characters in length. Required. |
object | string | The object type, which is always 'thread.run.step'. Required. Default value is "thread.run.step". |
status | string | The status of this run step. Required. Known values are: "in_progress", "cancelled", "failed", "completed", and "expired". (in_progress, cancelled, failed, completed, expired) |
step_details | object | The details for this run step. Required. |
type | string | The type of run step, which can be either message_creation or tool_calls. Required. Known values are: "message_creation", "tool_calls", and "activities". (message_creation, tool_calls, activities) |
usage | object | Usage statistics related to the run step. This value will be null while the run step's status is in_progress. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get | select | thread_id, run_id, step_id, endpoint | include[] | Retrieves a single run step from a thread run. |
list | select | thread_id, run_id, endpoint | include[], limit, order, after, before | Gets a list of run steps from a thread run. |
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.
| Name | Datatype | Description |
|---|---|---|
endpoint | string | The service endpoint host (no scheme), e.g. myaccount.table.cosmos.azure.com:443 - value of the client endpoint parameter. (default: ) |
run_id | string | Identifier of the run. Required. |
step_id | string | Identifier of the run step. Required. |
thread_id | string | Identifier of the thread. Required. |
after | string | |
before | string | A 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. |
include[] | array | A list of additional fields to include in the response. Currently the only supported value is step_details.tool_calls[*].file_search.results[*].content to fetch the file search result content. Default value is None. |
limit | integer | A 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. |
order | string | Sort order by the created_at timestamp of the objects. asc for ascending order and desc for descending order. Known values are: "asc" and "desc". Default value is None. |
SELECT examples
- get
- list
Retrieves a single run step from a thread run.
SELECT
id,
assistant_id,
run_id,
thread_id,
cancelled_at,
completed_at,
created_at,
expired_at,
failed_at,
last_error,
metadata,
object,
status,
step_details,
type,
usage
FROM azure.ai_agents.run_steps
WHERE thread_id = '{{ thread_id }}' -- required
AND run_id = '{{ run_id }}' -- required
AND step_id = '{{ step_id }}' -- required
AND endpoint = '{{ endpoint }}' -- required
AND include[] = '{{ include[] }}'
;
Gets a list of run steps from a thread run.
SELECT
id,
assistant_id,
run_id,
thread_id,
cancelled_at,
completed_at,
created_at,
expired_at,
failed_at,
last_error,
metadata,
object,
status,
step_details,
type,
usage
FROM azure.ai_agents.run_steps
WHERE thread_id = '{{ thread_id }}' -- required
AND run_id = '{{ run_id }}' -- required
AND endpoint = '{{ endpoint }}' -- required
AND include[] = '{{ include[] }}'
AND limit = '{{ limit }}'
AND order = '{{ order }}'
AND after = '{{ after }}'
AND before = '{{ before }}'
;