Skip to main content
POST
/
agents
/
execute
Execute agent
curl --request POST \
  --url https://api.kaizenautomation.com/agents/execute \
  --header 'Content-Type: application/json' \
  --data '
{
  "agentId": "<string>",
  "content": [
    {
      "type": "<string>",
      "text": "<string>"
    }
  ],
  "archiveSessionFiles": false,
  "summarySchema": {}
}
'
{
  "sessionId": "<string>",
  "executionId": "<string>",
  "status": "<string>"
}

Body

application/json

Request parameters for executing an agent

agentId
string

Optional - the backend will automatically get or create an agent.

content
object[]

Optional content array. If provided, this will be used as the initial message.

archiveSessionFiles
boolean
default:false

When true, request a background archive of the thread session files after the execution reaches a terminal state.

summarySchema
object

Optional JSON Schema for per-execution summary extraction. Overrides the agent-level result schema for this execution only.

Response

Agent execution started successfully

Response after starting agent execution

sessionId
string
required

ID of the session started for this execution

executionId
string
required

ID of the execution

status
string
required

Current status of the execution