Strands Agents Typescript SDK
    Preparing search index...

    Class SessionManager

    Manages session persistence for agents, enabling conversation state to be saved and restored across invocations using pluggable storage backends.

    import { SessionManager, FileStorage } from '@strands-agents/sdk'

    const session = new SessionManager({
    sessionId: 'my-session',
    storage: { snapshot: new FileStorage() },
    })
    const agent = new Agent({ sessionManager: session })

    Implements

    Index

    Constructors

    Methods

    • Loads a snapshot from storage and restores it into the target agent. Returns false if no snapshot exists.

      Parameters

      • params: { target: Agent; snapshotId?: string }

      Returns Promise<boolean>