dbook

Your AI agents are blind to your data. DDL tells them the structure, but not the meaning. dbook compiles the meaning so every agent writes correct SQL from day one.

Without dbook
💳 Billing
📈 Sales
📊 Analytics
🛠️ Support
  • Reads ALL DDL per query (wasteful tokens)
  • Guesses enum values — writes WHERE status = 'complete' (wrong!)
  • Guesses JOIN paths — no FK semantics = wrong self-joins
  • No PII awareness — queries email, SSN unknowingly
  • No schema change detection — column renamed = silent failures
  • Can't read silver layer — needs a gold layer built for it
↓ So you build...
🚨 Gold Layer Required
Manual ETL Pipeline
Goes stale. Expensive to maintain. Exists only because agents can't understand silver.
Silver Layer (20 tables)
Agents can't use this directly
With dbook
💳 Billing
📈 Sales
📊 Analytics
🛠️ Support
  • Token-efficient navigation — reads only relevant tables
  • Known enum values — writes WHERE status = 'completed' (correct!)
  • Semantic FK relationships — correct JOINs, first try
  • PII marked & redacted — agents respect sensitivity
  • Schema changes auto-detected — incremental recompile
  • Query validation (SQLGlot) — catches errors before execution
  • Auto metrics & lineage — ready-made aggregations
↓ No gold layer needed
📖 dbook
One Compile Command
Always current. Agents query silver directly, building "gold" views on-demand for each question.
Silver Layer (20 tables)
Agents use this directly via dbook

Five Problems dbook Eliminates

Real scenarios with before/after comparisons

🏗️
Eliminate Gold Layer Maintenance
Before Build and maintain 5 gold tables so dashboards and agents can read data. ETL breaks, aggregations go stale, engineers firefight.
After dbook compile → agents query silver directly, build "gold" on-demand for each question.
Saved No ETL pipeline for gold. No stale aggregations. No maintenance burden.
📦
Compile Once, All Agents Benefit
Before 10 agents each introspect the schema independently. 10x the cost, 10x the token usage, 10x the latency.
After One dbook compile → shared metadata → all 10 agents consume the same enriched context.
Saved Schema introspection cost reduced by 10x. ~50% token savings per query at scale.
🔄
Schema Changes Never Break Agents
Before Column renamed, table dropped, enum value added. Agents write wrong SQL. Errors in production. Nobody knows until a dashboard is empty.
After dbook check detects changes → dbook compile --incremental → agents always have current metadata.
Saved Zero silent failures from schema drift. Changes detected before they break anything.
🛡️
PII Safety by Default
Before Agent queries users.email, users.ssn unknowingly. Compliance violation. Data leaked in logs, responses, or downstream systems.
After dbook marks PII columns with sensitivity levels. Agents know what's sensitive before querying. Sample data redacted.
Saved Compliance risk eliminated at the metadata layer, not the application layer.
🎯
Correct SQL from Day One
Before Agent writes WHERE status = 'complete'. Wrong! The real value is 'completed'. Silent data quality issues — query returns 0 rows, nobody notices.
After dbook enumerates values → agent writes WHERE status = 'completed'. SQLGlot validator catches remaining errors before execution.
Saved Value-level correctness jumps from 21% to 94%. No more silent wrong results.