Kaelio

Kaelio / ktx

Public

KTX is the context layer for analytics agents

19
0
89% credibility
Found May 19, 2026 at 28 stars -- GitGems finds repos before they trend. Get early access to the next one.
Sign Up Free
AI Analysis
TypeScript
AI Summary

KTX is an open-source context layer that helps AI coding assistants answer data questions accurately and consistently. Instead of letting AI make up its own metric definitions or re-explore your database on every question, KTX builds a knowledge base from your existing data tools (databases, dbt models, Notion docs, BI dashboards) and serves this context to AI assistants at query time. The result is that when you ask your AI assistant about revenue, churn, or any business metric, it uses your company's official definitions rather than inventing its own.

How It Works

1
💡 You have a data question

You need to know something about your company's revenue, customers, or metrics - but your AI assistant keeps giving you different answers each time.

2
🔌 You connect your data sources

You point KTX at your database, your dbt models, your Notion docs, and your BI tools - everything that holds your company's business knowledge.

3
🧠 KTX learns your business

KTX reads through everything, figures out which tables connect to which, learns your approved metric definitions, and organizes all your company knowledge.

4
📚 Your knowledge becomes searchable

KTX creates a searchable wiki and a semantic layer with your official definitions - things like 'revenue means net revenue after refunds' and 'ARR is contract-first'.

5
You connect your AI assistant
💻
Claude Code or similar

Install the KTX integration directly into your coding assistant's configuration

🖥️
Claude Desktop

Use KTX as a tool your assistant can call on whenever you ask data questions

Ask anything, get consistent answers

Now when you ask 'what was our ARR last quarter?' your AI assistant searches your wiki, finds your official definition, queries the right tables, and gives you the same answer everyone else gets.

Sign up to see the full architecture

4 more

Sign Up Free

Star Growth

See how this repo grew from 28 to 19 stars Sign Up Free
Repurpose This Repo

Repurpose is a Pro feature

Generate ready-to-use prompts for X threads, LinkedIn posts, blog posts, YouTube scripts, and more -- with full repo context baked in.

Unlock Repurpose
AI-Generated Review

What is ktx?

KTX is a context layer for analytics agents written in TypeScript with a Python runtime component. It teaches AI coding assistants like Claude Code or Codex how to accurately query your data warehouse by building and maintaining a semantic layer from your existing metric definitions, join logic, and business knowledge.

Instead of agents inventing their own SQL or misusing your tables, KTX ingests your dbt models, wiki content, and BI tool definitions, then serves that context through CLI and MCP tools. Agents can search approved metrics and execute validated queries rather than guessing at table relationships.

Why is it gaining traction?

The core pain point is real: general-purpose AI agents consistently get data questions wrong because they re-explore your warehouse on every query, invent metric logic, and return numbers that contradict your approved definitions. Traditional semantic layers solve this partly but demand constant manual upkeep.

KTX automates the upkeep cycle. It samples your warehouse schema, detects joinable columns, flags contradictions, and builds a join graph that resolves chasm and fan traps automatically. The workflow is straightforward: run `ktx setup`, point it at your database and dbt project, and your agents can query approved metrics through `ktx sl query` or `ktx wiki search`.

Who should use this?

Analytics engineers managing dbt projects who work with AI coding assistants. If you're using Claude Code, Codex, or Cursor for data work and getting frustrated when agents return wrong ARR numbers or write queries that don't match your definitions, KTX addresses that directly. It's also useful for data teams with established metric governance who want AI agents to respect those guardrails without constant supervision.

Verdict

With a credibility score of 0.9% and only 19 stars, this is an early-stage project that shows promise but carries real adoption risk. The documentation is solid, codecov is configured, and the demo data is comprehensive, so the team takes engineering seriously. But "context layer for analytics agents" is a narrow niche competing against simpler approaches, and the hybrid TypeScript-plus-Python architecture adds setup complexity. Worth watching, but not yet ready for production data teams without a proof-of-concept in your specific stack.

Sign up to read the full AI review Sign Up Free

Similar repos coming soon.