2026-05-11 00:45:43 -07:00
---
title: Introduction
2026-05-20 17:33:38 +02:00
description: ktx is an open-source, self-improving context layer for data agents.
2026-05-11 00:45:43 -07:00
---
2026-05-15 15:31:51 -04:00
import { ProductMechanics } from "@/components/product-mechanics";
<div className="not-prose mb-10">
<div>
2026-05-11 23:32:16 -07:00
<h1
2026-05-15 15:31:51 -04:00
className="max-w-full text-3xl font-extrabold tracking-tight break-words sm:text-4xl lg:text-5xl"
2026-05-11 23:32:16 -07:00
style={{
fontFamily: 'var(--font-display)',
background: 'linear-gradient(180deg, var(--color-fd-foreground) 0%, color-mix(in oklch, var(--color-fd-foreground) 75%, var(--color-fd-primary)) 100%)',
WebkitBackgroundClip: 'text',
backgroundClip: 'text',
color: 'transparent',
WebkitTextFillColor: 'transparent',
2026-05-21 01:30:45 +02:00
lineHeight: '1.2',
2026-05-11 23:32:16 -07:00
letterSpacing: '0',
2026-05-21 01:30:45 +02:00
paddingBottom: '0.15em',
2026-05-11 23:32:16 -07:00
}}
>
2026-05-15 15:31:51 -04:00
Make analytics context usable by agents
2026-05-11 23:32:16 -07:00
</h1>
2026-05-15 15:31:51 -04:00
<p className="mt-4 max-w-2xl text-lg text-fd-muted-foreground" style={{ lineHeight: '1.7' }}>
2026-05-20 17:33:38 +02:00
{'ktx is an open-source context layer for data agents. It turns warehouse metadata, BI tool definitions, query history, docs, and approved metric definitions into reviewable files agents can search and execute.'}
2026-05-11 23:32:16 -07:00
</p>
</div>
</div>
2026-05-11 00:45:43 -07:00
2026-05-20 17:33:38 +02:00
## Why ktx helps
2026-05-16 13:25:37 -04:00
2026-05-20 17:33:38 +02:00
**ktx** gives agents a shared context workspace before they write SQL, answer a
2026-05-18 17:41:37 +02:00
question, or update analytics definitions.
2026-05-15 15:31:51 -04:00
2026-05-20 17:33:38 +02:00
- **Context as code.** **ktx** writes wiki pages and semantic-layer definitions as
2026-05-18 17:41:37 +02:00
git-based files you can review, diff, and merge.
2026-05-20 17:33:38 +02:00
- **Self-improving ingest.** **ktx** reads warehouses, BI tools, modeling code,
2026-05-18 17:41:37 +02:00
query history, and notes, then reconciles new evidence with accepted context.
- **Executable semantics.** Agents can use approved measures, joins, filters,
dimensions, and segments instead of rebuilding canonical SQL from scratch.
- **Agent-native access.** CLI and MCP tools let agents search context, compile
semantic queries, run read-only SQL, and propose updates.
2026-05-11 00:45:43 -07:00
2026-05-20 17:33:38 +02:00
**ktx** complements existing semantic layers by pairing metric definitions with the
2026-05-18 17:41:37 +02:00
surrounding business knowledge, caveats, provenance, and review workflow agents
need for data work.
2026-05-20 17:33:38 +02:00
## How ktx works
2026-05-18 17:41:37 +02:00
2026-05-20 17:33:38 +02:00
**ktx** has two connected sides: it builds and maintains the context layer, then
2026-05-18 17:41:37 +02:00
serves that context to agents at runtime.
2026-05-20 17:33:38 +02:00
| Side | What **ktx** does |
2026-05-18 17:41:37 +02:00
|------|---------------|
| **Ingest and auto-maintain knowledge** | Reads your data stack and company knowledge, reconciles new evidence with accepted context, and keeps changes to `semantic-layer/` plus `wiki/` as version-controlled diffs automatically. |
| **Serve agents at runtime** | Helps agents find the right wiki pages and semantic-layer entities, then compile or execute semantic queries through CLI and MCP tools. |
2026-05-16 13:25:37 -04:00
<ProductMechanics />
2026-05-11 00:45:43 -07:00
2026-05-16 13:25:37 -04:00
## Use it for
2026-05-11 00:45:43 -07:00
2026-05-20 17:33:38 +02:00
Use **ktx** when agents need more than raw database access. Agents can search wiki
2026-05-18 17:41:37 +02:00
context, find semantic-layer entities, compile trusted semantic queries, run
read-only SQL, and use the same tools through MCP.
2026-05-11 00:45:43 -07:00
2026-05-18 17:41:37 +02:00
- Generate SQL from approved metrics, joins, filters, and dimensions.
2026-05-20 17:33:38 +02:00
- Explain metric provenance with wiki content and source evidence.
2026-05-18 17:41:37 +02:00
- Repair context through reviewable YAML and Markdown diffs.
- Work alongside dbt, MetricFlow, LookML, Looker, Metabase, Notion, and
supported databases.
2026-05-11 00:45:43 -07:00
2026-05-16 13:25:37 -04:00
## Start here
2026-05-11 00:45:43 -07:00
2026-05-18 17:41:37 +02:00
Choose the route that matches what you want to do next. The quickstart is the
best first step for users; contributor setup lives in the community docs.
2026-05-11 00:45:43 -07:00
<Cards>
<Card title="Quickstart" href="/docs/getting-started/quickstart">
2026-05-20 17:33:38 +02:00
Install **ktx**, run setup, build context, and connect an agent.
2026-05-18 17:41:37 +02:00
</Card>
<Card title="The Context Layer" href="/docs/concepts/the-context-layer">
Understand why agents need more than schema access and raw SQL.
2026-05-11 00:45:43 -07:00
</Card>
2026-05-18 17:41:37 +02:00
<Card title="Building Context" href="/docs/guides/building-context">
Refresh context from databases, BI tools, query history, and documents.
2026-05-11 00:45:43 -07:00
</Card>
2026-05-15 15:31:51 -04:00
<Card title="Writing Context" href="/docs/guides/writing-context">
Edit semantic-layer YAML and wiki Markdown safely.
</Card>
2026-05-18 09:49:43 -04:00
<Card title="CLI Reference" href="/docs/cli-reference/ktx">
2026-05-20 17:33:38 +02:00
Complete flag and subcommand reference for every **ktx** command.
2026-05-11 00:45:43 -07:00
</Card>
2026-05-18 09:49:43 -04:00
<Card title="Agent Quickstart" href="/docs/ai-resources/agent-quickstart">
2026-05-16 13:25:37 -04:00
Machine-readable docs and agent-facing setup notes.
</Card>
2026-05-11 00:45:43 -07:00
</Cards>
2026-05-19 18:07:29 -04:00
## Community
Have questions, want to share what you're building, or chat with maintainers?
2026-05-20 17:33:38 +02:00
Join the [**ktx** Slack community](https://join.slack.com/t/ktxcommunity/shared_invite/zt-3y9b44m1x-LVyNNJD5nwaZHq4XS29LMQ).
2026-05-19 18:07:29 -04:00
For bug reports and feature requests, open a
[GitHub issue](https://github.com/Kaelio/ktx/issues). See
[Community & Support](/docs/community/support) for the full guide on where to
ask what.