In LangMem
You're building on LangChain / LangGraph and want memory native to that stack.
Comparison
Pick LangMem if you want long-term memory wired into a LangGraph agent — semantic, episodic, and procedural memory the LLM extracts and consolidates for you. Pick nlqdb if your agent also needs to aggregate that memory: GROUP BY, JOIN, and HAVING over structured rows it provisions and migrates itself in plain English.
The same goal, two ways.
> distinct users who asked about pricing each week this quarter
In LangMem
You're building on LangChain / LangGraph and want memory native to that stack.
In your HTML
<nlq-data goal="distinct users who asked about pricing each week this quarter"></nlq-data> The aggregation LangMem's similarity search can't run — it returns the memories most relevant to a query, not a COUNT(DISTINCT) per week; nlqdb answers it as SQL over the agent's own memory.
What's different
| Dimension | nlqdb | LangMem | Note |
|---|---|---|---|
| Owns the database (provisions + migrates) | |||
| Natural-language → SQL | LangMem extracts and searches memories through its SDK; it has no NL→SQL compiler over a relational store. | ||
| Aggregations + reporting queries (GROUP BY / JOIN / HAVING over memory) | LangMem returns the memories most similar to a query; it has no query planner to aggregate across them. | ||
| Semantic / episodic / procedural memory (LLM-managed) | A unified API over fact, experience, and behavior memory is LangMem's core primitive; nlqdb stores typed rows, not LLM-extracted memory objects. |
| Dimension | nlqdb | LangMem | Note |
|---|---|---|---|
| Background memory manager (auto extract / consolidate / update) | LangMem's manager reviews conversations and decides what to store, update, or forget; nlqdb persists exactly the rows the agent writes. | ||
| Procedural memory / prompt self-optimization | |||
| Auto-migration via NL ('add a `priority` field') | |||
| MCP server (agent-callable) | LangMem is an in-process Python SDK (memory tools the agent calls inside a LangGraph app), not an MCP server; nlqdb's MCP exposes `nlqdb_query` / `nlqdb_list_databases` / `nlqdb_describe`, and `nlqdb_query` materialises Postgres on first reference. | ||
| Vector / semantic recall over stored memory | Similarity search over stored memories is LangMem's lane; nlqdb answers with structured SQL and ships no embedding-based recall today. | ||
| Open source / self-hostable | LangMem is an open-source LangChain SDK (PyPI `langmem`), self-hosted inside your app. nlqdb is source-available on FSL 1.1-ALv2, auto-converting to Apache 2.0 after two years. |
shipped · partial · not shipped
No sign-in. The anonymous database lasts 72 hours; adopt it with one click if you keep it.
Start with a goal →The error has been recorded. Reload to recover; if it persists, sign out and back in.