Skip to main content
PUT
Move a session to another version of its agent

Authorizations

Authorization
string
header
required

A Recursion API key, created in the console under API keys.

Headers

x-tenant-id
string

Optional tenant consistency check. When present, it must name the tenant bound to the API key, including when x-organization-id is default.

Minimum string length: 1
x-organization-id
string

Organization in which to act. Required for a tenant-scoped API key. Optional for an organization-scoped key, where it must name that same organization. The value may be an organization id or default.

Minimum string length: 1

Path Parameters

sessionId
string<uuid>
required

Session id (UUID) as returned by managedAgentsStartSession or managedAgentsListSessions.

Body

application/json

The agent version a root session should run.

agentVersionId
string<uuid>
required

Version the session should run. It must be a version of the session's own agent. Naming the version the session already runs withdraws a move that is still pending.

Response

The agent version a root session runs, the move waiting to take effect if any, and how far each member of the session tree has followed.

The agent version a root session runs, the move waiting to take effect if any, and how far each member of the session tree has followed.

agentVersionId
string<uuid>
required

Version the session is set to run: the pending version while a move is waiting, otherwise the version it runs now.

currentAgentVersionId
string<uuid>
required
read-only

Version the session runs now.

lastFailure
null | object
required

Why the most recent move was refused, or null. Null while a newer move is pending.

latestAgentVersion
null | object
required

The agent's newest version, or null when the agent has been deleted.

members
object[]
required
read-only

The root session and every open thread of its tree, root first, with how far each has followed the root.

pending
null | object
required

The move waiting to take effect, or null.

state
enum<string>
required
read-only

current: nothing is waiting. pending: agentVersionId takes effect before the session's next model call. failed: the last move was refused and the session stayed on currentAgentVersionId; lastFailure says why.

Available options:
current,
pending,
failed
currentVersion
integer<int64>
read-only

Number of currentAgentVersionId within its agent. Absent when the number can no longer be read.

Required range: 1 <= x <= 9007199254740991