Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Covers LangGraph checkpointing: MemorySaver/PostgresSaver setup, thread_id use, JSON-safe state, schema migration, time-travel debugging.
78% 91%+13 ptsof test cases passed
Passed 21 of 23 test cases with the skill, and 18 of 23 without it.
We are defining our agent state schema using TypedDict. Our state includes message history, turn counts, last user action timestamps, and transaction price data. How should non-primitive types be handled to avoid serialization errors during human-in-the-loop interrupts?
Message history is typed using Annotated with AnyMessage list and add_messages reducer
3 of 3 safety checks passed
A chat agent that "keeps introducing itself" is almost always P16. The caller
invokes graph.invoke(state) without passing config={"configurable": {"thread_id": ...}} — LangGraph's checkpointer silently spawns a fresh state per
call. No error, no warning, no log line. The user sees it; the code does not.
That is one of five separate checkpointing pitfalls this skill covers:
thread_id silently resets memoryinterrupt_before raises TypeError when state holds non-JSON values
(datetime, Decimal, custom classes) — and it raises at the interrupt
boundary, not when the bad value was first assigned, so the traceback points
at the wrong linePostgresSaver does not auto-migrate checkpoint schema; upgrading
langgraph silently reads old checkpoints as empty stateConversationBufferMemory and the rest of legacy chat memory were
removed in LangChain 1.0; checkpointers are the replacementstate["files"] grows unboundedly
and eventually makes checkpoint writes a latency hotspotThis skill walks through picking a checkpointer by environment, enforcing
thread_id at the application boundary, constraining state to JSON-safe
primitives, Postgres setup + migration, and time-travel for incident debugging.
Pinned to langgraph >= 1.0, < 2.0, langgraph-checkpoint-postgres >= 1.0, < 2.0. Pain-catalog anchors: P16, P17, P18, P20, P22, P40, P51.
pip install langgraph langchain-core (both >= 1.0, < 2.0)pip install langgraph-checkpoint-postgres and a Postgres 13+
instanceasyncpgthread_id strategy — typically a UUID4 string per conversation; see
thread-id-discipline.mdSkills that do similar work, with their benchmark result.
Next to this one in the catalogue, plus more from the same author.