Skip to main content
PATCH
Patch an agent
Partial update, saved as a new revision: only the fields you send change. Send null to clear an optional field. description and environments can’t be null. The merged result is validated like a full update. Returns the updated agent object, with its new revision in the ETag header.

Headers

string
The ETag of the revision you based this change on, for example "3". If the agent has moved past it, the write fails with 412. Omit it, or send *, to apply your fields to whatever is current.

Path parameters

string
required
The agent’s name (e.g. my-research-bot or myorg/web-helper). Slash-containing names are supported.

Query parameters

string
A note stored on the new revision, such as why you made the change. Up to 500 characters. Shown by List revisions.

Request body

Any subset of these agent fields: description, environments, model, reasoning_effort, instructions, subagents, skills, answer_format, tools. name is not patchable (renames are not supported).

Examples

Change the instructions and nothing else:

Errors