Get Agent - Get Agent
Retrieves an existing agent.
GET {endpoint}/assistants/{assistantId}?api-version=v1
URI Parameters
Name | In | Required | Type | Description |
---|---|---|---|---|
assistant
|
path | True |
string |
Identifier of the agent. |
endpoint
|
path | True |
string (uri) |
Project endpoint in the form of: https://<aiservices-id>.services.ai.azure.com/api/projects/<project-name> |
api-version
|
query | True |
string minLength: 1 |
The API version to use for this operation. |
Responses
Name | Type | Description |
---|---|---|
200 OK |
The requested agent instance. |
|
Other Status Codes |
An unexpected error response. |
Security
OAuth2Auth
Type:
oauth2
Flow:
implicit
Authorization URL:
https://login.microsoftonline.com/common/oauth2/v2.0/authorize
Scopes
Name | Description |
---|---|
https://ai.azure.com/.default |
Examples
Get |
Get |
GetAgent_MaximumSet
Sample request
GET {endpoint}/assistants/dneldjoxvbteazvgvanfumjkn?api-version=v1
Sample response
{
"id": "ldgcuidjvzrp",
"object": "assistant",
"created_at": 1,
"name": "mldxpytbtdtrukktpciqtkcttk",
"description": "qvci",
"model": "farpqexpvlgrwtjwawkbryjrxmt",
"instructions": "csqxezmbgdisjpndkhvxbrbwpeftb",
"tools": [
{
"type": "ToolDefinition"
}
],
"tool_resources": {
"code_interpreter": {
"file_ids": [
"lrxbwhmsewnzmfushighvgbv",
"lrxbwhmsewnzmfushighvgbv",
"lrxbwhmsewnzmfushighvgbv",
"lrxbwhmsewnzmfushighvgbv",
"lrxbwhmsewnzmfushighvgbv",
"lrxbwhmsewnzmfushighvgbv",
"lrxbwhmsewnzmfushighvgbv",
"lrxbwhmsewnzmfushighvgbv",
"lrxbwhmsewnzmfushighvgbv",
"lrxbwhmsewnzmfushighvgbv",
"lrxbwhmsewnzmfushighvgbv",
"lrxbwhmsewnzmfushighvgbv",
"lrxbwhmsewnzmfushighvgbv",
"lrxbwhmsewnzmfushighvgbv",
"lrxbwhmsewnzmfushighvgbv",
"lrxbwhmsewnzmfushighvgbv",
"lrxbwhmsewnzmfushighvgbv",
"lrxbwhmsewnzmfushighvgbv",
"lrxbwhmsewnzmfushighvgbv"
],
"data_sources": [
{
"uri": "jtookuzhwojyylbips",
"type": "uri_asset"
},
{
"uri": "jtookuzhwojyylbips",
"type": "uri_asset"
},
{
"uri": "jtookuzhwojyylbips",
"type": "uri_asset"
},
{
"uri": "jtookuzhwojyylbips",
"type": "uri_asset"
},
{
"uri": "jtookuzhwojyylbips",
"type": "uri_asset"
},
{
"uri": "jtookuzhwojyylbips",
"type": "uri_asset"
},
{
"uri": "jtookuzhwojyylbips",
"type": "uri_asset"
},
{
"uri": "jtookuzhwojyylbips",
"type": "uri_asset"
},
{
"uri": "jtookuzhwojyylbips",
"type": "uri_asset"
},
{
"uri": "jtookuzhwojyylbips",
"type": "uri_asset"
},
{
"uri": "jtookuzhwojyylbips",
"type": "uri_asset"
}
]
},
"file_search": {
"vector_store_ids": [
"ezeljyggzgyvliaif"
],
"vector_stores": [
{
"name": "jtpzxxafdiapssaxxruzkitbpmdovh",
"configuration": {
"data_sources": [
{
"uri": "jtookuzhwojyylbips",
"type": "uri_asset"
}
]
}
}
]
},
"azure_ai_search": {
"indexes": [
{
"index_connection_id": "nfeoncaophxqnhmsewmckkwbyv",
"index_name": "nidrehbyzdpvelcltqqloq",
"query_type": "simple",
"top_k": 4,
"filter": "hrfico",
"index_asset_id": "wybmymisqviehjpplxbrjtmaxejq"
}
]
}
},
"temperature": 24,
"top_p": 20,
"metadata": {
"key6403": "cafmabfintoktvmzcbkzrimxe"
}
}
GetAgent_MinimumSet
Sample request
GET {endpoint}/assistants/dneldjoxvbteazvgvanfumjkn?api-version=v1
Sample response
{
"id": "ldgcuidjvzrp",
"object": "assistant",
"created_at": 1,
"name": "mldxpytbtdtrukktpciqtkcttk",
"description": "qvci",
"model": "farpqexpvlgrwtjwawkbryjrxmt",
"instructions": "csqxezmbgdisjpndkhvxbrbwpeftb",
"tools": [
{
"type": "ToolDefinition"
}
],
"tool_resources": {},
"temperature": 24,
"top_p": 20,
"metadata": {}
}
Definitions
Name | Description |
---|---|
Agent |
Represents an agent that can call the model and use tools. |
Agent |
Describes the error information returned by the agents API. |
AgentV1Error |
Error payload returned by the agents API. |
AISearch |
A AI Search Index resource. |
Azure |
Available query types for Azure AI Search tool. |
Azure |
The input definition information for an Azure AI search tool as used to configure an agent. |
Azure |
A set of index resources used by the |
Azure |
The structure for keeping storage queue name and URI. |
Azure |
The definition of Azure function. |
Azure |
The structure for keeping storage queue name and URI. |
Azure |
The input definition information for a azure function tool as used to configure an agent. |
Bing |
Search configuration for Bing Grounding |
Bing |
The bing grounding search tool parameters. |
Bing |
The input definition information for a bing grounding search tool as used to configure an agent. |
Code |
The input definition information for a code interpreter tool as used to configure an agent. |
Code |
A set of resources that are used by the |
Connected |
Information for connecting one agent to another as a tool |
Connected |
The input definition information for a connected agent tool which defines a domain specific sub-agent |
File |
Ranking options for file search. |
File |
The input definition information for a file search tool as used to configure an agent. |
File |
Options overrides for the file search tool. |
File |
A set of resources that are used by the |
Function |
The input definition information for a function. |
Function |
The input definition information for a function tool as used to configure an agent. |
Open |
Security details for OpenApi anonymous authentication |
Open |
Authentication type for OpenApi endpoint. Allowed types are:
|
Open |
Security details for OpenApi connection authentication |
Open |
Security scheme for OpenApi managed_identity authentication |
Open |
The input definition information for an openapi function. |
Open |
Security details for OpenApi managed_identity authentication |
Open |
Security scheme for OpenApi managed_identity authentication |
Open |
The input definition information for an OpenAPI tool as used to configure an agent. |
Tool |
A set of resources that are used by the agent's tools. The resources are specific to the type of
tool. For example, the |
Vector |
Vector storage configuration is the list of data sources, used when multiple files can be used for the enterprise file search. |
Vector |
The structure, containing the list of vector storage configurations i.e. the list of azure asset IDs. |
Vector |
The structure, containing Azure asset URI path and the asset type of the file used as a data source for the enterprise file search. |
Vector |
Type of vector storage asset. Asset type may be a uri_asset, in this case it should contain asset URI ID, in the case of id_asset it should contain the data ID. |
Agent
Represents an agent that can call the model and use tools.
Name | Type | Default value | Description |
---|---|---|---|
created_at |
integer (unixtime) |
The Unix timestamp, in seconds, representing when this object was created. |
|
description |
string |
The description of the agent. |
|
id |
string |
The identifier, which can be referenced in API endpoints. |
|
instructions |
string |
The system instructions for the agent to use. |
|
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. |
|
model |
string |
The ID of the model to use. |
|
name |
string |
The name of the agent. |
|
object |
enum:
assistant |
The object type, which is always assistant. |
|
response_format |
Agents |
The response format of the tool calls used by this agent. |
|
temperature |
number (float) |
1 |
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. |
tool_resources |
A set of resources that are used by the agent's tools. The resources are specific to the type of tool. For example, the |
||
tools | ToolDefinition[]: | [] |
The collection of tools enabled for the agent. |
top_p |
number (float) |
1 |
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. |
AgentErrorDetail
Describes the error information returned by the agents API.
Name | Type | Description |
---|---|---|
code |
string |
Machine-readable error code. |
message |
string |
Human-readable description of the error. |
param |
string |
Name of the parameter that caused the error, if applicable. |
type |
string |
Error type identifier (e.g. |
AgentV1Error
Error payload returned by the agents API.
Name | Type | Description |
---|---|---|
error |
Represents the error. |
AISearchIndexResource
A AI Search Index resource.
Name | Type | Description |
---|---|---|
filter |
string |
filter string for search resource. |
index_asset_id |
string |
Index asset id for search resource. |
index_connection_id |
string |
An index connection id in an IndexResource attached to this agent. |
index_name |
string |
The name of an index in an IndexResource attached to this agent. |
query_type |
Type of query in an AIIndexResource attached to this agent. |
|
top_k |
integer (int32) |
Number of documents to retrieve from search and present to the model. |
AzureAISearchQueryType
Available query types for Azure AI Search tool.
Value | Description |
---|---|
simple |
Query type |
semantic |
Query type |
vector |
Query type |
vector_simple_hybrid |
Query type |
vector_semantic_hybrid |
Query type |
AzureAISearchToolDefinition
The input definition information for an Azure AI search tool as used to configure an agent.
Name | Type | Description |
---|---|---|
type |
string:
azure_ai_search |
The object type. |
AzureAISearchToolResource
A set of index resources used by the azure_ai_search
tool.
Name | Type | Description |
---|---|---|
indexes |
The indices attached to this agent. There can be a maximum of 1 index resource attached to the agent. |
AzureFunctionBinding
The structure for keeping storage queue name and URI.
Name | Type | Description |
---|---|---|
storage_queue |
Storage queue. |
|
type |
enum:
storage_queue |
The type of binding, which is always 'storage_queue'. |
AzureFunctionDefinition
The definition of Azure function.
Name | Type | Description |
---|---|---|
function |
The definition of azure function and its parameters. |
|
input_binding |
Input storage queue. The queue storage trigger runs a function as messages are added to it. |
|
output_binding |
Output storage queue. The function writes output to this queue when the input items are processed. |
AzureFunctionStorageQueue
The structure for keeping storage queue name and URI.
Name | Type | Description |
---|---|---|
queue_name |
string |
The name of an Azure function storage queue. |
queue_service_endpoint |
string |
URI to the Azure Storage Queue service allowing you to manipulate a queue. |
AzureFunctionToolDefinition
The input definition information for a azure function tool as used to configure an agent.
Name | Type | Description |
---|---|---|
azure_function |
The definition of the concrete function that the function tool should call. |
|
type |
string:
azure_function |
The object type. |
BingGroundingSearchConfiguration
Search configuration for Bing Grounding
Name | Type | Description |
---|---|---|
connection_id |
string |
Connection id for grounding with bing search |
count |
integer (int64) |
The number of search results to return in the bing api response |
freshness |
string |
Filter search results by a specific time range. Accepted values: https://learn.microsoft.com/bing/search-apis/bing-web-search/reference/query-parameters |
market |
string |
The market where the results come from. |
set_lang |
string |
The language to use for user interface strings when calling Bing API. |
BingGroundingSearchToolParameters
The bing grounding search tool parameters.
Name | Type | Description |
---|---|---|
search_configurations |
The search configurations attached to this tool. There can be a maximum of 1 search configuration resource attached to the tool. |
BingGroundingToolDefinition
The input definition information for a bing grounding search tool as used to configure an agent.
Name | Type | Description |
---|---|---|
bing_grounding |
The bing grounding search tool parameters. |
|
type |
string:
bing_grounding |
The object type. |
CodeInterpreterToolDefinition
The input definition information for a code interpreter tool as used to configure an agent.
Name | Type | Description |
---|---|---|
type |
string:
code_interpreter |
The object type. |
CodeInterpreterToolResource
A set of resources that are used by the code_interpreter
tool.
Name | Type | Default value | Description |
---|---|---|---|
data_sources |
The data sources to be used. This option is mutually exclusive with the |
||
file_ids |
string[] |
[] |
A list of file IDs made available to the |
ConnectedAgentDetails
Information for connecting one agent to another as a tool
Name | Type | Description |
---|---|---|
description |
string |
A description of what the agent does, used by the model to choose when and how to call the agent. |
id |
string |
The identifier of the child agent. |
name |
string |
The name of the agent to be called. |
ConnectedAgentToolDefinition
The input definition information for a connected agent tool which defines a domain specific sub-agent
Name | Type | Description |
---|---|---|
connected_agent |
The sub-agent to connect |
|
type |
string:
connected_agent |
The object type. |
FileSearchRankingOptions
Ranking options for file search.
Name | Type | Description |
---|---|---|
ranker |
string |
File search ranker. |
score_threshold |
number (float) |
Ranker search threshold. |
FileSearchToolDefinition
The input definition information for a file search tool as used to configure an agent.
Name | Type | Description |
---|---|---|
file_search |
Options overrides for the file search tool. |
|
type |
string:
file_search |
The object type. |
FileSearchToolDefinitionDetails
Options overrides for the file search tool.
Name | Type | Description |
---|---|---|
max_num_results |
integer (int32) minimum: 1maximum: 50 |
The maximum number of results the file search tool should output. The default is 20 for gpt-4* models and 5 for gpt-3.5-turbo. This number should be between 1 and 50 inclusive. Note that the file search tool may output fewer than |
ranking_options |
Ranking options for file search. |
FileSearchToolResource
A set of resources that are used by the file_search
tool.
Name | Type | Description |
---|---|---|
vector_store_ids |
string[] |
The ID of the vector store attached to this agent. There can be a maximum of 1 vector store attached to the agent. |
vector_stores |
The list of vector store configuration objects from Azure. This list is limited to one element. The only element of this list contains the list of azure asset IDs used by the search tool. |
FunctionDefinition
The input definition information for a function.
Name | Type | Description |
---|---|---|
description |
string |
A description of what the function does, used by the model to choose when and how to call the function. |
name |
string |
The name of the function to be called. |
parameters |
|
The parameters the functions accepts, described as a JSON Schema object. |
FunctionToolDefinition
The input definition information for a function tool as used to configure an agent.
Name | Type | Description |
---|---|---|
function |
The definition of the concrete function that the function tool should call. |
|
type |
string:
function |
The object type. |
OpenApiAnonymousAuthDetails
Security details for OpenApi anonymous authentication
Name | Type | Description |
---|---|---|
type |
string:
anonymous |
The type of authentication, must be anonymous/connection/managed_identity |
OpenApiAuthType
Authentication type for OpenApi endpoint. Allowed types are:
- Anonymous (no authentication required)
- Connection (requires connection_id to endpoint, as setup in AI Foundry)
- Managed_Identity (requires audience for identity based auth)
Value | Description |
---|---|
anonymous | |
connection | |
managed_identity |
OpenApiConnectionAuthDetails
Security details for OpenApi connection authentication
Name | Type | Description |
---|---|---|
security_scheme |
Connection auth security details |
|
type |
string:
connection |
The type of authentication, must be anonymous/connection/managed_identity |
OpenApiConnectionSecurityScheme
Security scheme for OpenApi managed_identity authentication
Name | Type | Description |
---|---|---|
connection_id |
string |
Connection id for Connection auth type |
OpenApiFunctionDefinition
The input definition information for an openapi function.
Name | Type | Description |
---|---|---|
auth | OpenApiAuthDetails: |
Open API authentication details |
default_params |
string[] |
List of OpenAPI spec parameters that will use user-provided defaults |
description |
string |
A description of what the function does, used by the model to choose when and how to call the function. |
functions |
List of function definitions used by OpenApi tool |
|
name |
string |
The name of the function to be called. |
spec |
|
The openapi function shape, described as a JSON Schema object. |
OpenApiManagedAuthDetails
Security details for OpenApi managed_identity authentication
Name | Type | Description |
---|---|---|
security_scheme |
Connection auth security details |
|
type |
string:
managed_identity |
The type of authentication, must be anonymous/connection/managed_identity |
OpenApiManagedSecurityScheme
Security scheme for OpenApi managed_identity authentication
Name | Type | Description |
---|---|---|
audience |
string |
Authentication scope for managed_identity auth type |
OpenApiToolDefinition
The input definition information for an OpenAPI tool as used to configure an agent.
Name | Type | Description |
---|---|---|
openapi |
The openapi function definition. |
|
type |
string:
openapi |
The object type. |
ToolResources
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.
Name | Type | Description |
---|---|---|
azure_ai_search |
Resources to be used by the |
|
code_interpreter |
Resources to be used by the |
|
file_search |
Resources to be used by the |
VectorStoreConfiguration
Vector storage configuration is the list of data sources, used when multiple files can be used for the enterprise file search.
Name | Type | Description |
---|---|---|
data_sources |
Data sources |
VectorStoreConfigurations
The structure, containing the list of vector storage configurations i.e. the list of azure asset IDs.
Name | Type | Description |
---|---|---|
configuration |
Configurations |
|
name |
string |
Name |
VectorStoreDataSource
The structure, containing Azure asset URI path and the asset type of the file used as a data source for the enterprise file search.
Name | Type | Description |
---|---|---|
type |
The asset type |
|
uri |
string |
Asset URI. |
VectorStoreDataSourceAssetType
Type of vector storage asset. Asset type may be a uri_asset, in this case it should contain asset URI ID, in the case of id_asset it should contain the data ID.
Value | Description |
---|---|
uri_asset |
Azure URI |
id_asset |
The data ID |