Why We Ditched Vectors and Graphs for SQL in Agent Memory Systems
Practical, code-first guide to architecting agent memory with SQL, from schema to query, showing why and how it’s a real alternative to vector and graph stores.
Vector and Graph Memories Fail for Structured Agent State
Vector and graph-based agent memories get too much credit for handling agent memory. Embeddings work for dense semantic search, but agents rarely need "fetch a vaguely similar past task." They need precise context: when did this subgoal run? what did the tool call return? what failures followed? Vector recall flattens distinct episodes, loses any notion of order, and can't reliably fetch concrete data.
Graph memories—LangGraph and similar models—promise structure, but agent traces are almost always linear. Traces as graphs usually collapse to a table; real branching is rare. Custom graphs fall apart at scale or require DSLs that bloat complexity. In production, dumping >50,000 tool calls in a property graph is slow and tedious.






