Gets a paginated list of agent instances for a given agent version
GET/api/v2/AgentInstance/:agentCode/:agentVersion
Gets a paginated list of agent instances for a given agent version
Request
Path Parameters
The unique code identifying the agent.
Optional agent version to filter by.
Query Parameters
Optional user identifier to filter by.
Optional group identifier to filter by.
Optional search term to filter by name.
Optional. Returns only instances started on or after this date. A date with an offset or "Z" is converted to server time; without one it is taken as server time.
Optional. Returns only instances started on or before this date. A date without time includes the whole day. Offsets are handled as in startDate.
Default value: desc
Sort direction by end date: "asc" or "desc". Default is "desc".
Default value: 1
The page number to retrieve. Default is 1. A page beyond the last one returns no items.
Default value: 20
The number of items per page. Default is 20.
Use this param to override the culture of the response. Options: - en (default) - es
Responses
- 200
- 400
- 401
- 403
- 404
- 500
Returns a paginated list of the agent instances matching the filters.
- text/plain
- application/json
- text/json
- Schema
- Example (from schema)
Schema
Array [
Array [
]
Array [
- KnowledgeFile
- KnowledgeWebsite
- WebSearch
]
Array [
]
Array [
Array [
]
]
Array [
]
Array [
]
Array [
]
Array [
]
Array [
]
]
Array [
]
items
object[]
nullable
links
object[]
nullable
usage
object
The token usage of an instance.
costs
object
The cost of an instance, in the tenant's currency.
The cost of the sub agents the instance executed, already counted in total.
The cost of the whole chain: the instance's own tokens and services plus subAgents.
citations
object[]
nullable
The Citations retrieved during the instance.
Populated only when include=citations is requested.
source
object
nullable
oneOf
input
object[]
nullable
The full set of inputs the instance received during its execution, as key/value parameters.
Populated only when include=input is requested.
skills
object[]
nullable
The skills (plugins) executed during the instance.
Populated only when include=skills is requested.
input
object[]
nullable
usage
object
knowledge
object[]
nullable
The knowledge retrieved during the instance.
Populated only when include=knowledge is requested.
costBreakdown
object
The usage and cost of one execution of the chain. Every figure is the node's own, excluding its
descendants, which hang off subAgents.
usage
object
The token usage of an instance.
cost
object
Sum of prompt and completion, without the services or the sub agents.
services
object
transcription
object[]
nullable
usage
object
cost
object
embeddings
object[]
nullable
usage
object
cost
object
images
object[]
nullable
usage
object
cost
object
subAgents
object[]
nullable
links
object[]
nullable
{
"items": [
{
"links": [
{
"method": "string",
"url": "string",
"rel": "string"
}
],
"id": "string",
"name": "string",
"agentVersion": 0,
"startDate": "2024-07-29T15:51:28.071Z",
"endDate": "2024-07-29T15:51:28.071Z",
"timeToFirstToken": 0,
"timeToFirstContent": 0,
"channel": "string",
"userIdentifier": "string",
"groupIdentifier": "string",
"ipAddress": "string",
"userAgent": "string",
"origin": "string",
"referer": "string",
"usage": {
"promptTokens": 0,
"completionTokens": 0,
"totalTokens": 0
},
"costs": {
"prompt": 0,
"completion": 0,
"services": 0,
"subAgents": 0,
"total": 0,
"currency": "string"
},
"canceledByClient": true,
"citations": [
{
"citationIndex": 0,
"startIndex": 0,
"endIndex": 0,
"relevance": 0,
"source": {},
"citedText": "string"
}
],
"type": "string",
"request": "string",
"response": "string",
"input": [
{
"key": "string"
}
],
"skills": [
{
"name": "string",
"tool": "string",
"input": [
{
"key": "string"
}
],
"output": "string",
"usage": {
"promptTokens": 0,
"completionTokens": 0,
"totalTokens": 0
},
"success": true,
"error": "string",
"iteration": 0,
"durationMs": 0,
"startDate": "2024-07-29T15:51:28.071Z"
}
],
"knowledge": [
{
"fileId": "string",
"fileName": "string",
"content": "string",
"relevance": 0,
"pageFrom": 0,
"pageTo": 0,
"position": 0,
"totalTokenCount": 0
}
],
"costBreakdown": {
"instanceId": "string",
"agentId": "string",
"agentCode": "string",
"usage": {
"promptTokens": 0,
"completionTokens": 0,
"totalTokens": 0
},
"cost": {
"prompt": 0,
"completion": 0,
"total": 0
},
"services": {
"transcription": [
{
"instanceId": "string",
"usage": {
"promptTokens": 0,
"completionTokens": 0,
"totalTokens": 0
},
"cost": {
"prompt": 0,
"completion": 0,
"total": 0
}
}
],
"embeddings": [
{
"instanceId": "string",
"usage": {
"promptTokens": 0,
"completionTokens": 0,
"totalTokens": 0
},
"cost": {
"prompt": 0,
"completion": 0,
"total": 0
}
}
],
"images": [
{
"instanceId": "string",
"usage": {
"promptTokens": 0,
"completionTokens": 0,
"totalTokens": 0
},
"cost": {
"prompt": 0,
"completion": 0,
"total": 0
}
}
]
},
"subAgents": [
{}
]
}
}
],
"total": 0,
"pageSize": 0,
"page": 0,
"links": [
{
"method": "string",
"url": "string",
"rel": "string"
}
]
}
- Schema
- Example (from schema)
Schema
Array [
Array [
]
Array [
- KnowledgeFile
- KnowledgeWebsite
- WebSearch
]
Array [
]
Array [
Array [
]
]
Array [
]
Array [
]
Array [
]
Array [
]
Array [
]
]
Array [
]
items
object[]
nullable
links
object[]
nullable
usage
object
The token usage of an instance.
costs
object
The cost of an instance, in the tenant's currency.
The cost of the sub agents the instance executed, already counted in total.
The cost of the whole chain: the instance's own tokens and services plus subAgents.
citations
object[]
nullable
The Citations retrieved during the instance.
Populated only when include=citations is requested.
source
object
nullable
oneOf
input
object[]
nullable
The full set of inputs the instance received during its execution, as key/value parameters.
Populated only when include=input is requested.
skills
object[]
nullable
The skills (plugins) executed during the instance.
Populated only when include=skills is requested.
input
object[]
nullable
usage
object
knowledge
object[]
nullable
The knowledge retrieved during the instance.
Populated only when include=knowledge is requested.
costBreakdown
object
The usage and cost of one execution of the chain. Every figure is the node's own, excluding its
descendants, which hang off subAgents.
usage
object
The token usage of an instance.
cost
object
Sum of prompt and completion, without the services or the sub agents.
services
object
transcription
object[]
nullable
usage
object
cost
object
embeddings
object[]
nullable
usage
object
cost
object
images
object[]
nullable
usage
object
cost
object
subAgents
object[]
nullable
links
object[]
nullable
{
"items": [
{
"links": [
{
"method": "string",
"url": "string",
"rel": "string"
}
],
"id": "string",
"name": "string",
"agentVersion": 0,
"startDate": "2024-07-29T15:51:28.071Z",
"endDate": "2024-07-29T15:51:28.071Z",
"timeToFirstToken": 0,
"timeToFirstContent": 0,
"channel": "string",
"userIdentifier": "string",
"groupIdentifier": "string",
"ipAddress": "string",
"userAgent": "string",
"origin": "string",
"referer": "string",
"usage": {
"promptTokens": 0,
"completionTokens": 0,
"totalTokens": 0
},
"costs": {
"prompt": 0,
"completion": 0,
"services": 0,
"subAgents": 0,
"total": 0,
"currency": "string"
},
"canceledByClient": true,
"citations": [
{
"citationIndex": 0,
"startIndex": 0,
"endIndex": 0,
"relevance": 0,
"source": {},
"citedText": "string"
}
],
"type": "string",
"request": "string",
"response": "string",
"input": [
{
"key": "string"
}
],
"skills": [
{
"name": "string",
"tool": "string",
"input": [
{
"key": "string"
}
],
"output": "string",
"usage": {
"promptTokens": 0,
"completionTokens": 0,
"totalTokens": 0
},
"success": true,
"error": "string",
"iteration": 0,
"durationMs": 0,
"startDate": "2024-07-29T15:51:28.071Z"
}
],
"knowledge": [
{
"fileId": "string",
"fileName": "string",
"content": "string",
"relevance": 0,
"pageFrom": 0,
"pageTo": 0,
"position": 0,
"totalTokenCount": 0
}
],
"costBreakdown": {
"instanceId": "string",
"agentId": "string",
"agentCode": "string",
"usage": {
"promptTokens": 0,
"completionTokens": 0,
"totalTokens": 0
},
"cost": {
"prompt": 0,
"completion": 0,
"total": 0
},
"services": {
"transcription": [
{
"instanceId": "string",
"usage": {
"promptTokens": 0,
"completionTokens": 0,
"totalTokens": 0
},
"cost": {
"prompt": 0,
"completion": 0,
"total": 0
}
}
],
"embeddings": [
{
"instanceId": "string",
"usage": {
"promptTokens": 0,
"completionTokens": 0,
"totalTokens": 0
},
"cost": {
"prompt": 0,
"completion": 0,
"total": 0
}
}
],
"images": [
{
"instanceId": "string",
"usage": {
"promptTokens": 0,
"completionTokens": 0,
"totalTokens": 0
},
"cost": {
"prompt": 0,
"completion": 0,
"total": 0
}
}
]
},
"subAgents": [
{}
]
}
}
],
"total": 0,
"pageSize": 0,
"page": 0,
"links": [
{
"method": "string",
"url": "string",
"rel": "string"
}
]
}
- Schema
- Example (from schema)
Schema
Array [
Array [
]
Array [
- KnowledgeFile
- KnowledgeWebsite
- WebSearch
]
Array [
]
Array [
Array [
]
]
Array [
]
Array [
]
Array [
]
Array [
]
Array [
]
]
Array [
]
items
object[]
nullable
links
object[]
nullable
usage
object
The token usage of an instance.
costs
object
The cost of an instance, in the tenant's currency.
The cost of the sub agents the instance executed, already counted in total.
The cost of the whole chain: the instance's own tokens and services plus subAgents.
citations
object[]
nullable
The Citations retrieved during the instance.
Populated only when include=citations is requested.
source
object
nullable
oneOf
input
object[]
nullable
The full set of inputs the instance received during its execution, as key/value parameters.
Populated only when include=input is requested.
skills
object[]
nullable
The skills (plugins) executed during the instance.
Populated only when include=skills is requested.
input
object[]
nullable
usage
object
knowledge
object[]
nullable
The knowledge retrieved during the instance.
Populated only when include=knowledge is requested.
costBreakdown
object
The usage and cost of one execution of the chain. Every figure is the node's own, excluding its
descendants, which hang off subAgents.
usage
object
The token usage of an instance.
cost
object
Sum of prompt and completion, without the services or the sub agents.
services
object
transcription
object[]
nullable
usage
object
cost
object
embeddings
object[]
nullable
usage
object
cost
object
images
object[]
nullable
usage
object
cost
object
subAgents
object[]
nullable
links
object[]
nullable
{
"items": [
{
"links": [
{
"method": "string",
"url": "string",
"rel": "string"
}
],
"id": "string",
"name": "string",
"agentVersion": 0,
"startDate": "2024-07-29T15:51:28.071Z",
"endDate": "2024-07-29T15:51:28.071Z",
"timeToFirstToken": 0,
"timeToFirstContent": 0,
"channel": "string",
"userIdentifier": "string",
"groupIdentifier": "string",
"ipAddress": "string",
"userAgent": "string",
"origin": "string",
"referer": "string",
"usage": {
"promptTokens": 0,
"completionTokens": 0,
"totalTokens": 0
},
"costs": {
"prompt": 0,
"completion": 0,
"services": 0,
"subAgents": 0,
"total": 0,
"currency": "string"
},
"canceledByClient": true,
"citations": [
{
"citationIndex": 0,
"startIndex": 0,
"endIndex": 0,
"relevance": 0,
"source": {},
"citedText": "string"
}
],
"type": "string",
"request": "string",
"response": "string",
"input": [
{
"key": "string"
}
],
"skills": [
{
"name": "string",
"tool": "string",
"input": [
{
"key": "string"
}
],
"output": "string",
"usage": {
"promptTokens": 0,
"completionTokens": 0,
"totalTokens": 0
},
"success": true,
"error": "string",
"iteration": 0,
"durationMs": 0,
"startDate": "2024-07-29T15:51:28.071Z"
}
],
"knowledge": [
{
"fileId": "string",
"fileName": "string",
"content": "string",
"relevance": 0,
"pageFrom": 0,
"pageTo": 0,
"position": 0,
"totalTokenCount": 0
}
],
"costBreakdown": {
"instanceId": "string",
"agentId": "string",
"agentCode": "string",
"usage": {
"promptTokens": 0,
"completionTokens": 0,
"totalTokens": 0
},
"cost": {
"prompt": 0,
"completion": 0,
"total": 0
},
"services": {
"transcription": [
{
"instanceId": "string",
"usage": {
"promptTokens": 0,
"completionTokens": 0,
"totalTokens": 0
},
"cost": {
"prompt": 0,
"completion": 0,
"total": 0
}
}
],
"embeddings": [
{
"instanceId": "string",
"usage": {
"promptTokens": 0,
"completionTokens": 0,
"totalTokens": 0
},
"cost": {
"prompt": 0,
"completion": 0,
"total": 0
}
}
],
"images": [
{
"instanceId": "string",
"usage": {
"promptTokens": 0,
"completionTokens": 0,
"totalTokens": 0
},
"cost": {
"prompt": 0,
"completion": 0,
"total": 0
}
}
]
},
"subAgents": [
{}
]
}
}
],
"total": 0,
"pageSize": 0,
"page": 0,
"links": [
{
"method": "string",
"url": "string",
"rel": "string"
}
]
}
If a paging or sorting parameter is invalid (page below 1, page size outside 1–1000, sort direction not asc/desc), or endDate is earlier than startDate.
- application/json
- Schema
- Example (from schema)
Schema
- MOD1
- MOD2
Array [
]
Stable, machine-readable error code. Branch on this value, not on message.
Human-readable, localised summary of the error.
Link to the documentation section for this error code.
errors
object
nullable
Map of keys (an invalid request field or the rule that failed) to messages. Only present when the error has specific detail to report. Values are strings, except on input_validation_error, where each value is an array of messages for that field.
property name*
object
nullable
oneOf
string
string
{
"code": "string",
"message": "string",
"documentationUrl": "string",
"errors": {}
}
The user is unauthorized or the session expired
- application/json
- Schema
- Example (from schema)
Schema
Stable, machine-readable error code. Branch on this value, not on message.
Human-readable, localised summary of the error.
Link to the documentation section for this error code.
{
"code": "string",
"message": "string",
"documentationUrl": "string"
}
The user does not have permission
- application/json
- Schema
- Example (from schema)
Schema
Stable, machine-readable error code. Branch on this value, not on message.
Human-readable, localised summary of the error.
Link to the documentation section for this error code.
{
"code": "string",
"message": "string",
"documentationUrl": "string"
}
The entity was not found
- application/json
- Schema
- Example (from schema)
Schema
- MOD1
- MOD2
Array [
]
Stable, machine-readable error code. Branch on this value, not on message.
Human-readable, localised summary of the error.
Link to the documentation section for this error code.
errors
object
nullable
Map of keys (an invalid request field or the rule that failed) to messages. Only present when the error has specific detail to report. Values are strings, except on input_validation_error, where each value is an array of messages for that field.
property name*
object
nullable
oneOf
string
string
{
"code": "string",
"message": "string",
"documentationUrl": "string",
"errors": {}
}
There was an unexpected error
- application/json
- Schema
- Example (from schema)
Schema
Stable, machine-readable error code. Branch on this value, not on message.
Human-readable, localised summary of the error.
Link to the documentation section for this error code.
{
"code": "string",
"message": "string",
"documentationUrl": "string"
}