Create a new immutable agent version
Creates a new immutable agent version from a full definition and moves the agent’s latest pointer to it, in one atomic operation. base_agent_version_id must be the agent’s current latest_agent_version_id or the request is rejected with 409 revision_conflict, so the caller can re-read and retry rather than silently racing another writer. Every field is full content, there is no partial-update or omit-to-inherit semantics, so an omitted field is cleared rather than carried over from the base version. Tags are changed only through the dedicated agent tag routes. Invalid promptCacheTTL or promptCacheSharedTTL settings in model_config.provider_params return 400 when prompt caching is enabled. Invalid model_config and unsupported reasoning_effort values return 400, including when the model catalog lists no exact options for the selected model; a model catalog that cannot be read to verify them returns 503. The response’s execution definition and latest_agent_version_id are the exact values this call committed; created_at and updated_at are the authoritative persisted timestamps; tags are mutable catalog metadata and are not changed by this route. Do not automatically retry an ambiguous transport failure: re-read the agent’s latest version first, because this operation does not replay a prior response.
Authorizations
Headers
Path Parameters
Body
Request body for creating a new immutable standalone Managed Agent version. Send every field you want to keep: omitted fields are cleared, except that web search turns on and the template stays. base_agent_version_id must name the current version or the request is rejected with revision_conflict.
Built-in integrations this agent may use, each naming an active organization connection an admin added on the Integrations page. A non-empty tools list narrows this agent below the connection's organization allow-list; omission inherits it. Sessions receive short-lived access restricted to the effective tools; nothing is granted through a vault. Omit or send [] for no connections. Carried in full on every version write.
25Individual default items within default_vault_ids. The list is a whitelist across every default vault, not a filter within one, so it must name every item the agent should receive. Omit to select every item the default vaults hold when the agent is saved. The selection is stored with the agent version, so a credential added to one of those vaults later is not included until the agent is saved again with it selected. [] alongside a non-empty default_vault_ids is rejected because it would select none.
The agent's default criteria, in order. Send [] to clear them. With defaultEvaluatorAgentId they define a default outcome for this agent's sessions; without one they are the criteria this agent checks when it evaluates another session. Send these or default_rubric; both are accepted only when the rubric parses to exactly these criteria, as in a read-back body, and the rubric is then kept as written. Criteria render to at most 256 KiB. An explicit session outcome overrides the default.
200Billing project copied into sessions started from this agent when their create request omits project_id. A non-empty session project_id overrides it. Accepted only on a model that GET /managed-agents/v1/models marks requiresProject; refused with 400 for an organization whose model list has no such model.
Deprecated: send default_criteria. Markdown rubric, read into the agent's default criteria when saved. With defaultEvaluatorAgentId it defines a default outcome for this agent's sessions; without one it supplies fallback criteria when this agent evaluates another session. Must contain at least one gradeable markdown list item. An explicit session outcome overrides the default.
Maximum grading passes of the outcome a session inherits from the default rubric, including a roster agent graded on work a coordinator hands it. Omit for five; at least 1, so every inherited outcome is bounded; 0 or a negative value returns 400. An explicit session or automation outcome keeps its own ceiling.
1 <= x <= 9007199254740991Native integration providers whose MCP tools sessions of this agent do not receive even though the grant is present; the agent's own mcp_servers are never affected. github is accepted but ignored, because a GitHub grant always keeps its MCP tools alongside git and gh in the sandbox. Omitting the field means none, on managedAgentsCreateAgent as on managedAgentsCreateAgentVersion.
Maximum number of this agent's root sessions that may run or wait on compute at once. Omit for unlimited. Sessions beyond the cap are accepted with execution_state=queued and wait until a slot frees; child/subagent sessions and outcome evaluation passes do not count.
1 <= x <= 10000Remote MCP servers whose tools are added to the agent's tool surface. Each entry is an object with name and url, e.g. {"name": "docs", "url": "https://example.com/mcp"}. Credentials come from the vaults granted to the session, and the discovered tool list is snapshotted at session start, so a later edit here does not change a running session.
Free-form caller-owned JSON stored with the agent and returned on reads. Never sent to the model. Interpreted keys are slack_reply_icon, an optional string used as the Slack message picture: empty, an https:// image URL of at most 2048 bytes without credentials or a fragment, or an emoji shortcode such as :robot_face:, and other values are rejected; and managed_by, used to classify agent ownership with selected service-owned values reserved. Other keys are not interpreted by the service.
Default inference config applied to sessions started from this agent. Omit model_config or send {} to use provider defaults; null is invalid. reasoning_effort is normalized and validated for direct providers, and must exactly match the selected catalog model's supportedReasoningEfforts. An unsupported reasoning_effort, including any value for a catalog model that lists no exact options, returns 400. Authored provider_params.thinking objects are validated. When prompt caching is enabled, invalid provider_params.promptCacheTTL or provider_params.promptCacheSharedTTL values, incompatible models, and shared retention shorter than promptCacheTTL return 400. An imagesInView outside 1 to 50 returns 400. These checks run on agent and version writes and again at session start; a model catalog that cannot be read to verify settings returns 503.
How sessions started from this agent reach their tools: native lists every tool to the model; codemode hides ordinary tools behind one JavaScript tool, keeping native the tools the session must run itself: waiting, spawning sub-agents, reviewed publication, tools that need the full conversation, tools whose policy denies them or requires approval, and the workflow tools submit_result, submit_repository_result, message_parent, interrupt_agent, archive_thread and rename_agent. On agent creation, omission selects codemode for enabled organizations and native otherwise. On version writes, omission inherits the agent's current mode. Explicit or inherited codemode returns HTTP 400 when the organization is not enabled. Snapshotted when a session starts.
native, codemode Response
A configured standalone Managed Agent: its versioned execution definition plus current mutable classification tags. Publishing the execution definition mints a new immutable version; applying tags does not.
A configured standalone Managed Agent: its versioned execution definition plus current mutable classification tags. Publishing the execution definition mints a new immutable version; applying tags does not.
Native integration providers whose MCP tools new sessions of this agent do not receive, even though the grant is present. Suppresses integration-derived servers only, never the agent's own mcp_servers. github is ignored, because a GitHub grant always keeps its MCP tools alongside git and gh in the sandbox. A version write carries the list in full: omitting it publishes a version with none.
Remote MCP servers to attach. Each entry is an object with name (the label the server's tools are grouped under) and url (its http/https endpoint); any further keys are passed to the runtime unchanged. Credentials come from the vaults granted to the session, not from this entry. Tools are discovered and snapshotted at session start.
Built-in integrations this agent may use, each naming an active organization connection an admin added on the Integrations page. A non-empty tools list narrows this agent below the connection's organization allow-list; omission inherits it. Sessions receive short-lived access restricted to the effective tools. Not a vault grant: nothing about these appears under credential access. A version write carries the list in full: omitting it publishes a version with none.
Maximum grading passes of the outcome a session inherits from this agent's default rubric, including a roster agent graded on work a coordinator hands it. Omitted means five; at least 1, since every inherited outcome is bounded. An explicit session or automation outcome keeps its own ceiling. Carried in full on every version write: omitting it publishes a version with the default.
1 <= x <= 9007199254740991Maximum number of this agent's root sessions that may run or wait on compute at once. Omit for unlimited. Sessions beyond the cap are accepted with execution_state=queued and wait until a slot frees; child/subagent sessions and outcome evaluation passes do not count. Carried in full on every version write: omitting it publishes a version with no cap.
1 <= x <= 10000How sessions started from this agent reach their tools: native lists every tool to the model; codemode hides ordinary tools behind one JavaScript tool, keeping native the tools the session must run itself: waiting, spawning sub-agents, reviewed publication, tools that need the full conversation, tools whose policy denies them or requires approval, and the workflow tools submit_result, submit_repository_result, message_parent, interrupt_agent, archive_thread and rename_agent. Omit for native. Refused when the organization is not enabled for codemode. Snapshotted when a session starts.
native, codemode