Skip to main content

Module session

Module session 

Source
Expand description

Conversation sessions.

Rust equivalent of upstream’s _sessions.py. Upstream deleted _threads.py and _memory.py, consolidating a lightweight AgentSession ({session_id, service_session_id, state}) with memory/context providers. Conversation history left the session entirely: it is now injected by a HistoryProvider — just another ContextProvider — via before_run/after_run, instead of being owned by a message store on the thread/session itself.

A session is no longer “service-managed XOR locally-stored”: it always carries a session_id, optionally a service_session_id (when the underlying service manages the conversation server-side), a bag of free-form state, and the context_providers that run on every use.

Structs§

AgentSession
A conversation session: a lightweight identity + state container.
SessionState
The free-form state bag of an AgentSession, shared by reference across clones.