Skip to main content

Module sessions

Module sessions 

Source
Available on crate feature managed-agents-preview only.
Expand description

Sessions: provision, retrieve, list, archive, delete.

A session is a running agent instance within an environment. Each session references an agent (by ID or pinned to a version) and an environment, and maintains conversation history across multiple interactions.

Structs§

CacheCreationUsage
Prompt-cache write tokens, split by ephemeral TTL.
CreateSessionRequest
Request body for POST /v1/sessions.
CreateSessionRequestBuilder
Builder for CreateSessionRequest.
ListSessionsParams
Optional knobs for Sessions::list.
Session
A Managed Agents session.
SessionAgent
Snapshot of an agent’s configuration at the moment a session was created. Mirrors Agent but is pinned – later edits to the agent don’t change a session’s recorded snapshot.
SessionStats
Wall-clock and active-runtime statistics for a session.
SessionUsage
Cumulative token usage on a session.
Sessions
Namespace handle for the Sessions API.
UpdateSessionRequest
Request body for Sessions::update. All fields optional with merge-patch semantics: omit a field to preserve.

Enums§

AgentRef
Reference to an agent: either a string ID (latest version) or a pinned {type, id, version} object.
SessionStatus
Session lifecycle status.