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.
Path parameters
Unique agent identifier
Request body
Example request
{
"name": "Renamed Agent"
}Response
Agent updated successfully
Example response
{
"message": "Agent updated successfully"
}