agents
Creates, updates, deletes, gets or lists an agents resource.
Overview
| Name | agents |
| Type | Resource |
| Id | azure.ai_agents.agents |
Fields
The following fields are returned by SELECT queries:
- get_agent
- list_agents
| Name | Datatype | Description |
|---|---|---|
id | string | The identifier, which can be referenced in API endpoints. Required. |
name | string | The name of the agent. Required. |
created_at | string (date-time) | The Unix timestamp, in seconds, representing when this object was created. Required. |
description | string | The description of the agent. Required. |
instructions | string | The system instructions for the agent to use. 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. |
model | string | The ID of the model to use. Required. |
object | string | The object type, which is always assistant. Required. Default value is "assistant". |
response_format | object | The response format of the tool calls used by this agent. Is one of the following types: str, Union[str, "_models.AgentsResponseFormatMode"], AgentsResponseFormat, ResponseFormatJsonSchemaType |
temperature | number | What sampling temperature to use, between 0 and 2. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic. Required. |
tool_resources | object | A set of resources that are used by the agent's tools. The resources are specific to the type of tool. For example, the code_interpreter tool requires a list of file IDs, while the file_search tool requires a list of vector store IDs. Required. |
tools | array | The collection of tools enabled for the agent. Required. |
top_p | number | An alternative to sampling with temperature, called nucleus sampling, where the model considers the results of the tokens with top_p probability mass. So 0.1 means only the tokens comprising the top 10% probability mass are considered. We generally recommend altering this or temperature but not both. Required. |
| Name | Datatype | Description |
|---|---|---|
id | string | The identifier, which can be referenced in API endpoints. Required. |
name | string | The name of the agent. Required. |
created_at | string (date-time) | The Unix timestamp, in seconds, representing when this object was created. Required. |
description | string | The description of the agent. Required. |
instructions | string | The system instructions for the agent to use. 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. |
model | string | The ID of the model to use. Required. |
object | string | The object type, which is always assistant. Required. Default value is "assistant". |
response_format | object | The response format of the tool calls used by this agent. Is one of the following types: str, Union[str, "_models.AgentsResponseFormatMode"], AgentsResponseFormat, ResponseFormatJsonSchemaType |
temperature | number | What sampling temperature to use, between 0 and 2. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic. Required. |
tool_resources | object | A set of resources that are used by the agent's tools. The resources are specific to the type of tool. For example, the code_interpreter tool requires a list of file IDs, while the file_search tool requires a list of vector store IDs. Required. |
tools | array | The collection of tools enabled for the agent. Required. |
top_p | number | An alternative to sampling with temperature, called nucleus sampling, where the model considers the results of the tokens with top_p probability mass. So 0.1 means only the tokens comprising the top 10% probability mass are considered. We generally recommend altering this or temperature but not both. Required. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get_agent | select | assistant_id, endpoint | Retrieves an existing agent. | |
list_agents | select | endpoint | limit, order, after, before | Gets a list of agents that were previously created. |
create_agent | insert | endpoint | Creates a new agent. | |
update_agent | exec | assistant_id, endpoint | Modifies an existing agent. |
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 |
|---|---|---|
assistant_id | string | The ID of the agent to modify. Required. |
endpoint | string | The service endpoint host (no scheme), e.g. myaccount.table.cosmos.azure.com:443 - value of the client endpoint parameter. (default: ) |
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. |
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_agent
- list_agents
Retrieves an existing agent.
SELECT
id,
name,
created_at,
description,
instructions,
metadata,
model,
object,
response_format,
temperature,
tool_resources,
tools,
top_p
FROM azure.ai_agents.agents
WHERE assistant_id = '{{ assistant_id }}' -- required
AND endpoint = '{{ endpoint }}' -- required
;
Gets a list of agents that were previously created.
SELECT
id,
name,
created_at,
description,
instructions,
metadata,
model,
object,
response_format,
temperature,
tool_resources,
tools,
top_p
FROM azure.ai_agents.agents
WHERE endpoint = '{{ endpoint }}' -- required
AND limit = '{{ limit }}'
AND order = '{{ order }}'
AND after = '{{ after }}'
AND before = '{{ before }}'
;
INSERT examples
- create_agent
- Manifest
Creates a new agent.
INSERT INTO azure.ai_agents.agents (
endpoint
)
SELECT
'{{ endpoint }}'
RETURNING
id,
name,
created_at,
description,
instructions,
metadata,
model,
object,
response_format,
temperature,
tool_resources,
tools,
top_p
;
# Description fields are for documentation purposes
- name: agents
props:
- name: endpoint
value: "{{ endpoint }}"
description: Required parameter for the agents resource.
Lifecycle Methods
- update_agent
Modifies an existing agent.
EXEC azure.ai_agents.agents.update_agent
@assistant_id='{{ assistant_id }}' --required,
@endpoint='{{ endpoint }}' --required
;