LangChain Reference home pageLangChain ReferenceLangChain Reference
  • GitHub
  • Main Docs
Deep Agents
LangChain
LangGraph
Integrations
LangSmith
  • Overview
  • LangGraph Checkpoint
    LangGraph Store
    Checkpoint Postgres
    Store Postgres
    Checkpoint SQLite
    LangGraph Prebuilt
    LangGraph CLI
    LangGraph SDK
    LangGraph Supervisor
    LangGraph Swarm
    ⌘I

    LangChain Assistant

    Ask a question to get started

    Enter to send•Shift+Enter new line

    Menu

    LangGraph Checkpoint
    LangGraph Store
    Checkpoint Postgres
    Store Postgres
    Checkpoint SQLite
    LangGraph Prebuilt
    LangGraph CLI
    LangGraph SDK
    LangGraph Supervisor
    LangGraph Swarm
    Language
    Theme
    Pythonlanggraph-clischemasThreadTTLConfig
    Class●Since v0.4

    ThreadTTLConfig

    Copy
    ThreadTTLConfig()

    Bases

    TypedDict

    Constructors

    Attributes

    View source on GitHub
    constructor
    __init__
    NameType
    strategyLiteral['delete', 'keep_latest']
    default_ttlfloat | None
    sweep_interval_minutesint | None
    sweep_limitint | None
    attribute
    strategy: Literal['delete', 'keep_latest']

    Action taken when a thread exceeds its TTL.

    • "delete": Remove the thread and all its data entirely.
    • "keep_latest": Prune old checkpoints but keep the thread and its latest state.
    attribute
    default_ttl: float | None

    Default TTL (time-to-live) in minutes for checkpointed data.

    attribute
    sweep_interval_minutes: int | None

    Interval in minutes between sweep iterations. If omitted, a default interval will be used (typically ~ 5 minutes).

    attribute
    sweep_limit: int | None

    Maximum number of threads to process per sweep iteration. Defaults to 1000.

    Configure a default TTL for checkpointed data within threads.