langgraph.json
to automatically manage the lifecycle of this data, preventing indefinite accumulation.
checkpointer.ttl
configuration to your langgraph.json
file:
strategy
: Specifies the action taken on expiration. Currently, only "delete"
is supported, which deletes all checkpoints in the thread upon expiration.sweep_interval_minutes
: Defines how often, in minutes, the system checks for expired checkpoints.default_ttl
: Sets the default lifespan of checkpoints in minutes (e.g., 43200 minutes = 30 days).store.ttl
configuration to your langgraph.json
file:
refresh_on_read
: (Optional, default true
) If true
, accessing an item via get
or search
resets its expiration timer. If false
, TTL only refreshes on put
.sweep_interval_minutes
: (Optional) Defines how often, in minutes, the system checks for expired items. If omitted, no sweeping occurs.default_ttl
: (Optional) Sets the default lifespan of store items in minutes (e.g., 10080 minutes = 7 days). If omitted, items do not expire by default.langgraph.json
file to set different policies for each data type. Here is an example:
store.ttl
settings from langgraph.json
can be overridden at runtime by providing specific TTL values in SDK method calls like get
, put
, and search
.
langgraph.json
, deploy or restart your LangGraph application for the changes to take effect. Use langgraph dev
for local development or langgraph up
for Docker deployment.
See the [langgraph.json CLI reference][configuration-file] for more details on the other configurable options.