Retrieve All Agents
Retrieve all of the agents in the authenticated Vault. Includes both System and custom agents.
GET
/api/{version}/services/ai/agentsHeaders
Section link for Headers| Name | Description |
|---|---|
Accept | application/json (default) or application/xml |
Query Parameters
Section link for Query Parameters| Name | Description |
|---|---|
agent_nameoptional | The name of an agent, for example, promomats_document_chat__v. Include to return information about this agent only. If omitted, retrieves all agents. |
available_by_user_nameoptional | A Vault user name. Include to return the agents available to this user only. If omitted, retrieves all agents. |
objectconditional | The name of a Vault object. Include to return agents configured on this object only. Required if object_type is set. If omitted, retrieves agents configured on all objects. |
object_typeoptional | The name of a Vault object type. Include to return agents configured on this object type only. If specified, must also set the object query parameter. If omitted, retrieves agents configured on all object types. |
document_typeoptional | The name of a document type. Include to return agents configured on this document type only. If omitted, retrieves agents configured on all document types. |
Request
Section link for Requestcurl --location 'https://myvault.veevavault.com/api/v25.2/services/ai/agents' \
--header 'Accept: application/json' \
--header 'Authorization: {SESSION_ID}' \
--header 'X-VaultAPI-ClientID: veeva-vault-api-reference-example'Response
Section link for Response{
"responseStatus": "SUCCESS",
"agents": [
{
"name": "promomats_document_chat__v",
"label": "Content Agent",
"url": "/api/v25.2/services/ai/agents/promomats_document_chat__v"
},
{
"name": "quick_check__v",
"label": "Quick Check",
"url": "/api/v25.2/services/ai/agents/quick_check__v"
},
{
"name": "super_agent__sys",
"label": "Super Agent",
"url": "/api/v25.2/services/ai/agents/super_agent__sys"
}
]
}Response Details
Section link for Response DetailsOn SUCCESS, the response contains details about each agent.