POST /v1/agents/{agent_id}/versions
POST
/v1/agents/{agent_id}/versionsAuthorization
AuthorizationBearer token · headerrequiredPath parameters
agent_idstring<uuid>requiredAgent id
Header parameters
Idempotency-KeystringRetry the same operation with this key to return its saved receipt. Scoped by the operation's authenticated caller or resource. A different input under the same key returns 409. Receipts are retained for at least 7 days after completion, then removed by an hourly sweep. After removal the key can execute again. Fresh-only secrets are never included in a replay.
min length 1 · max length 255
Request body
requiredapplication/jsonmcpMcpGrantBody[]Show propertiesHide properties
Array of
McpGrantBodydefault_policyPolicyActionBodyrequiredApplies to any tool not named in `tools`, including one the server
adds after this version is published.
Allowed:
allowrequire_approvaldenynamestringrequiredThe broker serves the server at `mcp:{name}`. Unique within `mcp`;
`parent` is reserved.
max length 32 · matches ^[a-z0-9-]+$
toolsToolRuleBody[]Show propertiesHide properties
Array of
ToolRuleBodynamestringrequiredpolicyPolicyActionBodyrequiredAllowed:
allowrequire_approvaldenyurlstringrequiredmodelModelConfigBodyrequiredSelects the model wire format and carries that format's settings.
Show propertiesHide properties
One of:
object
max_tokensinteger<int32>requiredmin 0
modelstringrequiredthinkingany | AnthropicThinkingBodyShow propertiesHide properties
One of:
any
anyAnthropicThinkingBody
budget_tokensinteger<int32>requiredmin 0
formatstringrequiredAllowed:
anthropicobject
context_windowinteger<int32>requiredmin 0
max_tokensinteger<int32>requiredmin 0
modelstringrequiredreasoning_effortany | ReasoningEffortBodyShow propertiesHide properties
One of:
any
anyReasoningEffortBody
stringformatstringrequiredAllowed:
openai_responsesskillsSkillGrantBody[]Show propertiesHide properties
Array of
SkillGrantBodynamestringrequiredA label this config invents; the broker serves the skill at
`skill:{name}`. Unique within `skills`; `parent` is reserved.
max length 32 · matches ^[a-z0-9-]+$
skill_idstring<uuid>requiredversionVersionPinBodyrequiredThe latest version at resolution time, or an exact one.
Show propertiesHide properties
One of:
object
typestringrequiredAllowed:
latestobject
numberinteger<int32>requiredmin 1
typestringrequiredAllowed:
pinnedsystem_promptstring | nullmodel_provider_idstring<uuid>requiredResponses
201The published version.
agent_idstring<uuid>requiredconfigobjectrequiredThe config this version was published with.
Skill grants retain their requested `version` selectors, which resolve
independently when each session is created.
created_atstring<date-time>requiredidstring<uuid>requiredmodel_provider_idstring<uuid>requiredversioninteger<int32>requiredNumbered per agent from 1.
400Malformed body, path parameter, or an invalid config.
errorErrorDetailrequiredShow propertiesHide properties
codeErrorCoderequiredThe machine-readable half of an error response, and the field a client
branches on. Closed: every error carries exactly one of these.
Allowed:
unauthorizedforbiddennot_foundinvalid_requestconflictclient_outdatedprecondition_failedtoo_many_requestsinternalmessagestringrequired401Missing, malformed, or invalid bearer token.
errorErrorDetailrequiredShow propertiesHide properties
codeErrorCoderequiredThe machine-readable half of an error response, and the field a client
branches on. Closed: every error carries exactly one of these.
Allowed:
unauthorizedforbiddennot_foundinvalid_requestconflictclient_outdatedprecondition_failedtoo_many_requestsinternalmessagestringrequired403Caller lacks agent.publish.
errorErrorDetailrequiredShow propertiesHide properties
codeErrorCoderequiredThe machine-readable half of an error response, and the field a client
branches on. Closed: every error carries exactly one of these.
Allowed:
unauthorizedforbiddennot_foundinvalid_requestconflictclient_outdatedprecondition_failedtoo_many_requestsinternalmessagestringrequired404No such agent, or the caller cannot see it.
errorErrorDetailrequiredShow propertiesHide properties
codeErrorCoderequiredThe machine-readable half of an error response, and the field a client
branches on. Closed: every error carries exactly one of these.
Allowed:
unauthorizedforbiddennot_foundinvalid_requestconflictclient_outdatedprecondition_failedtoo_many_requestsinternalmessagestringrequired409Idempotency-Key was already used for a different request.
errorErrorDetailrequiredShow propertiesHide properties
codeErrorCoderequiredThe machine-readable half of an error response, and the field a client
branches on. Closed: every error carries exactly one of these.
Allowed:
unauthorizedforbiddennot_foundinvalid_requestconflictclient_outdatedprecondition_failedtoo_many_requestsinternalmessagestringrequired