1. PostgreSQL
Best for: the coordination layer: which agent owns which task, what each one handed off, and the framework's thread checkpoints, written by many agents at once
Every multi-agent system needs a place where agents agree on who is doing what, and a relational database is the safest default for it. A tasks table read with SELECT ... FOR UPDATE SKIP LOCKED lets any number of agents claim work without taking the same row; the PostgreSQL docs describe it as a way to avoid lock contention with multiple consumers reading a queue-like table. Record the owner and a lease in the same transaction, and the claim, the agent's status and the handoff record change together or not at all. LISTEN and NOTIFY wake waiting agents when a task is added or finished: a notification is delivered only once its transaction commits, to sessions listening at that moment, with a payload under 8,000 bytes by default. For a LangGraph system, PostgresSaver keeps each thread's checkpoints and PostgresStore keeps memory every thread can read, and LangSmith Agent Server backs its persistence with Postgres by default.
Strengths
- Transactions across tables, so claiming a task and recording a handoff can't half-happen
- Many concurrent writers, with row locks and advisory locks whose meaning your application defines
- Official LangGraph checkpointer and store, so one database holds thread state, shared memory and your own coordination tables
- Every language and framework can reach it, and every cloud runs it for you
Tradeoffs
- Not for the work itself: repositories, datasets and reports go on a file system or in a bucket, with their paths in the row
NOTIFYisn't a durable queue: an agent that wasn't listening misses the message, so re-read the table after reconnecting- Leases, heartbeats and retries are your code; a workflow engine does them for you
- CrewAI flows persist to a local SQLite file by default, and Microsoft Agent Framework checkpoints to memory, files or Azure Cosmos DB, so reaching Postgres from them takes some code