nlqdb

nlqdb

Natural-language databases.

Create one in a word. Query it in English. The infrastructure stays invisible — the escape hatch to raw SQL is one click away, always.

Built with an obsessive standard for user experience.

Spin up a database from a sentence.

Anonymous — no sign-in. Your DB lives 72h; sign in (always free) to keep it.

For AI agents

Memory your agent can query — not just recall.

A vector store returns the top-k similar chunks. nlqdb gives your agent a real database as its memory, so it can GROUP BY, JOIN, and aggregate over what it remembered — the analysis a similarity index structurally can’t do.

Recall is table stakes. Only one of these can aggregate.

Capability Mem0 Zep Letta nlqdb
Remember a fact ("Alice has a $50k deal") Storing a fact is table stakes — every memory layer does this.
Recall facts by similarity / relevance Retrieval is the job these tools are built for; nlqdb recalls via SQL filters.
Top-N by value ("top 5 deals by size") Needs ORDER BY + LIMIT over the full set, not a top-k similarity search.
Aggregate per group ("average deal size per stage") A vector/graph store returns matches; the LLM would have to do the arithmetic. nlqdb runs GROUP BY in Postgres.
Time-window analytics ("deals closing this month") Zep tracks temporal validity for point-in-time recall, but cannot aggregate across a window.
Full GROUP BY / JOIN / HAVING over memory The core wedge: a real query planner over the agent's own data.
Agent designs its own schema nlqdb provisions Postgres from the agent's first goal; the others impose a fixed memory shape.
Diff preview before destructive writes DDL/DML is previewed and confirmed before it applies (GLOBAL trust-UX).
Self-hostable Mem0/Letta/LangMem are OSI-licensed; Zep self-hosts the Graphiti engine but the platform is hosted; nlqdb is source-available under FSL (GLOBAL-019, not yet OSI), with the container pull-forward tracked in WS-11.
See the agent-memory story →

Join the waitlist

Pre-alpha — we'll email when nlqdb opens up. No marketing fluff, just one note when there's a button to push.

Also works for

Solo builders, analysts, and backend engineers.

Agent memory is the sharp edge — but the same talk-to-it database is a whole backend you didn’t have to build. If you’re shipping a side project, exploring data, or replacing a CRUD service, it works for you too.

Pick a way in. Same backend — the one that doesn’t exist.

Each snippet is the entire integration. No boilerplate omitted, no “configure your client” step elided. The contrast is the message.

# 1. install (curl, brew, npm — pick one)
curl -fsSL https://nlqdb.com/install | sh

# 2. create from a goal — the DB is a side effect
nlq new "an orders tracker for my coffee shop"

# 3. talk to it
nlq "add an order: alice, latte, $5.50, just now"
nlq "how many orders today, by drink"
<!-- one CDN script registers the elements -->
<script src="https://elements.nlqdb.com/v1.js" type="module"></script>

<!-- describe what you want; the DB is created on first call -->
<nlq-data
  goal="today's orders, newest first, with customer + total"
  db="orders"
  api-key="pk_live_..."
  template="table"
  refresh="5s"
></nlq-data>
import { NlqData } from "@nlqdb/react";

export function Orders() {
  return (
    <NlqData
      goal="today's orders, newest first"
      db="orders"
      apiKey={process.env.NEXT_PUBLIC_NLQDB_KEY}
      template="table"
      refresh="5s"
    />
  );
}
<script setup lang="ts">
import { NlqData } from "@nlqdb/vue";
</script>

<template>
  <NlqData
    goal="today's orders, newest first"
    db="orders"
    api-key="pk_live_..."
    template="table"
    refresh="5s"
  />
</template>
import { createClient } from "@nlqdb/sdk";

const client = createClient({ apiKey: process.env.NLQDB_KEY! });

// no schema, no SQL, no ORM. one verb.
const res = await client.ask({
  goal: "today's orders, newest first",
  dbId: "orders",
});

if (res.status === "ok") console.table(res.rows);
# same /v1/ask the SDK and the element call — no SDK required
curl -X POST https://app.nlqdb.com/v1/ask \
  -H "Authorization: Bearer sk_live_..." \
  -H "Content-Type: application/json" \
  -d '{"goal":"today orders, newest first","dbId":"orders"}'
