Agents
Execute Agent
Execute a specific agent by ID.
POST
Code Examples
Headers
| Parameter | Type | Required | Description |
|---|---|---|---|
x-workspace-id | integer | No | ID of the workspace. If not provided, the user’s selected workspace will be used. Will be required in a future release. |
Path Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
id | integer | Yes | The agent ID. |
Request Body
| Parameter | Type | Required | Description |
|---|---|---|---|
temperature | string | No | Chat Agent field. Sampling temperature between 0 and 2. Higher values produce more creative outputs (default: "1"). |
model | string | No | Chat Agent field. Model identifier to use for execution (e.g., "tess-6"). |
tools | string | No | Chat Agent field. Tool configuration for the agent (e.g., "agent", "no-tools"). |
root_id | integer | No | Chat Agent field. ID of an existing execution to continue a conversation thread. |
messages | array | No | Chat Agent field. The agent messages. Required for Chat Agent templates. Supports user, assistant, developer roles. |
waitExecution | boolean | No | If true, waits for execution to finish before returning (timeout: 100 s). Default: false. |
file_ids | array | No | Array of file IDs to attach to the execution. |
| Other root-level fields | any | Depends on agent | This is not a fixed field name. You can send additional fields required by your specific agent directly at the request root. Check which fields are required in Get Agent by ID. |
Messages Roles (Chat Type Templates)
For chat type templates, themessages array supports the following roles:
| Role | Required | Description |
|---|---|---|
user | Yes | User messages. Must be paired with assistant messages. |
assistant | Yes | Assistant messages. Must be paired with user messages. |
developer | No | Optional developer message. Only allowed as the first message in the array. |
system | No | Not supported. Using this role will cause an error. |
- Messages must alternate between
userandassistantroles (after the optionaldevelopermessage). - The
developerrole can only appear as the first message in the array and will be extracted before processing the rest. - If two consecutive messages have the same role (e.g., two
usermessages), the API will return a validation error: “Chat messages must be a pair of user/assistant”. - The
systemrole is not supported and will cause an error.
Response
Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Headers
ID of the workspace. If not provided, the user's selected workspace will be used. This field will be required in a future release.
Path Parameters
The agent ID.
Body
application/json
Send a JSON object. Known fields are supported, and you can add custom fields directly at the root (for example: department, reporting_period, include_risks).
Free-form JSON object. Send known fields and any custom agent fields directly at the root level.
Response
200
Execution started (or completed if waitExecution: true).