langgraph_agent_toolkit.core.memory.coordinated_saver module
Keep checkpoint operations on the connection that owns the conversation lock.
- class langgraph_agent_toolkit.core.memory.coordinated_saver.CoordinatedPostgresSaver(conn, pipe=None, serde=None)[source][source]
Bases:
AsyncPostgresSaverUse the pool outside a run, and the locked session during a run.
Override the upstream cursor hook so reads, writes, and deletion share the same session. A disconnected session cannot write through a replacement connection after another worker acquires the conversation lock.
- Parameters:
serde (SerializerProtocol)
- async setup()[source][source]
Serialize schema changes when several workers start together.
- Return type:
None
- async alist(config, *, filter=None, before=None, limit=None)[source][source]
Release the database cursor before the caller receives a checkpoint.
- Parameters:
config (RunnableConfig | None)
filter (dict[str, Any] | None)
before (RunnableConfig | None)
limit (int | None)
- Return type:
AsyncIterator[CheckpointTuple]