Clara Insights
An analytics studio in Kibu Documentation: ask Clara, Kibu's AI assistant, about your data in plain English and get a table you can refine conversationally, chart, export, save or schedule. Every Insight is one table backed by one KQL query — DuckDB SQL over a read-only copy of Kibu data. I architected and built it end to end, and co-wrote the launch post.
- Year
- 2026
- Stack
- DuckDB · MotherDuck · Vercel Workflows · NL→SQL · AI
Insights is an analytics studio inside Kibu Documentation. You ask Clara, Kibu’s AI assistant, a question about your data in plain English, and you get back a table you can keep refining in conversation.
What it does
- Ask a question in plain English and get a table back.
- Refine the table conversationally, then view it as a chart or a summary.
- Export to CSV, save it, or put it on a schedule.
- Hit Explain to get a plain-English summary of any Insight.
- Start from a template gallery of ready-made reports — MAR, billing, documentation compliance, demographics and more.
Under the hood
Every Insight is one table backed by one query, written in KQL — Kibu Query Language. KQL is DuckDB SQL, running against a read-only copy of Kibu data that syncs every few minutes. Clara writes the KQL; technical users can inspect it and edit it.
| Layer | What it is |
|---|---|
| Question | Plain English, asked to Clara |
| Query | KQL — DuckDB SQL, written by Clara, editable |
| Data | A read-only copy of Kibu data, synced every few minutes |
| Output | A table — or a chart, a summary, a CSV, a saved or scheduled report |
KQL was inspired by Stripe Sigma, ShopifyQL, SOQL and PostHog’s HogQL.
Safe by default
- Strictly read-only.
- Permission-gated: Super Admins by default, with custom roles for everyone else.
- Every piece of technology behind it, AI models included, is covered by a BAA. Kibu is HIPAA and SOC 2 compliant.
Insights is available to all Documentation customers at no extra charge.
What I built
I architected and built Insights end to end, and co-wrote the launch post with Ben Wallace, published June 24, 2026.
- The platform. A multi-tenant analytics platform with a MotherDuck warehouse per organization, kept fresh by incremental syncs from PlanetScale driven by Vercel Workflows, against a 6-hour freshness SLA.
- The sync engine. A sync engine built on Vercel Workflows that synced up to 16 organizations in parallel. Database credentials were short-lived, injected from Infisical at runtime, and held in Vercel's function cache for 10 minutes.
- The query framework. The NL→SQL layer behind Clara, with a model-context safety gate, plus the self-service reporting UI and scheduled email delivery. Reports come back in 90 seconds or less, with five tool calls or fewer.
- The move to Vercel. Migrated Insights off a standalone GCP Python service onto Vercel Workflows and cron, and brought in Infisical for per-organization secrets, which became the app's path for KMS and secrets.
Read the launch post on the Kibu blog.