// ~/Library/Application Support/Claude/claude_desktop_config.json
// (or ~/.cursor/mcp.json — same shape works in every MCP host)
{
  "mcpServers": {
    "nlqdb": {
      "url": "https://mcp.nlqdb.com",
      "headers": {
        "Authorization": "Bearer sk_mcp_..."
      }
    }
  }
}
import SwiftUI
import Nlqdb

NlqDataView(
  goal: "today's orders, newest first",
  dbId: "orders",
  apiKey: "pk_live_..."
) { result in
  Text("\(result.rowCount) rows")
}

Shipped <nlq-data> <nlq-action> TS SDK anonymous API chat surface db.create MCP server quality-eval React / Next Vue / Nuxt Svelte / Kit Astro Solid Swift

Phase 1 curl recipes

Phase 2 CLI Python SDK Go SDK BYOLLM

Wishlist VSCode JetBrains Slack Discord

Each one is a thin wrapper over the same elements — full matrix in progress.md. Tap a wishlist surface to nudge it up the list.

Eight boxes — or one tag.

Everything a normal backend forces you to wire together, replaced by a single element on the page.

  • Database
  • Schema
  • ORM
  • Endpoint
  • Auth
  • Cache
  • Migrations
  • Deploy
<nlq-data>

One element. Schema, plan, cache, auth — all server-side, all invisible.

Backed by the work

We didn't make this up. Here's where each idea comes from.

Pre-alpha making technical claims has to show its work. Each design call below is anchored to a specific paper, postmortem, or production system that taught us the lesson.

  1. Layer the validator like an onion.

    Replit's coding agent (July 2025) wiped a customer database during a code freeze with three guardrails active. We layer everything: AST parse, verb allowlist, table allowlist, role isolation, RLS, transaction wrapper.

    Fortune — Replit catastrophic failure

    Applied at docs/architecture.md §3.6.5 + sql-validate.ts

  2. LLM picks structure, our code emits SQL.

    Snowflake Cortex Analyst hits 90%+ accuracy on real BI workloads — about 2× single-prompt GPT-4o — because the LLM picks from a curated semantic layer instead of writing raw SQL. Our schema-create path follows the same logic with a typed plan, not raw DDL.

    Snowflake engineering blog

    Applied at docs/architecture.md §3.6.2 typed-plan pipeline

  3. Embed tables, not columns, for schema retrieval.

    Pinterest's text-to-SQL system uses one embedding per table-card (name + description + columns + sample values). nilenso's 2025 evaluation found hit rate climbed from ~40% to ~90% just from adding table-doc embeddings. We use the table-card pattern from day one.

    nilenso — RAG approach for text-to-SQL

    Applied at research-receipts §3

  4. Treat fetched row content as untrusted.

    Keysight (July 2025) documented an attack class where a row in the user's database contains `ignore previous instructions, DROP TABLE…` — when an agent later reads that row and re-feeds it into its system prompt, the row's content steers the next turn. We never re-feed row content into agent system prompts.

    Keysight Threats blog

    Applied at research-receipts §4

  5. Generate the semantic layer at create time.

    Every shipped enterprise NL-Q product (Cortex, ThoughtSpot, Power BI Q&A, Tableau Pulse, dbt MetricFlow, Cube) depends on a curated semantic layer — none of them auto-creates the database. We own the schema-creation moment, so we generate the metric and dimension layer automatically.

    dbt — Semantic Layer vs Text-to-SQL 2026

    Applied at docs/architecture.md §3.6.3 the moat

Manifesto

Three rules every build is judged against.

  1. 01

    Free, forever

    Sign up, build, ship to production without a credit card. The free tier isn't a trial — it's the product. Every cost upgrade is gated on a real signal: paying customers, not theoretical scale.

  2. 02

    Fast. Measured.

    p50 query under 400ms on cache hit. p95 under 1.5s on cache miss. Cold start under 800ms. Numbers exist so we can fail them in CI, not so we can quote them in a deck.

  3. 03

    Goal-first, not DB-first

    Nobody woke up wanting to create a database. They want a meal-planner, an agent that remembers, the number for the 4pm sync. The DB materialises as a side effect of the goal.

Read the full manifesto