Backed byY Combinator

The open-source
context layer for
data agents.

ktx auto-builds a context layer from your data stack and compiles accurate SQL. Your team reviews it. Agents query it. Interactions continuously improve it.

Your data stack
Snowflake
dbt
LookML
Looker
Notion
ktx
Context layer
business definitions
metric definitions
join graph
Query engine
resolves grain
safe joins
compiles SQL
Your agent
Claude CodeClaude Code
CodexCodex
CursorCursor
LangChainLangChain
Vercel AI SDKVercel AI SDK
CustomCustom

Trusted by data teams at scaling companies

Mercy
Gladia
Poppins
BeSimple
Alt
Handshake
Raft
Vapi
Junction
Maximus
Mercy
Gladia
Poppins
BeSimple
Alt
Handshake
Raft
Vapi
Junction
Maximus
Mercy
Gladia
Poppins
BeSimple
Alt
Handshake
Raft
Vapi
Junction
Maximus
Mercy
Gladia
Poppins
BeSimple
Alt
Handshake
Raft
Vapi
Junction
Maximus

Why data agents fail

Raw data accessis not enough.

ktx gives agents the business context, metric definitions, and approved logic they need to answer consistently.

Without ktx

agent receives question

agent guesses from table names

warehouse returns rows

Result

Wrong answer.

Burns tokens.

With ktx

agent receives question

agent uses approved context

warehouse returns rows

Result

Trusted answer.

Same logic every time.

Governed agent context

The missing context layerfor data agents.

ktx gives data agents business context and approved metric definitions,plus the relationships they need to answer accurately.

01

Business knowledge

Agents see definitions, caveats, policies, and team language before they answer.

definitionspoliciesexamplesowners
02

Agent query engine

Agents ask what to measure; ktx plans grain, joins, filters, and governed SQL.

askplancompileSQL
03

MCP-compatible agents

Expose the same approved context to Claude Code, Codex, Cursor, and custom MCP agents.

Claude
Codex
Cursor
Custom code

How ktx works

ktx reconciles your stack into context agents can query.

ktx turns source evidence into reviewable context files, then serves them to agents through CLI and MCP.

1

Build loop

Ingest and reconcile source evidence

ktx reads your warehouse, BI layer, modeling code, query history, and docs, then turns new evidence into proposed context updates.

2

Runtime loop

Serve agents at runtime

Agents use the CLI or MCP server to search the wiki, find approved semantic entities, compile queries, and run read-only SQL.

3

Review loop

Keep changes reviewable

Every durable update is a YAML or Markdown diff. Your team can inspect it, adjust it, and merge it through git.

Databases

Schemas, columns, relationships, and query history.

BI tools

Dashboards, explores, usage, and trusted examples.

Modeling code

dbt, LookML, MetricFlow, joins, and existing metrics.

Docs and notes

Policies, caveats, analyst notes, and team definitions.

ktx

Context builder

local + git
1source connectors
2context builder
3reconciliation
4validation

