#[non_exhaustive]pub struct Session {Show 15 fields
pub id: String,
pub kind: String,
pub status: SessionStatus,
pub agent: Option<SessionAgent>,
pub environment_id: Option<String>,
pub vault_ids: Vec<String>,
pub title: Option<String>,
pub metadata: HashMap<String, String>,
pub usage: Option<SessionUsage>,
pub stats: Option<SessionStats>,
pub resources: Vec<SessionResource>,
pub outcome_evaluations: Vec<Value>,
pub created_at: Option<String>,
pub updated_at: Option<String>,
pub archived_at: Option<String>,
}managed-agents-preview only.Expand description
A Managed Agents session.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.id: StringStable session identifier (sesn_...).
kind: StringWire type; always "session".
status: SessionStatusLifecycle status.
agent: Option<SessionAgent>Resolved snapshot of the agent at session-creation time. Pinned even if the underlying agent is later updated.
environment_id: Option<String>ID of the environment this session runs in.
vault_ids: Vec<String>Vault references for MCP credential resolution.
title: Option<String>Optional human-readable title.
metadata: HashMap<String, String>Free-form key-value metadata attached at create time.
usage: Option<SessionUsage>Cumulative token usage. May be absent on freshly-created sessions.
stats: Option<SessionStats>Wall-clock and active-runtime stats.
resources: Vec<SessionResource>Mounted resources: file uploads, GitHub repositories, memory
stores. Each carries a server-assigned id (sesrsc_...) used
for Resources::update
and Resources::delete.
outcome_evaluations: Vec<Value>Outcome evaluations recorded against this session, when an
outcome was defined. Research-preview: this field is
populated only when the session uses the outcomes feature
(user.define_outcome events, requires
managed-agents-2026-04-01-research-preview beta header).
Preserved as Vec<Value> until the outcomes types land.
created_at: Option<String>Timestamp when the session was created (RFC3339 / ISO 8601).
updated_at: Option<String>Timestamp of the most recent update.
archived_at: Option<String>Set when the session has been archived.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Session
impl<'de> Deserialize<'de> for Session
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Auto Trait Implementations§
impl Freeze for Session
impl RefUnwindSafe for Session
impl Send for Session
impl Sync for Session
impl Unpin for Session
impl UnsafeUnpin for Session
impl UnwindSafe for Session
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more