Execute a skill tool
POST/api/v2/agent/:agentCode/skill/:skillCode/execute/:toolCode
Runs one skill in isolation: no planning, prompt, agent model or conversational pipeline is executed. The skill is validated against the skills declared in the resolved agent version. The request body is optional and must use the same JSON shape the LLM builds for the skill's tool call, which you can discover with the skill schema endpoint.
Request
Path Parameters
Code of the agent that declares the skill.
Code of the skill to execute.
Code of the specific tool within the skill to execute.
Query Parameters
Optional personal connection to authenticate the skill with. Only valid for skills configured with a personal connection; when omitted the caller's default connection for the connector is used.
Use this param to override the culture of the response. Options: - en (default) - es
- application/json
- text/json
- application/*+json
Body
Optional tool-call arguments as a JSON object.
any
Body
Optional tool-call arguments as a JSON object.
any
Body
Optional tool-call arguments as a JSON object.
any
Responses
- 200
- 400
- 401
- 403
- 404
- 429
- 500
- 502
Returns the skill execution result, or the pending actions the caller must complete before it can run.
- text/plain
- application/json
- text/json
- Schema
- Example (from schema)
Schema
Array [
- ConnectionPendingAction
- ToolApprovalPendingAction
- UserChoicePendingAction
Array [
Array [
]
]
]
pendingActions
object[]
nullable
oneOf
arguments
object
nullable
questions
object[]
nullable
options
object[]
nullable
{
"content": "string",
"pendingActions": [
{},
{},
{}
]
}
- Schema
- Example (from schema)
Schema
Array [
- ConnectionPendingAction
- ToolApprovalPendingAction
- UserChoicePendingAction
Array [
Array [
]
]
]
pendingActions
object[]
nullable
oneOf
arguments
object
nullable
questions
object[]
nullable
options
object[]
nullable
{
"content": "string",
"pendingActions": [
{},
{},
{}
]
}
- Schema
- Example (from schema)
Schema
Array [
- ConnectionPendingAction
- ToolApprovalPendingAction
- UserChoicePendingAction
Array [
Array [
]
]
]
pendingActions
object[]
nullable
oneOf
arguments
object
nullable
questions
object[]
nullable
options
object[]
nullable
{
"content": "string",
"pendingActions": [
{},
{},
{}
]
}
If the skill does not use a personal connection, the connection does not belong to the connector the skill requires, or the skill runs on the model provider side and cannot be executed on its own.
- application/json
- Schema
- Example (from schema)
Schema
- MOD1
- MOD2
Array [
]
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.
files
object[]
nullable
Only on aiservice_execution_failed from OCR: the attempts grouped per submitted file, in place of attempts.
Zero-based index of the file in the submitted batch.
Original file name or URL.
attempts
object[]
Every attempt made for this file, even when there is only one.
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.
{
"code": "string",
"message": "string",
"documentationUrl": "string",
"errors": {},
"attempts": [
{
"index": 0,
"modelType": "string",
"code": "string",
"statusCode": 0,
"message": "string",
"errors": {}
}
],
"files": [
{
"index": 0,
"source": "string",
"attempts": [
{
"index": 0,
"modelType": "string",
"code": "string",
"statusCode": 0,
"message": "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"
}
If the skill code or tool code does not exist in the resolved agent version, or the connection is not a usable connection of the caller.
- 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": {}
}
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 [
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.
files
object[]
nullable
Only on aiservice_execution_failed from OCR: the attempts grouped per submitted file, in place of attempts.
Zero-based index of the file in the submitted batch.
Original file name or URL.
attempts
object[]
Every attempt made for this file, even when there is only one.
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.
{
"code": "string",
"message": "string",
"documentationUrl": "string",
"errors": {},
"attempts": [
{
"index": 0,
"modelType": "string",
"code": "string",
"statusCode": 0,
"message": "string",
"errors": {}
}
],
"files": [
{
"index": 0,
"source": "string",
"attempts": [
{
"index": 0,
"modelType": "string",
"code": "string",
"statusCode": 0,
"message": "string",
"errors": {}
}
]
}
]
}
There was an unexpected error
- application/json
- Schema
- Example (from schema)
Schema
- MOD1
- MOD2
Array [
]
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.
files
object[]
nullable
Only on aiservice_execution_failed from OCR: the attempts grouped per submitted file, in place of attempts.
Zero-based index of the file in the submitted batch.
Original file name or URL.
attempts
object[]
Every attempt made for this file, even when there is only one.
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.
{
"code": "string",
"message": "string",
"documentationUrl": "string",
"errors": {},
"attempts": [
{
"index": 0,
"modelType": "string",
"code": "string",
"statusCode": 0,
"message": "string",
"errors": {}
}
],
"files": [
{
"index": 0,
"source": "string",
"attempts": [
{
"index": 0,
"modelType": "string",
"code": "string",
"statusCode": 0,
"message": "string",
"errors": {}
}
]
}
]
}
If every attempt failed because of an AI provider error.
- application/json
- Schema
- Example (from schema)
Schema
- MOD1
- MOD2
Array [
]
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.
files
object[]
nullable
Only on aiservice_execution_failed from OCR: the attempts grouped per submitted file, in place of attempts.
Zero-based index of the file in the submitted batch.
Original file name or URL.
attempts
object[]
Every attempt made for this file, even when there is only one.
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.
{
"code": "string",
"message": "string",
"documentationUrl": "string",
"errors": {},
"attempts": [
{
"index": 0,
"modelType": "string",
"code": "string",
"statusCode": 0,
"message": "string",
"errors": {}
}
],
"files": [
{
"index": 0,
"source": "string",
"attempts": [
{
"index": 0,
"modelType": "string",
"code": "string",
"statusCode": 0,
"message": "string",
"errors": {}
}
]
}
]
}