wiki/*.md

Business context

Readable definitions, caveats, policies, provenance, and source notes that agents can search before answering.

semantic-layer/*.yaml

Executable semantics

Measures, dimensions, joins, filters, and segments that ktx can validate and compile into SQL.

Agent runtime

Context stays active.

1

agent request

Agent asks ktx

The agent sends ktx the business question plus the metrics it needs.

2

context lookup

ktx searches and plans

ktx reads the wiki and metric definitions, resolves grain, joins, filters, and entities.

3

validated SQL

Warehouse returns rows

ktx compiles a read-only query, executes it, and sends rows to the agent.

Built for data teams

Bring ktx to thewhole company.

Scale ktx into a governed company-wide context layerwithout running the infrastructure yourself.

ktx (open source)

  • Open-source ktx engine
  • Wiki and semantic layer as files
  • MCP and CLI surface
  • Bring your own LLM keys
  • Apache 2.0 license
  • Run on your own infrastructure

ktx Cloud

Recommended for teams
  • Everything in ktx
  • Hosted ktx runtime, no self-install
  • Multi-user workspace
  • Review and approval workflows
  • SSO and SCIM
  • LLM credits included
  • SOC 2 and HIPAA compliance

Integrations

Integrates with your entire data stack

Connect your warehouse, semantic layer, BI, docs, and business tools, with 900+ more connectors rolling out soon.

SnowflakeSnowflake
BigQueryBigQuery
LookerLooker
Power BIPower BI
DatabricksDatabricks
RedshiftRedshift
PostgreSQLPostgreSQL
ClickHouseClickHouse
dbtdbt
SnowflakeSnowflake
BigQueryBigQuery
LookerLooker
Power BIPower BI
DatabricksDatabricks
RedshiftRedshift
PostgreSQLPostgreSQL
ClickHouseClickHouse
dbtdbt
SnowflakeSnowflake
BigQueryBigQuery
LookerLooker
Power BIPower BI
DatabricksDatabricks
RedshiftRedshift
PostgreSQLPostgreSQL
ClickHouseClickHouse
dbtdbt
SnowflakeSnowflake
BigQueryBigQuery
LookerLooker
Power BIPower BI
DatabricksDatabricks
RedshiftRedshift
PostgreSQLPostgreSQL
ClickHouseClickHouse
dbtdbt
FivetranFivetran
AirflowAirflow
TableauTableau
SigmaSigma
MetabaseMetabase
SegmentSegment
AmplitudeAmplitude
MixpanelMixpanel
PostHogPostHog
FivetranFivetran
AirflowAirflow
TableauTableau
SigmaSigma
MetabaseMetabase
SegmentSegment
AmplitudeAmplitude
MixpanelMixpanel
PostHogPostHog
FivetranFivetran
AirflowAirflow
TableauTableau
SigmaSigma
MetabaseMetabase
SegmentSegment
AmplitudeAmplitude
MixpanelMixpanel
PostHogPostHog
FivetranFivetran
AirflowAirflow
TableauTableau
SigmaSigma
MetabaseMetabase
SegmentSegment
AmplitudeAmplitude
MixpanelMixpanel
PostHogPostHog
SlackSlack
JiraJira
GitHubGitHub
NotionNotion
SalesforceSalesforce
HubSpotHubSpot
StripeStripe
ZendeskZendesk
IntercomIntercom
SlackSlack
JiraJira
GitHubGitHub
NotionNotion
SalesforceSalesforce
HubSpotHubSpot
StripeStripe
ZendeskZendesk
IntercomIntercom
SlackSlack
JiraJira
GitHubGitHub
NotionNotion
SalesforceSalesforce
HubSpotHubSpot
StripeStripe
ZendeskZendesk
IntercomIntercom
SlackSlack
JiraJira
GitHubGitHub
NotionNotion
SalesforceSalesforce
HubSpotHubSpot
StripeStripe
ZendeskZendesk
IntercomIntercom

FAQ

Common questions

ktx is an open-source context layer for data agents that makes them much more accurate at querying data warehouses. It gives agents the business context, approved metric definitions, joinable columns, warehouse metadata, and query history they do not get from direct warehouse access. It also includes a query engine, so agents can query through ktx instead of writing SQL from scratch.

Yes. ktx is open source under the Apache 2.0 license. There are no usage limits. You run it yourself with your own LLM API keys.

Run npm install -g @kaelio/ktx, then run ktx setup from your project directory. You can also ask Claude Code, Codex, Cursor, or another coding agent to install and configure ktx for you by giving it the prompt from the ktx quickstart. Setup creates a ktx project, connects your warehouse and context sources, builds context, and can install agent integrations. ktx requires Node.js 22 or newer.

A direct warehouse MCP connector usually gives an agent access to tables, columns, and SQL execution. ktx gives the agent a query engine plus reviewable metric definitions, a mapped join graph that resolves chasm and fan traps, a wiki of business context, and the source evidence behind every definition.

ktx gives agents approved context before they write or run SQL. Agents can search the wiki, find semantic-layer entities, compile governed metric queries, and run read-only SQL through configured connections. This reduces repeated schema exploration, incorrect joins, and invented metric logic.

ktx runs locally. Your warehouse data stays in your warehouse, and local state and secrets stay in the git-ignored .ktx directory. Your LLM provider sees whatever context or query content your agent sends to it, the same as any other agent connected to your data.

ktx stores shareable context in plain files: ktx.yaml, semantic-layer YAML, and Markdown wiki pages. Those files can be reviewed in git. Local runtime state, credentials, caches, and secrets live under .ktx and should stay out of git.

ktx includes its own semantic layer, but it is built to be flexible and agent-native: agents can search, read, patch, and validate context through files, CLI, and MCP. Compared with standalone semantic-layer tools, ktx adds business context, source evidence, warehouse metadata, query history, and a reviewable wiki around the semantic model.

No. ktx complements the tools you already use. It can ingest dbt, MetricFlow, LookML, Looker, Metabase, Notion, warehouse metadata, and query history, then expose that context to agents. Your existing transformations, dashboards, and BI workflows stay in place.

No. ktx consumes dbt instead of replacing it. If you use dbt, ktx can ingest your models, metric definitions, and documentation into its context layer so agents can use that governed logic directly. If you don't use dbt, ktx can still build context from your warehouse schemas, BI tools, documentation, and query history.

ktx is the open-source engine. You run it yourself, locally, with your own LLM keys. ktx Cloud is the hosted version. Same engine, plus hosted runtime, multi-user workspace, review and approval workflows, SSO, continuous ingest, observability, and included LLM credits.

ktx works with Claude Code, Claude Desktop, Codex, Cursor, OpenCode, generic .agents clients, and any custom MCP-compatible agent your team builds. ktx exposes an MCP server and a CLI, so any agent that speaks MCP can use it.

Warehouses: PostgreSQL, Snowflake, BigQuery, MySQL, SQL Server, SQLite, and many more. Modeling and BI: dbt, MetricFlow, LookML, Looker, Metabase, and many more. Documentation: Notion and many more.

Yes. ktx is built around reviewable context files. Agents can propose updates to semantic-layer YAML or wiki Markdown, but your team can inspect, validate, and approve those changes through normal code review before they become trusted context.

ktx is open source. Issues, pull requests, and discussions are welcome on the GitHub repository.

Get Started

Give your data and analytics agents the context layer they deserve.

Auto-built. Governed by your team. Ready for any agent.

SOC 2 Compliant
256-bit Encryption
HIPAA