liveBook · Manning

InMemorySaver

As explained in Build Python Web Apps with Streamlit

MemorySaver is a LangGraph checkpointer that stores graph-state snapshots in process memory.

InMemorySaver is a LangGraph checkpointer for keeping graph-state snapshots in process memory. It helps a conversational graph continue from earlier turns instead of starting with an empty state. section 10.3.1

Remembering a user’s name

A first message such as “Hi, my name’s Bob” is saved under thread ID 1. A later “What’s my name?” uses the same thread and can continue with the earlier messages. section 10.3.1

How Build Python Web Apps with Streamlit covers it

How deep it goes
Explains construction, graph compilation, thread configuration, and repeated invocation, but not checkpointer internals.
Examples
Demonstrates remembering Bob’s name across messages and shows the MemorySaver, compilation, configuration, and invocation snippets.
What it assumes
Assumes a LangGraph StateGraph and invocation flow, while explaining checkpointers and thread-based state continuity.
What you can do after
Build it from scratch by compiling a LangGraph graph with MemorySaver and invoking it repeatedly with a stable thread ID.
How it connects
Connects checkpointers with graph state, graph compilation, conversations, thread IDs, and database persistence.

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Build Python Web Apps with Streamlit. The section links point to the parts of the book it draws on.