The problem
An AI agent connected straight to your warehouse sees tables and columns, not meaning. It doesn’t know thatrevenue lives in orders.amount but excludes refunds, that “active customer” has a specific definition your finance team agreed on, or that summing a daily balance across a week is nonsense. So it guesses. A confidently-wrong answer is the worst kind of wrong: a confident, well-formatted, incorrect number that looks right.
Schema access makes an agent fluent. It doesn’t make it correct.
Why you need a context layer
Real output, captured from a live run against the ecommerce example, not hand-written: ❌ Without canonic (the guess):What canonic does
canonic sits between your data and your agents as a context layer: an auto-built, auto-maintained, version-controlled description of what your data means and how to query it safely. Agents ask for a metric by name. canonic resolves it to the canonical definition, compiles correct read-only SQL, runs it, and returns the answer with the caveats that make it trustworthy: how fresh the data is, which guardrails applied, whether the number is final or provisional. When canonic isn’t sure, it refuses and asks instead of guessing. A confidently-wrong answer is the one outcome it’s built to never produce. Connect Claude, Cursor, or any MCP client and your agent resolves metrics through the same context layer, no separate integration to build. Every output in these docs is real, captured from a live run, not hand-written. See the end-to-end example for the full loop with actual commands and diffs.Why canonic, not something else
What makes it different in one line: canonic builds the context for you, keeps it honest, and refuses to lie when it isn’t sure.
canonic is not a BI tool and not a chat interface: it’s the layer that feeds the tools you already have (a BI dashboard, an agent, a notebook) correct, governed answers. If you want a place to explore data visually, or a standalone chatbot, canonic isn’t that. It’s the plumbing underneath one.
The three layers
canonic’s context lives in three committed surfaces: plain files in your git repo, reviewed like code. Each answers a different question.
The split rule:
- Changes how the SQL runs → semantics.
- A human needs it to trust the answer → knowledge.
- Governs which definition is authoritative or what an answer must satisfy → contracts.
What you can rely on
- Read-only. canonic never mutates your warehouse. It reads, it never writes back.
- Propose-only. It never silently edits your context: every change is a reviewable diff anchored to evidence.
- Refuse-and-ask. Ambiguous or unsafe? It returns a structured reason, not a guess.
- No LLM in the answer path. Queries compile deterministically: the same question always produces the same SQL. An LLM only helps draft context, never compute an answer.
- Local-first & air-gapped-capable. Run entirely on your machine with a local model and local embeddings. Nothing has to leave your network.
- Measurable. A local event log tracks accuracy, freshness, and answer quality, so “trustworthy” is something you can check, not just claim.
Installation
Install the canonic CLI via uv, pip, or Docker.
Quickstart
Get your first answer in minutes with a local SQLite or DuckDB file.