Move an agent's live sessions to its latest version
Starts a background upgrade that asks every live root session of the agent the caller may change — active, queued, idle or awaiting a person — to move to the agent’s latest version, pinned when the request is accepted. It returns 202 at once with the upgrade; follow it with managedAgentsGetAgentSessionUpgrade. Each session is moved exactly as managedAgentsReplaceSessionAgentVersion moves one, and the move takes effect before that session’s next model call. A move brings the session’s instructions, model and inference settings, tools, MCP servers, skills, integrations, credentials and roster to the new version, tells the agent what changed, and moves an outcome the session inherited from the agent’s default rubric to the new version’s default. Setting replaceActiveOutcome also replaces an active caller-supplied outcome with the target default, including on a session already at that version, preserving its objective, pass limit and grading history. An outcome under evaluation waits; terminal outcomes remain unchanged. Explicit replacement requires a usable target default rubric. Sessions that cannot move are counted as skipped with a reason and left as they are. One upgrade runs per agent at a time, and upgrades of different agents run side by side: repeating the request with the same outcome replacement policy while the agent’s upgrade runs returns the running upgrade and starts nothing; a conflicting policy answers 409 conflict. An agentId that names no agent of the caller’s organization answers 404, and an agent with no version answers 409 conflict. Requires an Idempotency-Key header: the same key with the exact HTTP method, escaped path, raw query, and raw body bytes replays the original 202; any difference is rejected. The caller needs both managed-agents:create and managed-agents:update.
Authorizations
Headers
Replay-protection key in an organization-wide namespace shared by keyed mutations. It must contain 1 to 256 visible ASCII characters and be sent as exactly one header value. Request identity is the exact HTTP method, escaped path, raw query, and raw body bytes. The same request replays the original successful response; any different request returns 409 idempotency_conflict, and an active matching request returns 409 idempotency_in_progress. Completed receipts are retained for approximately 24 hours, pending claims may be reclaimed after approximately 1 hour, and no deduplication is guaranteed after expiry.
1 - 256^[!-~]+$Path Parameters
Body
Explicitly replace each active outcome, including caller-supplied outcomes, with the pinned target version's default rubric, preserving its objective, pass limit and grading history. A grader already in flight finishes first; terminal outcomes are not replaced. Also applies to sessions already on that version.
Response
A request to move every live root session of one agent to that agent's latest version, and how far it has come.
A request to move every live root session of one agent to that agent's latest version, and how far it has come.