Skip to main content
PATCH
Update an agent
Updates an agent’s editable fields. Changing a hosted agent’s model restarts its sandbox. See Coding agents for how agents use the gateway. Rename the agent, or (hosted agents) change its brief and model override. At least one field is required. null clears instructions, model, or effort. kind and harness are immutable. Changing the model restarts the hosted agent’s sandbox.
Availability: Cloud · Community (self-hosted) · Enterprise (self-hosted)

Authorizations

Authorization
string
header
required

A workspace API key (oc_…) or organization API key (oc_org_…). Workspace-scoped endpoints called with an organization key also need X-Workspace-Id.

Path Parameters

agentId
string
required

Body

application/json
name
string
Required string length: 1 - 255
instructions
string | null
Maximum string length: 20000
model
string | null

A model id from GET /agents/{agentId}/models.

Maximum string length: 200
effort
string | null

A reasoning-effort id from GET /agents/{agentId}/models.

Response

Updated

success
boolean