Blog
Notes on governed metrics
How we model, query and secure the numbers that dashboards and AI agents share. From the people building datahashi.
Warehouses & setupDuckDB sandbox: first metric in five minutes
Stand up a DuckDB sandbox, publish one certified metric, and query it from the console and MCP without a cloud warehouse.
Governance & trustEval harness: agent vs dashboard same-number tests
Create an eval harness that asserts agent answers match dashboard numbers for the same metric requests.
Governance & trustMCP auth: agents never hold warehouse passwords
Set up MCP auth so agents never hold warehouse passwords - credentials stay server-side behind the semantic layer.
Agents & MCPGrounding copilots on governed metrics
Ground copilots on certified metrics so natural-language answers inherit governance instead of table dumps.
Agents & MCPAgent wrong numbers: five failure modes
A composite war story — five failure modes that show up when agents get put on metrics before the rails are ready, and how a governed path changes the ending.
Agents & MCPDesigning MCP tools agents cannot misuse
MCP makes it easy to expose too much. datahashi treats MCP tool design as safety engineering — small verbs, strict schemas, fail-closed validation.
Agents & MCPConnect Cursor to governed metrics via MCP
Connect Cursor to governed metrics over MCP — catalog discovery and typed queries for coding agents, without raw warehouse access.
Agents & MCPMCP for warehouse data without raw table access
How agents can query governed metrics through MCP without seeing raw warehouse tables or writing SQL.
Governance & trustProve two consumers return the same number
Run a practical same-number test between two consumers (dashboard and agent) against one metric request.
Agents & MCPLimits, defaults, and agent-safe query shapes
Agents ask for everything by default. datahashi ships agent-safe limits so the first query an agent runs is already bounded, typed, and reviewable.
QueryingReading compiled SQL to debug wrong answers
When a semantic query returns a number that feels wrong, read the compiled SQL. datahashi exposes it from `run_semantic_query` so you can see exactly how names became joins and filters.
Querying