For teams building a data agent over their own warehouse.
Updated
A text-to-SQL agent picks the wrong table when the business meaning of your data lives in people's heads, not in the schema. The fix is a context layer: a Brain that records which table backs each entity, what your terms mean, how entities join, and which rules apply, and that the agent reads before it writes a query.
A schema tells an agent what exists, not what it means. Which of three order tables is the real one, what "active" means, which join is safe, and which rows to exclude are facts about your business. If they live only in a few heads, the agent guesses, and guesses differ run to run.
Connect the schema (and your docs) once and the Brain holds the answers as typed records. The agent asks for them over MCP. get_index returns the overview, then recall_domain takes a kind and a name. For a concept it returns the entity with its relationships, including cardinality and join keys; for a rule, the rule text and its conditions; for a metric, its grain entity, unit, kind and origin.
{ "kind": "concept", "name": "Order" }
{ "kind": "rule" }
{ "kind": "metric", "name": "Net revenue" }Entities, fields, keys and relationships come from the schema you connect. Definitions, terms and rules come from the docs you add, such as a data dictionary or runbooks. A person approves what ingestion proposes, and curated values survive re-ingest. Aliases record synonyms, including a column whose real name has a typo. Nothing here needs rows: by default only schema metadata is read.
The Brain does not execute SQL and does not guarantee a correct query. It gives the agent the definitions, join keys and rules to write one. Enforcement of business policy stays in your own harness; the Brain holds the rules content.
| Failure | What happens | What the Brain stores |
|---|---|---|
| Look-alike tables | orders, orders_v2 and orders_archive all seem right | An entity per business concept, with runtimeBinding recording where it lives |
| Your term is not a column name | "active customer" has no column called active | Vocabulary terms mapped to entities, and aliases |
| Wrong join path | It joins on a column that looks right but is not the key | Relationships with cardinality and join keys |
| Unwritten rules | It counts test accounts or refunded orders | Rules with their conditions |
| Unclear column meaning | It reads cents as dollars, or an enum code as a label | Field descriptions, annotations for units and encodings, optional column profiles |
| Metric drift | Revenue is computed differently on each run | A metric definition: grain entity, expression, default time field |