About Ktx
ktx is a context layer for data and analytics agents, built and maintained by Kaelio. General-purpose coding agents tend to re-explore a warehouse on every question and invent their own metric logic, which produces numbers that do not match approved definitions. ktx gives them a maintained body of context so answers rely on agreed definitions instead.
It works in several steps. It ingests wiki content, organizes it, removes duplicates and flags contradictions for human review. It samples tables, captures metadata and usage patterns, detects joinable columns and annotates sources. It then builds a semantic layer with a join graph that resolves fan and chasm traps, so agents can request metrics declaratively. Finally, it exposes CLI and MCP tools with combined full-text and semantic search.
The project is written in TypeScript under the Apache-2.0 licence. You run ktx with your own LLM API keys or a local agent sign-in such as Claude Code or Codex, and the README says ktx adds no extra usage billing. It suits data and analytics engineering teams that want AI agents to answer business questions from a warehouse without hand-maintaining a traditional semantic layer.
Key features
- Automatic mapping of warehouse tables and joins
- Semantic layer with approved metric definitions
- Ingestion and deduplication of company wiki content
- CLI and MCP tools for agents
- Combined full-text and semantic search
- Works with Claude Code and Codex
Good fit for
- →Letting AI agents answer metric questions from a warehouse
- →Replacing a hand-maintained semantic layer
- →Keeping agent answers aligned with approved definitions
- Built with
- TypeScript
- Tags
- data-agents
- semantic-layer
- mcp
- analytics
- claude-code
- context-layer
- text-to-sql
- typescript
- ai-agents
Ktx: questions and answers
- What is Ktx used for?
- Ktx is an open-source context layer that helps AI agents such as Claude Code and Codex query data warehouses accurately using learned metrics, joins and company knowledge. It is a good fit for letting AI agents answer metric questions from a warehouse, replacing a hand-maintained semantic layer and keeping agent answers aligned with approved definitions.
- Is Ktx open source?
- Yes. Ktx is open source under the Apache-2.0 licence. Its source code is on GitHub at Kaelio/ktx and is written mainly in TypeScript.
- Is Ktx free?
- Yes. Ktx is open source, so the software itself is free to use.
- Can I self-host Ktx?
- Yes. Ktx can be self-hosted on your own server or infrastructure.
- What are some alternatives to Ktx?
- Similar open-source tools in the AI Infrastructure category include Observal, OpenConnector and Inkeep Agents. SaaS products in the same category include AgentGov, Amazon Bedrock and AnyRouter.
- Is Ktx actively maintained?
- Yes. The most recent commit to Ktx was on 11 September 2026, and the latest release is v0.16.0, published on 3 July 2026. The project has 1.6k stars on GitHub.
Open-source alternatives to Ktx
See all
Observal
AI Infrastructure
Observal is self-hosted registry for your coding agent extensions with a built in insight
Apache-2.0★ 4k
OpenConnector
AI Infrastructure
Open-source auth gateway connecting 1500+ SaaS providers to AI agents through SDK, CLI, MC
Apache-2.0★ 5.9k
Inkeep Agents
AI Infrastructure
Create AI Agents in a No-Code Visual Builder or TypeScript SDK with full 2-way sync. For s
OSS★ 1.4k
AnythingMCP
AI Infrastructure
Open-source, self-hosted MCP gateway: turn any REST/OpenAPI, SOAP, GraphQL, OData or SQL A
AGPL-3.0★ 716
Rome
AI Infrastructure
A compounding agent OS for recursive agents. Also an open source alternative to Grok Bot a
MITvs Grok★ 673
Open Managed Agents
AI Infrastructure
Open Managed Agents — an open-source alternative to Claude Managed Agents and OpenAI Agent
Apache-2.0vs Claude★ 313
SaaS alternatives to Ktx
See all
AgentGov
AI Infrastructure
Open source platform for AI agent tracing and EU AI Act compliance with audit trails and risk documentation
SaaS
Amazon Bedrock
AI Infrastructure
Managed AWS service for building generative AI apps with models from several providers
SaaS
AnyRouter
AI Infrastructure
Unified LLM gateway that routes coding agents and MCP servers through a single endpoint
SaaS
api-hub.ai
AI Infrastructure
Single API for accessing many AI models behind one endpoint
SaaS
Apiframe
AI Infrastructure
One API for AI image, video and music generation across multiple model providers
SaaS
Azure AI Foundry
AI Infrastructure
Microsoft platform for building, evaluating and deploying AI apps and agents on Azure
SaaS

