latestOpenAPI 3.0.0raw.githubusercontent.com2026-08-1391215649.1 KB

64bfe76b130e

Agents

Update agent

Apply a partial update to an existing agent configuration.

Gateway contract

The Node gateway validates the request body via Zod middleware before forwarding to the Python agent service. The agentKey path param and the request body are both validated. Query parameters are ignored by the controller.

Update semantics

Only fields present in the request body are updated. models may be omitted (the agent's existing models are kept), set to an empty array (clears the agent's models so it falls back to the organization's default LLM at chat time), or set to a non-empty array. When a non-empty array is provided, the gateway Zod middleware requires at least one object entry with isReasoning: true.

Permissions

The authenticated user must have can_edit on the agent (typically the owner). Service-account and shareWithOrg transitions follow additional Python business rules.

Success response

Returns a lightweight success envelope only. Use GET /agents/{agentKey} to read the persisted agent after an update.

put/agents/{agentKey}

Path parameters

agentKeystring required

Unique agent identifier

Request body

namestring

Agent display name

descriptionstring

What the agent does

startMessagestring

Initial greeting shown when conversation starts

systemPromptstring

System instructions for the agent

instructionsstring

Additional agent execution instructions

tagsstring[]
shareWithOrgboolean

Share agent with the organization

isServiceAccountboolean

Mark agent as a service account

defaultReasoningEffort'none' | 'low' | 'medium' | 'high' | 'max' nullable

Agent-level reasoning effort used when a chat request omits its own.

Example request

{
  "name": "Renamed Agent"
}

Response

Agent updated successfully

status'success' required
messagestring required

Example response

{
  "message": "Agent updated successfully"
}