Skip to main content
POST
Use this endpoint on KeyAuth deployments, with text in prompt and user/session identifiers in run_agent_request. harness_name is echoed in the request and response; sessions still use the harness_agent application. Shared OAuth deployments do not expose this endpoint harness applies only to this invocation; omitted fields inherit deployment settings. tools appends registered built-in tools, while mcp_servers replaces the remote MCP list
This endpoint runs the agent and saves session events. It can call models, tools, and cloud resources; retries can repeat external actions
The response arrives after completion. Check that error is null; HTTP 200 or overwrite alone does not establish success. On failure, output is an empty string

Authorizations

Authorization
string
header
required

Optional locally without a gateway; cloud deployments use the Runtime API key or user-pool JWT required by that deployment, never the model API key

Body

application/json
prompt
string
required

User message for this invocation

harness_name
string
required

Harness name echoed in the request and response; sessions use the fixed harness_agent namespace

run_agent_request
RunAgentRequest · object
required

User, session, and model-call limit for this invocation

harness
HarnessOverrides · object | null

Per-request overrides; omitted fields inherit the deployed configuration

Response

Invocation result; inspect the error field

harness_name
string
required

Harness name echoed in the request and response; sessions use the fixed harness_agent namespace

output
string
required

Text output after completion; empty on failure

overwrite
boolean
default:false

Whether general Harness overrides were applied; may be false for MCP-only overrides

error
string | null

Invocation error; null on success

Last modified on September 19, 2026