Skip to main content
Add memory to a Functional API entrypoint with a checkpointer and, optionally, a store. Checkpoints persist state across invocations of the same thread_id. A store persists facts across thread IDs. For concepts, see the Functional API overview. For Graph API memory recipes, see Memory.

Save state on a thread

Pass a checkpointer when you create the entrypoint. Identify each run with thread_id. Call getPreviousState inside the entrypoint. On the first run it is undefined.

Return a different saved value

Use entrypoint.final when the caller should receive one value and the next run should read another. value is returned to the caller. save is what the next getPreviousState read sees. For example, return a status or summary, and save the full internal state.

Inspect checkpoints

View or delete checkpoints on the accumulate workflow from Return a different saved value. values is the saved checkpoint (save), not the value returned to the caller.

View thread state

View thread history

Delete checkpoints for a thread

Build a chatbot with checkpoints

Keep the conversation on the thread. Return the model message to the caller, and save the full list for the next turn with entrypoint.final.

Save facts across threads

Long-term memory lives in a store, not in the checkpointer. Save a fact on one thread_id and read it on another. Pass an InMemoryStore when you create the entrypoint. Read and write it with config.store.

See also