SQLRite in a browser tab

The full SQLRite engine compiled to WebAssembly. Everything runs in this tab — no server. State lives in memory; refreshing the page wipes it.

SQL console

Result

(run a query to see output)

Ask (natural-language → SQL)

The WASM SDK builds the LLM-API request body in this browser tab, but doesn't make the HTTP call itself. CORS + API-key exposure rule that out (see docs/ask.md for the full reasoning). Instead, the call goes through a backend proxy you control. The proxy is ~10 lines — see examples/wasm/server.mjs for a zero-dependency Node version that this demo expects on POST /api/llm/complete.

To use this section:
  1. Set ANTHROPIC_API_KEY in your shell.
  2. Run node server.mjs from examples/wasm/ (after make build). It serves this page on http://localhost:8080 and proxies /api/llm/complete to Anthropic with your key.
  3. Type a question below. The generated SQL drops into the SQL console above.
No proxy running? The Ask button will report a clean "couldn't reach proxy" error and the rest of the console keeps working.

Generated SQL

(submit a question to see generated SQL here)

Explanation

(model rationale shows here)