Application memory is the transient information retained while an application runs. Without it, a rerun can reset variables such as a task list, while a chatbot forgets earlier messages. section 4.4 section 10.3.1
A conversational graph retains state by combining two pieces:
- A checkpointer such as LangGraph’s MemorySaver stores graph state in memory. section 10.3.1
- A consistent thread ID identifies related invocations, allowing the graph to resume with that thread’s previous state. section 10.3.1
Remembering a follow-up message
A support chatbot initially answers one message. When the user asks a follow-up, passing the same thread ID lets the graph recall the earlier conversation instead of treating the follow-up as a new execution. section 10.3.1
from langgraph.checkpoint.memory import MemorySaver
from langgraph.graph import START, END, StateGraph, MessagesState
...
class SupportAgentGraph:
def __init__(self, llm):
self.llm = llm
self.config = {"configurable": {"thread_id": "1"}}...
...
def build_graph(self):
memory = MemorySaver()
builder = StateGraph(MessagesState)
...
return builder.compile(checkpointer=memory)
def invoke(self, human_message_text):
...
return self.graph.invoke(state, self.config)
The implementation listing shows MemorySaver, graph compilation with a checkpointer, thread configuration, and invocation with that configuration. section 10.3.1













