Core Interfaces
StateModule Interface
All state-aware components implement theStateModule interface:
ReActAgent, InMemoryMemory, PlanNotebook, etc. all implement this interface.
State Interface
State is a marker interface that identifies objects that can be stored by Session:
Usage
Recommended: Use Agent’s saveTo/loadFrom
For most scenarios, call the state management methods directly on Agent:Direct Session API Usage
Session provides type-safe state storage API:Custom Components
ImplementStateModule to enable persistence for custom components:
SessionKey
SessionKey identifies a session. SimpleSessionKey is the common implementation: