Replace Agent (CAS)
/v1/agents/{agent_id}Product update with compare-and-set. row_version is required and must equal the current value, otherwise 409. Supplied fields replace saved values; explicit null values return 400. Use this form when several editors can change the same Agent.
Path parameters
Agent ID (agt_ prefix).
Headers
Optional. When omitted the service generates one, so a retried request can create a duplicate. Send your own stable key for retries.
Request body
row_version plus any subset of the Agent fields.
The row_version you last read. A stale value returns 409.
Model ID from the Models API, up to 200 characters.
Display name, up to 128 characters.
System instructions, up to 256 KiB.
Execution runtime: codex (default), claude, or mcode.
Skill references: {"skill_id": "skl_…", "version": null | "<version>"}. null uses the Skill default version, resolved when a Session starts.
MCP references: {connection_id, server_label, allowed_tools, required}. Up to 32; server_label must be unique in the Agent.
Up to 64 function tools plus at most one web_search tool. Sessions currently require web_search mode disabled, and client-side function results are not supported yet.
format.type text or json_schema (with an object schema); verbosity low, medium, or high.
effort none, minimal, low, medium, high, xhigh, or max; summary concise, detailed, or auto.
auto (default), default, flex, priority, or fast.
Up to 16 string pairs; keys up to 64 and values up to 512 characters.
Up to 4096 characters.
Change note recorded on the new version.