---
title: Introduction
description: What KTX is, how it works, and where to start.
---

import { ProductMechanics } from "@/components/product-mechanics";

<div className="not-prose mb-10">
  <div>
    <h1
      className="max-w-full text-3xl font-extrabold tracking-tight break-words sm:text-4xl lg:text-5xl"
      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',
        lineHeight: '1.1',
        letterSpacing: '0',
      }}
    >
      Make analytics context usable by agents
    </h1>
    <p className="mt-4 max-w-2xl text-lg text-fd-muted-foreground" style={{ lineHeight: '1.7' }}>
      {'KTX turns warehouse metadata, semantic definitions, BI usage, and team knowledge into local files and runtime tools that database agents can trust.'}
    </p>
  </div>
</div>

## Why KTX

- Schemas show columns, not business rules.
- Agents need trusted metrics, joins, filters, caveats, and provenance.
- KTX captures that context before agents write SQL, docs, or semantic edits.

## What KTX creates

| Path | What it gives agents |
|------|----------------------|
| `semantic-layer/` | Measures, dimensions, joins, grain, filters, segments |
| `wiki/` | Business definitions, caveats, policies, analyst notes |
| `raw-sources/` | Extracted metadata, scan output, relationship evidence |
| `.ktx/` | Local indexes, embeddings, setup state, runtime data |

<ProductMechanics />

## Use it for

- **Generate SQL** from approved measures, dimensions, joins, and filters
- **Explain provenance** with wiki context and warehouse evidence
- **Repair context** through reviewable YAML and Markdown diffs
- **Work alongside** dbt, LookML, MetricFlow, Looker, Metabase, and warehouses

Databases: SQLite, PostgreSQL, Snowflake, BigQuery, ClickHouse, MySQL, SQL
Server.

## Start here

<Cards>
  <Card title="Quickstart" href="/docs/getting-started/quickstart">
    Set up KTX and build your first context in under 10 minutes.
  </Card>
  <Card title="Guides" href="/docs/guides/building-context">
    Hands-on workflows for scanning, ingesting, writing, and serving.
  </Card>
  <Card title="Writing Context" href="/docs/guides/writing-context">
    Edit semantic-layer YAML and wiki Markdown safely.
  </Card>
  <Card title="CLI Reference" href="/docs/cli-reference/ktx">
    Complete flag and subcommand reference for every KTX command.
  </Card>
  <Card title="Agent Quickstart" href="/docs/ai-resources/agent-quickstart">
    Machine-readable docs and agent-facing setup notes.
  </Card>
</Cards>
