ktx — Context layer for data agents
A context layer that teaches agents to query your data warehouse accurately, with approved metrics and full business context.
- Source repo
- Kaelio/ktx
- Stars
- ★ 1.6k
- Last updated
- 1d ago v0.17.0
- FARS reviewed
- Nov 08, 2026 +1 new
- License
- Apache-2.0
- Primary language
- TypeScript
- FA score
- 64/100 · Some gaps
At a glance
- How it runs
- Works with
- Universal · cross-platformCodex · Claude Code
- Cost
- Free software; you pay for model usage
- Setup effort
- Medium · a few setup steps
- You'll need
- Typical use
- A data engineer wants Claude Code or Codex agents to query the warehouse using approved metrics instead of inventing new logic each time.
- Not a fit if
- Teams without a SQL warehouse or with only non-SQL data sources
- Teams unwilling to accept anonymous usage telemetry, even with opt-out
- Website
- docs.kaelio.com/ktx ↗ set on GitHub
- Maintenance
- Commits in the last 30 dayslast commit 2026-12-01latest release v0.17.0 (2026-12-01)+1.4 ★/day over 7 days
- Source review
- 64/100 · Some gaps
What does this agent do, and when should you use it?
ktx is an executable context layer built by Kaelio that gives AI agents like Claude Code and Codex the context they need to query your warehouse accurately. It automatically ingests knowledge from sources like dbt, Looker, Metabase, and Notion, builds a semantic layer, and serves agents via CLI and MCP tools. It supports multiple databases including PostgreSQL, Snowflake, BigQuery, and ClickHouse, and is read-only by design, never writing to your database. It offers commands like ktx setup, ktx ingest, and ktx mcp start for configuration, context ingestion, and starting the MCP server. The tool is Apache-2.0 licensed and self-hosted, with no hosted service. It is positioned as a superior alternative to traditional semantic layers by automatically building and maintaining context with minimal manual effort.
ktx ingests database schemas, metadata, and usage patterns, along with semantic layers from dbt, Looker, and MetricFlow, and combines them with business knowledge from wikis and Notion. It builds a local wiki and semantic-layer YAML through its context engine, detects joinable columns, and automatically resolves fan and chasm traps. It provides CLI commands like ktx sl "revenue" to search semantic sources, ktx wiki "refund policy" to search wiki pages, and ktx mcp start to start an MCP server for agent clients. Agents can use MCP to fetch approved metric definitions and joinable columns, which are compiled into read-only SQL executed against the warehouse. It also provides ktx status to check project readiness, including LLM and embedding provider configuration.
- A data engineer wants Claude Code or Codex agents to query the warehouse using approved metrics instead of inventing new logic each time.
- A team with business knowledge scattered across dbt, Looker, Metabase, and Notion wants to provide a unified context layer for AI agents.
- An analytics engineer needs a semantic layer that resolves fan and chasm traps automatically, reducing manual intervention.
- A data platform team wants to give agents read-only access to the warehouse without compromising security or managing a hosted service.
- A solo developer wants to leverage AI agents for data analysis using their own LLM API keys or local agent sessions, with no additional hosting costs.
Key setup facts
Pulled from the install and usage notes below. The project README has the current values.
- Install / run
npm install -g @kaelio/ktx
How do you install or deploy this agent?
Install globally via npm: npm install -g @kaelio/ktx. Development requires Node.js and Python (managed via uv). The project requires a SQL warehouse and an LLM provider (e.g., Anthropic API, Google Vertex AI, or local Claude Code/Codex authentication).
How do you use this agent?
Run ktx setup in your project directory, follow the prompts to configure providers, connections, and build context. Then run ktx status to verify readiness. If prompted, run ktx mcp start --project-dir ... to start the MCP server, then open your agent client. Agents can use MCP tools to query the semantic layer and wiki.
Safety boundaries, hardening & integrations
Operational blast radius, source-verified safety controls, and first-run hardening steps before connecting this agent to real workspaces.
Declared capability surface (blast radius)
Can run terminal commands; pair with approval gates or container/OS sandboxing.
Modifies local files; work on a clean Git branch or dedicated worktree.
What are this agent's strengths and limitations?
- Automatically builds and maintains a semantic layer without manual upkeep, resolving common issues like fan and chasm traps.
- Ingests and combines business knowledge from multiple sources (dbt, Looker, Metabase, Notion, Google Drive) for comprehensive context.
- Provides both CLI and MCP interfaces for agents like Claude Code, Codex, and Cursor, making integration straightforward.
- Read-only by design, ensuring no writes to the database, thus safe for production use.
- Requires an SQL warehouse; not useful for non-SQL data sources.
- Requires configuration of an LLM provider (Anthropic, Vertex AI, or local agent login), which may incur costs or dependencies.
- Needs a Node.js and Python environment, adding setup complexity.
- Self-hosted with no hosted service; users must manage their own infrastructure.
- As a relatively new project, it may lack mature community support or long-term stability.
How does this agent compare with similar options?
Unlike general-purpose agents that struggle with data tasks, ktx provides a context layer specifically for data agents. Compared to traditional semantic layers like dbt or MetricFlow, ktx ingests those layers and adds wiki content, providing a single searchable surface. The README explicitly mentions that ktx ingests dbt or MetricFlow semantic layers and combines them with raw-table introspection and wiki content, rather than replacing them.
Key facts side by side with the most closely related agents.
| Agent | Source review | Form / cost | Stars | Updated | Language | Full support on |
|---|---|---|---|---|---|---|
| ktx — Context layer for data agents This agent | 64 · Some gaps | CLIFree + model costs | ★ 1.6k | 1d ago | TypeScript | Codex · Claude Code |
| Dex Analytics Engineering Toolkit | 84 · Good | Agent plugin / skillFree | ★ 162 | today | Python | Codex · Claude Code |
| WrenAI GenBI | 54 · Major gaps | CLIFreemium | ★ 18k | 1d ago | Python | Codex · Claude Code |
| Cube Core | 60 · Some gaps | Self-hosted serviceFreemium | ★ 21k | today | Rust | — |
How does FollowAgents rate this agent?
Why each dimension lost points
The README claims database connections are read-only and says schema and query results are sent only to the configured LLM; it also describes telemetry fields, possible path information in error reports, and redaction scope. The skill documents file/env credential references and warns against committing secrets. Scores are limited because the telemetry claims are not verified in the shown implementation, setup includes global installation and context ingestion with external effects but no shown stepwise confirmation or recovery procedure, and the excerpt provides no dependency-audit evidence. Attribution includes a maintainer, support email, and private vulnerability reporting route, while publisher identity remains unknown as specified.
The README, workspace scripts, and CI configuration describe build, type-check, test, and coverage workflows; CLI examples show recognizable status output, and the Python CLI reports clear argument errors for missing sources/model or query input. The sample tests also exercise failure paths. Scores are limited because most product claims are not corroborated individually by these excerpts, availability depends on external LLMs, databases, and connector ecosystems, and this static review cannot verify runtime results.
The README defines target users, suitable analytics scenarios, cases where the product is not appropriate, and several database, BI, and LLM integrations. The analytics skill prescribes discovery, inspection, semantic-layer preference, read-only SQL, and result explanation. Scores are limited because the analytics trigger is broad and the skill excerpts and limited implementation samples do not fully establish capability boundaries or compatibility across environments.
The README provides quick start, upgrade, commands, project layout, FAQ, development workflow, and telemetry notes; the license file is Apache-2.0, and SECURITY.md specifies reporting channels and supported versions. Scores are limited because the supplied excerpts contain no changelog or clear release cadence, repository instructions are contributor guidance rather than a user operations manual, and installation still relies on external CLI documentation for detail. Kaelio, a support email, Slack, and GitHub Issues partly identify maintenance responsibility, but the prompt states publisher identity is not verified by the curated enterprise registry.
The product has a clear purpose: combine company knowledge, data catalog context, and a semantic layer into an analytics-agent query surface. The skill gives concrete discovery, planning, querying, and explanation steps, and the CLI includes JSON output for scripting. Scores are limited because value depends on an existing warehouse, maintained context, database access, and LLM configuration; the README does not quantify ingestion upkeep or query benefit.
The README makes specific claims about supported databases, read-only access, data transfer, and telemetry redaction; the skill and some CLI source and tests provide corroborating evidence for workflows, argument errors, and output formats. Scores are limited because core security and data-flow claims lack corresponding implementation evidence in the shown source, while badges and external documentation links do not establish results in this review. The assessment therefore distinguishes documented claims from code and configuration directly visible in the packet.
- Read-only database access, telemetry redaction, and data transfer scope are primarily documented in the README and skills; the excerpts do not include enough implementation to independently verify those claims.
- Setup and ingestion may involve global CLI installation, database connections, LLM calls, and telemetry; check credential references, database permissions, and organizational telemetry requirements before deployment.
Recent releases
Latest entries from the project's GitHub Releases. Notes are quoted from upstream as written, not rewritten or tested by FollowAgents.
-
Release notes excerpt
[0.17.0](https://github.com/Kaelio/ktx/compare/v0.16.0...v0.17.0) (2026-12-01) Features * select Vertex Claude models and profile BigQuery binary keys ([e883839](https://github.com/Kaelio/ktx/commit/e883839842379c2a13248137ce2cf06f48e8b55c)) Bug Fixes * ci: repair slow sl test and sync uv.lock to 0.16.0 ([#345](https://github.com/Kaelio/ktx/issues/345)) ([49a4ae6](https://github.com/Kaelio/ktx/commit/49a4ae6f5b28c904da921afc0ee72da6db7ac202)), closes [#334](https://github.com/Kaelio/ktx/issues/334)View on GitHub ↗ -
Release notes excerpt
[0.16.0](https://github.com/Kaelio/ktx/compare/v0.15.0...v0.16.0) (2026-07-03) Features * Add duckdb connector ([#308](https://github.com/Kaelio/ktx/issues/308)) ([3c4fcc2](https://github.com/Kaelio/ktx/commit/3c4fcc27c790624d45ebaff23e84722d22b3573f)) * athena: first-class AWS Athena warehouse identity (SL + BI mapping) ([#332](https://github.com/Kaelio/ktx/issues/332)) ([f310391](https://github.com/Kaelio/ktx/commit/f310391da53642a98defe19cef9584389ce03ff7)) …View on GitHub ↗ -
Release notes excerpt
[0.15.0](https://github.com/Kaelio/ktx/compare/v0.14.0...v0.15.0) (2026-06-30) Features * sigma: add Sigma Computing context-source adapter ([#316](https://github.com/Kaelio/ktx/issues/316)) ([acd20ac](https://github.com/Kaelio/ktx/commit/acd20ac24837e981eeb55762df35ddc4020af8ef)), closes [#168](https://github.com/Kaelio/ktx/issues/168) Other Changes * remove star history refresh workflow ([139ac08](https://github.com/Kaelio/ktx/commit/139ac0832004533cc3626e98f6272cef7c32dd7e))View on GitHub ↗
FAQ
Does ktx send my data to a hosted service?
Which LLM backends are supported?
How safe is my warehouse with ktx?
Does ktx need a running server?
ktx mcp start when an agent client needs it.Thanks — we use this to improve the page.
Subscribe to the FollowAgents RSS feed, or save this agent to your browser shortlist to compare on your next visit.