curl --request POST \
--url https://api.kaizenautomation.com/agents/execute \
--header 'Content-Type: application/json' \
--data '
{
"agentId": "<string>",
"queueId": "<string>",
"content": [
{
"type": "text",
"text": "<string>"
}
],
"archiveSessionFiles": false,
"summarySchema": {},
"enableComputerUse": true,
"networkPolicy": {
"staticIpId": "<string>"
}
}
'import requests
url = "https://api.kaizenautomation.com/agents/execute"
payload = {
"agentId": "<string>",
"queueId": "<string>",
"content": [
{
"type": "text",
"text": "<string>"
}
],
"archiveSessionFiles": False,
"summarySchema": {},
"enableComputerUse": True,
"networkPolicy": { "staticIpId": "<string>" }
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
agentId: '<string>',
queueId: '<string>',
content: [{type: 'text', text: '<string>'}],
archiveSessionFiles: false,
summarySchema: {},
enableComputerUse: true,
networkPolicy: {staticIpId: '<string>'}
})
};
fetch('https://api.kaizenautomation.com/agents/execute', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.kaizenautomation.com/agents/execute",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'agentId' => '<string>',
'queueId' => '<string>',
'content' => [
[
'type' => 'text',
'text' => '<string>'
]
],
'archiveSessionFiles' => false,
'summarySchema' => [
],
'enableComputerUse' => true,
'networkPolicy' => [
'staticIpId' => '<string>'
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.kaizenautomation.com/agents/execute"
payload := strings.NewReader("{\n \"agentId\": \"<string>\",\n \"queueId\": \"<string>\",\n \"content\": [\n {\n \"type\": \"text\",\n \"text\": \"<string>\"\n }\n ],\n \"archiveSessionFiles\": false,\n \"summarySchema\": {},\n \"enableComputerUse\": true,\n \"networkPolicy\": {\n \"staticIpId\": \"<string>\"\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.kaizenautomation.com/agents/execute")
.header("Content-Type", "application/json")
.body("{\n \"agentId\": \"<string>\",\n \"queueId\": \"<string>\",\n \"content\": [\n {\n \"type\": \"text\",\n \"text\": \"<string>\"\n }\n ],\n \"archiveSessionFiles\": false,\n \"summarySchema\": {},\n \"enableComputerUse\": true,\n \"networkPolicy\": {\n \"staticIpId\": \"<string>\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.kaizenautomation.com/agents/execute")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"agentId\": \"<string>\",\n \"queueId\": \"<string>\",\n \"content\": [\n {\n \"type\": \"text\",\n \"text\": \"<string>\"\n }\n ],\n \"archiveSessionFiles\": false,\n \"summarySchema\": {},\n \"enableComputerUse\": true,\n \"networkPolicy\": {\n \"staticIpId\": \"<string>\"\n }\n}"
response = http.request(request)
puts response.read_body{
"sessionId": "<string>",
"executionId": "<string>",
"status": "<string>"
}{
"error": "<string>"
}{
"success": false,
"error": {
"code": "AGENT_QUEUE_NOT_FOUND",
"message": "Agent queue not found: 'agent_queue_123'. Verify the queueId is correct."
}
}{
"error": "<string>"
}Execute agent
Executes an agent with optional content.
curl --request POST \
--url https://api.kaizenautomation.com/agents/execute \
--header 'Content-Type: application/json' \
--data '
{
"agentId": "<string>",
"queueId": "<string>",
"content": [
{
"type": "text",
"text": "<string>"
}
],
"archiveSessionFiles": false,
"summarySchema": {},
"enableComputerUse": true,
"networkPolicy": {
"staticIpId": "<string>"
}
}
'import requests
url = "https://api.kaizenautomation.com/agents/execute"
payload = {
"agentId": "<string>",
"queueId": "<string>",
"content": [
{
"type": "text",
"text": "<string>"
}
],
"archiveSessionFiles": False,
"summarySchema": {},
"enableComputerUse": True,
"networkPolicy": { "staticIpId": "<string>" }
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
agentId: '<string>',
queueId: '<string>',
content: [{type: 'text', text: '<string>'}],
archiveSessionFiles: false,
summarySchema: {},
enableComputerUse: true,
networkPolicy: {staticIpId: '<string>'}
})
};
fetch('https://api.kaizenautomation.com/agents/execute', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.kaizenautomation.com/agents/execute",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'agentId' => '<string>',
'queueId' => '<string>',
'content' => [
[
'type' => 'text',
'text' => '<string>'
]
],
'archiveSessionFiles' => false,
'summarySchema' => [
],
'enableComputerUse' => true,
'networkPolicy' => [
'staticIpId' => '<string>'
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.kaizenautomation.com/agents/execute"
payload := strings.NewReader("{\n \"agentId\": \"<string>\",\n \"queueId\": \"<string>\",\n \"content\": [\n {\n \"type\": \"text\",\n \"text\": \"<string>\"\n }\n ],\n \"archiveSessionFiles\": false,\n \"summarySchema\": {},\n \"enableComputerUse\": true,\n \"networkPolicy\": {\n \"staticIpId\": \"<string>\"\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.kaizenautomation.com/agents/execute")
.header("Content-Type", "application/json")
.body("{\n \"agentId\": \"<string>\",\n \"queueId\": \"<string>\",\n \"content\": [\n {\n \"type\": \"text\",\n \"text\": \"<string>\"\n }\n ],\n \"archiveSessionFiles\": false,\n \"summarySchema\": {},\n \"enableComputerUse\": true,\n \"networkPolicy\": {\n \"staticIpId\": \"<string>\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.kaizenautomation.com/agents/execute")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"agentId\": \"<string>\",\n \"queueId\": \"<string>\",\n \"content\": [\n {\n \"type\": \"text\",\n \"text\": \"<string>\"\n }\n ],\n \"archiveSessionFiles\": false,\n \"summarySchema\": {},\n \"enableComputerUse\": true,\n \"networkPolicy\": {\n \"staticIpId\": \"<string>\"\n }\n}"
response = http.request(request)
puts response.read_body{
"sessionId": "<string>",
"executionId": "<string>",
"status": "<string>"
}{
"error": "<string>"
}{
"success": false,
"error": {
"code": "AGENT_QUEUE_NOT_FOUND",
"message": "Agent queue not found: 'agent_queue_123'. Verify the queueId is correct."
}
}{
"error": "<string>"
}Body
Request parameters for executing an agent
Optional - the backend will automatically get or create an agent.
Optional queue ID. When provided, the execution is enqueued onto that queue: it is admitted against the queue concurrency limit (starting immediately or waiting in line), prefixed with the queue default message, and runs on the queue Kaizen version. When omitted, the execution starts immediately under the organization concurrency limit. When set and no agentId is given, the agent is resolved from the queue (the agent already running work on it, else the organization most recent agent).
Optional content array. If provided, this will be used as the initial message. Each item must have a type field with one of the following values:
text— Plain text content. Requires atextstring field.file— A previously uploaded file. Requires anidstring field with the file external ID.skill— A skill to inject into the prompt. Requires anidstring field with the agent_fs_node external ID.login— A login to pin to this execution. Requires anidstring field with the login ID. The login is validated against the organization and injected into the initial prompt so the agent uses it without searching for credentials.json— Structured key-value data. Requires adataobject field. Rendered as a table in the UI and persisted as input.json.
- Option 1
- Option 2
- Option 3
- Option 4
- Option 5
Show child attributes
Show child attributes
When true, request a background archive of the thread session files after the execution reaches a terminal state.
Optional JSON Schema for per-execution summary extraction. Overrides the agent-level result schema for this execution only.
Show child attributes
Show child attributes
Kaizen version tier to use for this execution. Determines the default model based on your organization’s model alias configuration for the selected tier.
Full— Uses the model configured for Kaizen Full (typically a frontier model).Lite— Uses the model configured for Kaizen Lite (typically a smaller, faster model).
When not provided, the organization’s default Kaizen version is used.
Full, Lite Whether the computer-use tool is available for this execution. When false, computer use is disabled even if the org-level flag is on. When omitted, the org-level flag applies.
Network settings for the execution browser session.
Show child attributes
Show child attributes
Response
Agent execution started successfully
Response after starting agent execution
ID of the session started for this execution
ID of the execution, or null when the work was enqueued onto a queue (a queued execution has no standalone execution record).
Current status of the execution. When enqueued onto a queue, this is InProgress when it started immediately or WaitingInLine when the queue was at capacity.