Update a custom agent, enable or disable it, or change a system agent model
PUT/ai/agents/:id
CUSTOM agents require editor access. Default (no action): validates the body against UpdateAgentRequestBody, sets AgentStatus to UPDATING, and triggers async AgentCore update. If the agent is CREATE_FAILED, async recreate uses the POST creation path. Allowed statuses for update are READY, UPDATE_FAILED, and CREATE_FAILED (AI-1002 otherwise). Query action=enable or action=disable toggles IsEnabled synchronously for CUSTOM agents only. Enable is allowed from READY or UPDATE_FAILED. Disable is also allowed from CREATE_FAILED. SYSTEM agents reject enable/disable with IPV-1040. SYSTEM agents with no action: only ModelId may be sent (UpdateSystemAgentModelRequestBody). Requires ai-admin.fullaccess (AUTH-1030). Unchanged ModelId returns 200 without writing. Cost inference profile is recreated when cost management is enabled. HTTP 202 is not returned by the current handler.
Request
Responses
- 200
- 400
- 500
Successful response. CUSTOM update returns Message only (async). enable/disable returns "Agent enabled successfully" or "Agent disabled successfully". SYSTEM model update returns a model-updated or already-set Message.
Response Headers
Validation or authorization failure. Body is {"Message": " -
Response Headers
Backend failure. Body is {"Message": " -