Skip to main content
PUT
Update an agent
Replaces an agent’s whole configuration as a new revision. Later sessions pick up the new spec, except those pinned to an earlier revision with name:N. Sending the current spec changes nothing. Renames are not supported. To change a few fields, use Patch. 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 write regardless.

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

The full agent, with the same fields and rules as Create an agent. The name must equal the URL identifier. Omitted fields reset to their defaults, not their stored values: leaving out instructions, model, skills, or answer_format clears them.

Examples

Response

Errors