Solve · Agent builders
How do I give my AI agent persistent memory across sessions?
If your agent needs to remember user facts, prior tool calls, or task state across sessions, expose a database to it via MCP — nlqdb's MCP server ships `create_database`, `ask`, and `run` so the agent can both provision the store and query it in English.
Agent builders pick between unstructured memory (vector recall over chat history, e.g. Mem0) and structured memory (rows the agent can query and aggregate later). The structured side has had no opinionated primitive — most teams stitch together a Postgres connection string, an ORM, and a hand-rolled migration loop before the agent runs its first tool call.
Drop this in your HTML
The query an agent runs to recover "what did the user ask me yesterday" is the canonical structured-memory readout, and the shape an MCP-aware agent expects.
recent agent memory across threads in the last day <nlq-data goal="recent agent memory across threads in the last day"></nlq-data> What nlqdb actually does for this
- MCP server at `mcp.nlqdb.com` exposes `create_database`, `ask`, `run` — the agent self-provisions and queries without a human in the loop.
- Schema evolves via English: `"add a priority column"` migrates the table; the diff is shown before apply (`SK-ONBOARD-004`).
- Per-(mcp_host, device_id) keys (`sk_mcp_*`) let one tenant share memory across an agent fleet without leaking other tenants' rows.
What nlqdb doesn't do here
- No native vector search yet — nlqdb is Postgres-first; for unstructured fact recall over chat-text strings, Mem0 or pgvector are the right shape.
- No explicit per-row TTL / forget primitive yet — anonymous DBs auto-sweep at 72h, but authed rows persist until deleted.
Questions buyers ask
- Is nlqdb a replacement for Mem0 for AI agent memory?
- Complementary, not replacement. Mem0 owns unstructured fact recall ("the user prefers Celsius"); nlqdb owns structured rows the agent later queries ("list the user's saved searches this week"). Both can sit behind one MCP-aware agent.
- How does the agent create its own database?
- Via the MCP `create_database` tool — the agent passes a goal in English (`"a memory store for my research assistant"`); the server materialises Postgres + a starter schema in one call and returns connection metadata bound to the agent's tenant.
- What about agent frameworks like LangChain or AutoGen?
- Any framework that speaks MCP can connect; the `@nlqdb/sdk` (TypeScript) is the typed fallback for non-MCP integrations. The `mcp` surface is the no-glue path — point the host (Claude Desktop, Cursor, Cline) at `mcp.nlqdb.com`.
- Does the agent need its own credentials?
- Yes — agents authenticate with `sk_mcp_*` keys minted with `(mcp_host, device_id)` claims. Per-device tagging means the dashboard shows `Cursor on macbook-air ran 14 queries today`; revocation is per-device, not per-user.
Where this pain shows up in public
Enduring discussion hubs where you can verify the theme without taking our word for it. We don't quote individual posts; we cite search-result and subreddit URLs that stay live as new threads land.
Try nlqdb in 30 seconds
No sign-in. The anonymous database lasts 72 hours; adopt it with one click if you keep it.
Start with a goal →