ShallowRedisSaver - A Redis checkpoint saver that only keeps the latest checkpoint per thread.

This is a memory-optimized variant that:

  • Only stores the most recent checkpoint for each thread
  • Stores channel values inline (no separate blob storage)
  • Automatically cleans up old checkpoints and writes when new ones are added
  • Reduces storage usage for applications that don't need checkpoint history

Hierarchy (view full)

Constructors

Properties

Methods

  • Delete all checkpoints and writes associated with a specific thread ID.

    Parameters

    • threadId: string

      The thread ID whose checkpoints should be deleted.

    Returns Promise<void>

  • Returns Promise<void>

  • Parameters

    • config: RunnableConfig<Record<string, any>>

    Returns Promise<undefined | Checkpoint<string, string>>

  • Generate the next version ID for a channel.

    Default is to use integer versions, incrementing by 1. If you override, you can use str/int/float versions, as long as they are monotonically increasing.

    Parameters

    • current: undefined | number

    Returns number

  • Parameters

    Returns Promise<RunnableConfig<Record<string, any>>>

  • Store intermediate writes linked to a checkpoint.

    Parameters

    • config: RunnableConfig<Record<string, any>>
    • writes: PendingWrite[]
    • taskId: string

    Returns Promise<void>