Expand description
Session persistence.
Sessions save agent Snapshots to a Storage
under the layout shared with the other Strands SDKs, so agents in any of them can share a session:
<sessionId>/scopes/<scope>/<scopeId>/snapshots/
snapshot_latest.json
manifest.json
immutable_history/snapshot_<uuidv7>.jsonSession, scope and snapshot ids match ^[a-z0-9_-]+$; immutable snapshot ids are UUID v7s.
SessionManager attaches a session to an agent.
Structs§
- Session
Manager - Saves and restores an agent’s session (
SessionManager). - Session
Manager Builder - Builds a
SessionManager; the setters are theSessionManagerConfigkeys. - Session
Manager Config - Configuration for a
SessionManager(SessionManagerConfig). - Snapshot
Manifest - Snapshot metadata stored next to a scope’s snapshots (
SnapshotManifest), asmanifest.json. - Snapshot
Trigger Callback - Decides after each invocation whether to save an immutable snapshot
(
SnapshotTriggerCallback):truesaves one. - Snapshot
Trigger Params - What a
SnapshotTriggerCallbacksees when deciding whether to save an immutable snapshot (SnapshotTriggerParams).
Enums§
- Save
Latest Strategy - When
snapshot_latestis saved automatically (SaveLatestStrategy).