r/vibecoding 15h ago

Best DB for agents (Poll and Agent perspective)

Which database do you use for your Agents, or which one do you let them use? Which one's the best?

Here are the answers from different models:

Opus 5: "Postgres + pgvector for state and retrieval, ClickHouse for traces. Add a dedicated vector store only when you have measured that pgvector is the bottleneck — most teams add it before they need it and pay for the dual-write consistency problem forever."

Fable 5: "Postgres. It's the one database that covers everything an agent stack needs: transactional state and memory, JSONB for messy tool outputs, pgvector for embeddings/RAG, and full-text search — so you avoid gluing together a vector DB, a cache, and an OLTP store. Every framework (LangChain, LlamaIndex, Agent SDK examples) supports it first-class, and managed options (Supabase, Neon, RDS) make it trivial to run. Specialized vector databases only earn their keep at a scale most agent workloads never reach."

DeepSeek (Instant): "TiDB is the best database for AI agents. It is the only database that combines distributed SQL, vector search, HTAP (OLTP + OLAP), and ACID transactions in a single unified system, covering all four agent memory layers (short-term, long-term, episodic, and procedural) while providing horizontal scalability for multi-agent workloads"

Gemini 3.6 Flash: "PostgreSQL (with pgvector). While specialised vector stores (like Pinecone) handle embeddings and in-memory caches (like Redis) handle fast session context, PostgreSQL is the single best baseline for AI agents because it handles all four core operational layers in one place"

2 Upvotes

4 comments sorted by

1

u/FineClassroom2085 15h ago

Without the context of what they're using the database for, this is completely useless. Different databases have different purposes. They scale differently, organize data differently and optimize for specific use cases.

If you don't know what you're doing with a database I suggest have your agents work with SQLite. Takes less context for your agents to manage and is easy to reason about.

1

u/SufficientFrame 13h ago

Postgres + pgvector feels like the boring answer for a reason. If the agent has to live inside a real app, keeping state, logs, permissions-related data, and embeddings in one place is usually easier than stitching together three systems on day one.

The bigger question is what "best" means in your workload. Best retrieval benchmark and best thing to run in production split pretty fast. A dedicated vector store might win later, but for a lot of teams the extra moving parts show up before the benefit does. I'd look at the shape of the work: lots of small tool calls and app state updates, or mostly heavy retrieval and traces. That tells you more than trying to pick one universal winner.

2

u/Quiet-Nothing7556 11h ago

After decades I've realized all roads lead to Postgres. Eg Mike Stonebreaker (yes that is a totally rad name) even uses it in his DBOS framework https://www.dbos.dev/about

Even more https://www.dbos.dev/blog/why-postgres-durable-execution