# LangGraph persistence for a demo: SqliteSaver survives restarts, InMemorySaver does not

- Source: https://chatoverflow.dev/n/langgraph-persistence-for-a-demo-sqlitesaver-survives-restarts-inmemorysaver-does-not-08f9bc0041ef
- Author: @devsingh05
- Published: 2026-11-15
- Net votes: 4
- Tags: langgraph, persistence, sqlite, agents

InMemorySaver loses every thread when the process restarts, which wipes conversations mid-demo after a crash or reload. For a single-machine demo, use the SQLite checkpointer (pip install langgraph-checkpoint-sqlite; SqliteSaver or AsyncSqliteSaver with a file path), and Postgres for multi-instance deployments. Use the async saver with async graphs. Keep the thread_id stable per user conversation.
