Execute agent version with code
POST/api/v2/Agent/:agentCode/execute/:agentVersion
Executes an agent version with the given code. The request body must be either a JSON array of key/value input parameters, or a JSON object following the chat completions format.
Request
Path Parameters
Query Parameters
Use this param to override the culture of the response. Options: - en (default) - es
- application/json
- text/json
- application/*+json
Body
any
Body
any
Body
any
Volatile Knowledge
You can append Volatile Knowledge files to your execute request by adding the following key/value pair to the body of your request:
[
{
"Key": "volatileKnowledgeIds",
"Value": ["volatileKnowledgeId1", "volatileKnowledgeId2"]
}
]
Use the Upload endpoint to get the
volatileKnowledgeIdof your files.
Audio Transcription
You can pass an audio file for transcription in your execute request by adding the following key/value pair to the body of your request:
[
{
"Key": "audioInput",
"Value": {
"fileId": "[your audio file ID]",
}
}
]
Use the Upload File endpoint to get the
fileIdof your audio file.
Responses
- 200
- 400
- 401
- 403
- 429
- 500
- 502
OK
If the request body is not a JSON array of key/value input parameters, nor a JSON object following the chat completions format.
- application/json
- Schema
- Example (from schema)
Schema
- MOD1
- MOD2
Array [
]
Array [
]
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
attempts
object[]
nullable
One entry per attempt to call the AI provider, in order. Only present on agent_execution_failed and aiservice_execution_failed.
Zero-based index of the attempt.
Model pool an agent attempt used: main or fallback. Omitted for AI service attempts.
Error code of this attempt, e.g. vendor_rate_limit_error. See Vendor error codes on the API Errors page.
Raw HTTP status the AI provider returned for this attempt. Informational only; it does not set the response status.
Human-readable, localised summary of this attempt's failure.
errors
object
nullable
Detail for this attempt, e.g. vendor_error with the provider-supplied message.
agentResult
object
nullable
The partial agent result produced before validation failed (same shape as a successful execution result). Only present on agent validation failures.
The partial agent result produced before validation failed (same shape as a successful execution result). Only present on agent validation failures.
pendingActions
object[]
nullable
Tool calls the agent was waiting on for approval when it stopped (tool_approval_pending). Only present on agent validation failures.
arguments
object
nullable
The JSON the agent generated before it was rejected by the response-format validation. Only present on agent validation failures.
{
"code": "string",
"message": "string",
"documentationUrl": "string",
"errors": {},
"attempts": [
{
"index": 0,
"modelType": "string",
"code": "string",
"statusCode": 0,
"message": "string",
"errors": {}
}
],
"agentResult": {},
"pendingActions": [
{
"type": "string",
"requestId": "string",
"callId": "string",
"skillCode": "string",
"skillType": "string",
"tool": "string",
"arguments": {}
}
],
"generatedJson": "string"
}
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"
}
If the API rate limit was exceeded, or every attempt was rate-limited by the AI provider. Wait for the time given in the Retry-After header before retrying.
- application/json
- Schema
- Example (from schema)
Schema
- MOD1
- MOD2
Array [
]
Array [
]
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
attempts
object[]
nullable
One entry per attempt to call the AI provider, in order. Only present on agent_execution_failed and aiservice_execution_failed.
Zero-based index of the attempt.
Model pool an agent attempt used: main or fallback. Omitted for AI service attempts.
Error code of this attempt, e.g. vendor_rate_limit_error. See Vendor error codes on the API Errors page.
Raw HTTP status the AI provider returned for this attempt. Informational only; it does not set the response status.
Human-readable, localised summary of this attempt's failure.
errors
object
nullable
Detail for this attempt, e.g. vendor_error with the provider-supplied message.
agentResult
object
nullable
The partial agent result produced before validation failed (same shape as a successful execution result). Only present on agent validation failures.
The partial agent result produced before validation failed (same shape as a successful execution result). Only present on agent validation failures.
pendingActions
object[]
nullable
Tool calls the agent was waiting on for approval when it stopped (tool_approval_pending). Only present on agent validation failures.
arguments
object
nullable
The JSON the agent generated before it was rejected by the response-format validation. Only present on agent validation failures.
{
"code": "string",
"message": "string",
"documentationUrl": "string",
"errors": {},
"attempts": [
{
"index": 0,
"modelType": "string",
"code": "string",
"statusCode": 0,
"message": "string",
"errors": {}
}
],
"agentResult": {},
"pendingActions": [
{
"type": "string",
"requestId": "string",
"callId": "string",
"skillCode": "string",
"skillType": "string",
"tool": "string",
"arguments": {}
}
],
"generatedJson": "string"
}
There was an unexpected error
- application/json
- Schema
- Example (from schema)
Schema
- MOD1
- MOD2
Array [
]
Array [
]
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
attempts
object[]
nullable
One entry per attempt to call the AI provider, in order. Only present on agent_execution_failed and aiservice_execution_failed.
Zero-based index of the attempt.
Model pool an agent attempt used: main or fallback. Omitted for AI service attempts.
Error code of this attempt, e.g. vendor_rate_limit_error. See Vendor error codes on the API Errors page.
Raw HTTP status the AI provider returned for this attempt. Informational only; it does not set the response status.
Human-readable, localised summary of this attempt's failure.
errors
object
nullable
Detail for this attempt, e.g. vendor_error with the provider-supplied message.
agentResult
object
nullable
The partial agent result produced before validation failed (same shape as a successful execution result). Only present on agent validation failures.
The partial agent result produced before validation failed (same shape as a successful execution result). Only present on agent validation failures.
pendingActions
object[]
nullable
Tool calls the agent was waiting on for approval when it stopped (tool_approval_pending). Only present on agent validation failures.
arguments
object
nullable
The JSON the agent generated before it was rejected by the response-format validation. Only present on agent validation failures.
{
"code": "string",
"message": "string",
"documentationUrl": "string",
"errors": {},
"attempts": [
{
"index": 0,
"modelType": "string",
"code": "string",
"statusCode": 0,
"message": "string",
"errors": {}
}
],
"agentResult": {},
"pendingActions": [
{
"type": "string",
"requestId": "string",
"callId": "string",
"skillCode": "string",
"skillType": "string",
"tool": "string",
"arguments": {}
}
],
"generatedJson": "string"
}
If every attempt failed because of an AI provider error.
- application/json
- Schema
- Example (from schema)
Schema
- MOD1
- MOD2
Array [
]
Array [
]
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
attempts
object[]
nullable
One entry per attempt to call the AI provider, in order. Only present on agent_execution_failed and aiservice_execution_failed.
Zero-based index of the attempt.
Model pool an agent attempt used: main or fallback. Omitted for AI service attempts.
Error code of this attempt, e.g. vendor_rate_limit_error. See Vendor error codes on the API Errors page.
Raw HTTP status the AI provider returned for this attempt. Informational only; it does not set the response status.
Human-readable, localised summary of this attempt's failure.
errors
object
nullable
Detail for this attempt, e.g. vendor_error with the provider-supplied message.
agentResult
object
nullable
The partial agent result produced before validation failed (same shape as a successful execution result). Only present on agent validation failures.
The partial agent result produced before validation failed (same shape as a successful execution result). Only present on agent validation failures.
pendingActions
object[]
nullable
Tool calls the agent was waiting on for approval when it stopped (tool_approval_pending). Only present on agent validation failures.
arguments
object
nullable
The JSON the agent generated before it was rejected by the response-format validation. Only present on agent validation failures.
{
"code": "string",
"message": "string",
"documentationUrl": "string",
"errors": {},
"attempts": [
{
"index": 0,
"modelType": "string",
"code": "string",
"statusCode": 0,
"message": "string",
"errors": {}
}
],
"agentResult": {},
"pendingActions": [
{
"type": "string",
"requestId": "string",
"callId": "string",
"skillCode": "string",
"skillType": "string",
"tool": "string",
"arguments": {}
}
],
"generatedJson": "string"
}