Patch an agent
Agents
Patch an agent
Change individual fields of an agent without resending the full object.
PATCH
Patch an agent
Partial update: only the fields you send change, everything else is preserved. Send a field as
null to clear it. The merged result is validated like a full update, and name is not patchable (renames are not supported).
Returns the updated Agent object.
Path parameters
The agent’s
name (e.g. my-research-bot or myorg/web-helper). Slash-containing names are supported.Request body
Any subset of the Agent object’s fields exceptname: description, environments, model, instructions, subagents, skills, answer_format, tools.
Examples
Change the instructions and nothing else:Errors
| Status | Cause |
|---|---|
403 | The agent is reserved (h/) and read-only. |
404 | Agent not found (or a referenced skill, environment, or subagent isn’t), or you don’t have access. |
422 | The merged spec fails validation, for example environments set to an empty list. |