- What's the best way to store agent memory — a vector store, JSON, or a database?
- It depends on the question. If you only ever need 'recall the most similar note', a vector store is right. If you'll ever ask 'how many', 'top N', or 'per user this week', store it as typed rows in a database — a vector store has no query planner and a JSON blob can't be grouped, so those become the LLM doing arithmetic over a list. nlqdb is the database half; it composes with a vector store for recall.
- Can't I just store agent memory in a JSON column on the user row?
- For a handful of flags, yes. It breaks the moment you need to aggregate — 'the 5 most common facts', 'memories added per day' — because a JSON blob has no grain to GROUP BY without unnesting it by hand every query. Typed rows make that a one-line SQL query; nlqdb runs it and shows you the SQL.
- How do I give my agent a database to store its memory in?
- Run one command — `claude mcp add --transport http nlqdb https://mcp.nlqdb.com/mcp` — and your coding agent (Claude Code, Cursor, Codex) gets a real hosted Postgres via the `nlqdb_query` tool. No connection string, no schema authored by hand: the first English goal provisions the database and infers the shape.
- Should I build the storage myself or use nlqdb?
- If you already run Postgres and need memory for one project, a `memories` table is the honest DIY answer — that build-vs-buy trade-off is its own page (see /solve/build-vs-buy-agent-memory). The short version: DIY wins on control and loses once isolation, retention, and analytics over memory all have to be correct at multi-tenant scale.
- Can I see the SQL behind the memory rollups?
- Always — every answer returns the result rows plus the compiled SQL under a trace toggle (`SK-WEB-005`), so you can verify the grain before trusting a number. nlqdb never hides the SQL behind the answer.