Skip to main content
POST
Python

Authorizations

Authorization
string
header
required

An Onecortex API key, oc_live_..., from API keys in the dashboard.

Path Parameters

agentId
string
required

The agent's ID, from its page in the dashboard.

Example:

"agt_01K0000000000000000000000"

Body

application/json

An AG-UI RunAgentInput, at most 1 MB. Any field beyond threadId, runId, messages and resume reaches the agent unchanged, as params.

messages
object[]
required

The conversation. The last user message's text is the prompt.

threadId
string

The agent's session. Generated when left out.

Required string length: 1 - 256
runId
string

Echoed on RUN_STARTED and RUN_FINISHED. Generated when left out.

resume
object[]

Answers every interrupt a paused run ended with.

tools
any[]

Reaches the agent as params.

state
any

Reaches the agent as params.

context
any[]

Reaches the agent as params.

forwardedProps
any

Reaches the agent as params.

Response

The run, as a stream of AG-UI events.

One unnamed data: frame per AG-UI event. A : ping comment arrives every 15 seconds while the agent is silent.

Example:

"data: {\"type\":\"RUN_STARTED\",\"threadId\":\"user-42\",\"runId\":\"run-1\"}"

Last modified on September 29, 2026