Skip to the content.

Home · Quick start · Editor · charter.yaml · Sources · Agent · Guides · Evals · Audit · Policies · CLI · MCP · Workspace · Desktop · About · FAQ

DataCharter has an optional natural-language agent that turns a plain-language question into SQL against your sources. It is genuinely optional.

One word, four doors — “agent” on this page means the built-in chat panel (in any of the three modes below). Claude Code connects as that chat’s backend (Mode 3), while external MCP clients — Claude Desktop, Cursor, Cline — connect through the MCP server instead. Every door leads to the same governed tools; nothing reaches your data any other way.

The product is fully usable without any LLM

The engine, the source tree, the SQL editor with catalog autocomplete, the results grid, charts, the profiling panel, the EXPLAIN viewer, exports, and drag-and-drop file querying all work with no model configured and no network access. The agent adds a chat panel on top; nothing else depends on it.

There is no bundled or fine-tuned model. The agent is grounded: it inspects your schema through tools, scopes to your contract, and retries on SQL errors, which is the regime where existing models already do text-to-SQL well.

Mode 1: bring your own endpoint

Point the agent at any OpenAI-compatible /chat/completions endpoint (a hosted API, a self-hosted server such as vLLM, or a local runtime that speaks the same protocol). Set the endpoint and key in the environment, then serve:

export OPENAI_BASE_URL=https://api.example.com/v1   # any OpenAI-compatible API
export OPENAI_API_KEY=...
datacharter serve

Mode 2: fully local with --local

Run the agent against a local Ollama instance. No API key, no data leaves your machine:

datacharter serve --local              # uses qwen3:8b by default
datacharter serve --local --model ...  # choose another Ollama model

Easier still: the Connect an LLM dialog detects runtimes already running on your machine — Ollama, LM Studio, vLLM, llama.cpp — and lists their loaded models under Running on this machine. One click connects; local models need no API key.

Mode 3: your Claude Code subscription

If you have Claude Code installed and are signed in to a Claude Pro or Max plan, the agent can run on that subscription — no API key and no per-token billing. In the chat panel, click Connect Claude Code (shown next to Connect an LLM) and start asking questions.

Guides: tell the agent what you’d tell a colleague

Schema alone doesn’t say that revenue means net of refunds or that QA accounts must be excluded. Put that in guides/*.md (and per-table context:) and every agent — the built-in chat, Claude Code, and any MCP client — receives it before writing a query. See the end-to-end example workspace for a working guide.

And you don’t have to write guides from scratch: datacharter suggest mines your query history for the habits you repeat (“14 of 20 queries on sales filter refunded = false”) and turns them into one-click guide lines — also surfaced in the Guides editor in the browser.

How the agent works

The agent runs a short tool loop over a small set of read-only tools:

Tool What it does
list_sources List configured sources and their types.
list_tables List queryable tables with their relation names.
describe_table Show columns and types for one relation.
query Run a read-only SQL query and return rows.
list_metrics List certified metrics — name, what each computes, dimensions, time support.
query_metric Run a certified metric by name (optional by dimensions and time grain).

Certified metrics. Declare a metric once in charter.yaml under metrics: and the agent gets the definition of right, not a chance to reinvent it. When a question matches a metric, the agent calls query_metric instead of writing the aggregate SQL itself — so “revenue” means the same thing every time, and query_metric runs through the exact same governed query chokepoint (read-only guard, PII masking, row filters, policies, canary scan, audit).

See the quick-start guide to get a workspace running first, then turn the agent on with either mode above.

Next: Guides — teach agents your data’s quirks → · The MCP server →