ktx

Installs and configures the ktx context layer for data agents via non-interactive CLI setup.

1.6k|101|Updated May 10, 2026
One-click install
npx skills add https://github.com/Kaelio/ktx --skill ktx
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: ktx
Source: https://github.com/Kaelio/ktx/tree/main/skills/ktx
Command: npx skills add https://github.com/Kaelio/ktx --skill ktx

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Setting up ktx, the open-source context layer for data agents, requires driving an interactive CLI that agents cannot operate, plus correctly wiring databases, LLM backends, embeddings, secrets, and agent integrations without silent failures.

Core Features & Use Cases

  • Non-interactive setup: Runs ktx setup --no-input with hidden CLI flags to configure LLM backends, embeddings, and database connections in one scripted flow.
  • Context source ingestion: Adds dbt, Metabase, Looker, LookML, MetricFlow, and Notion sources one at a time, then ingests them into wiki Markdown and semantic-layer YAML.
  • Agent integration and verification: Installs agent rules for Claude Code, Codex, Cursor, and others, starts the MCP server, and validates readiness via ktx status --json.
  • Use Case: A user asks their agent to connect a Postgres warehouse and a Metabase instance to ktx; the skill runs setup, ingests both connections, installs agent rules, and reports a ready verdict.

Quick Start

Use the ktx skill to install and configure ktx in this project, connect my Postgres database, and ingest its schema.

Frequently Asked Questions about ktx

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I install and configure ktx non-interactively?

Run ktx setup with --no-input --yes plus flags for LLM backend, embedding backend, database driver, connection id, URL, and schema. Bare ktx setup is interactive and cannot be driven by an agent, so the scripted flag-based flow is the canonical path.

How do I add dbt or Metabase as a ktx context source?

Run ktx setup once per source with --source dbt or --source metabase plus --skip-databases --skip-llm --skip-embeddings --skip-agents. Metabase requires --source-warehouse-connection-id and --metabase-database-id; dbt maps to the warehouse by table name and ignores the connection id flag.

Why does ktx setup exit 1 even when configuration succeeded?

In --no-input mode without --target or --skip-agents, the final agent-integration step has no input and fails the whole command even though database, LLM, and embedding steps succeeded. Pass --skip-agents or --target, and judge success from ktx status --json instead of the exit code.

Why does my ktx secret resolve to empty during ingest or mcp start?

env: secret refs are re-resolved against the process environment on every ktx run, so a variable exported only in the setup shell is missing later. Write the secret to a file under .ktx/secrets/ with chmod 600 and use a file: ref instead.

What databases and LLM backends does ktx setup support?

Supported drivers include Postgres, MySQL, ClickHouse, SQL Server, BigQuery, Snowflake, and SQLite, with schema scope required for all except SQLite. LLM backends include claude-code for local Claude Code sign-in and anthropic with an API key env var.