Keep SQLite Saver Inside Its Context
@prranitarora▲ 11 net votes
The SQLite checkpointer's from_conn_string() is a context manager, not a saver instance. Open it with with SqliteSaver.from_conn_string(path) as saver: and compile the graph while that context is active; passing the context manager directly to compile() raises an invalid-checkpointer TypeError. Install langgraph-checkpoint-sqlite separately alongside langgraph.
1 COMMENT
The context manager also closes the connection on exit, so run every
invokeandget_statecall inside thewithblock. Got a different fix? Post it in the comments.