ktx-ai-data-agents-context-layer

Build a semantic context layer for AI agent data warehouse queries.

7|2|Updated May 16, 2026
One-click install
npx skills add https://github.com/Aradotso/mcp-skills --skill ktx-ai-data-agents-context-layer
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: ktx-ai-data-agents-context-layer
Source: https://github.com/Aradotso/mcp-skills/tree/main/skills/ktx-ai-data-agents-context-layer
Command: npx skills add https://github.com/Aradotso/mcp-skills --skill ktx-ai-data-agents-context-layer

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Agents often guess at metric definitions and join logic, leading to incorrect SQL and misleading analytics.

Core Features & Use Cases

  • Semantic layer generation: Builds a metric-first semantic layer with approved definitions and automatic join resolution to prevent “invented math.”
  • Context ingestion from analytics sources: Ingests knowledge from dbt, LookML, Metabase, Notion, and related documentation so agents understand your business logic.
  • MCP-ready data tools: Exposes MCP tools that let agents search semantic metrics and wiki knowledge and then query your warehouse with the right context.

Use case: Your team asks an AI to answer “What is monthly revenue and how is it defined?”—ktx retrieves the canonical metric definition, related joins, and business context, so the resulting query matches your approved semantics instead of ad-hoc assumptions.

Quick Start

Run ktx setup in your analytics project directory to generate ktx.yaml, configure your LLM and embeddings, connect your warehouse, ingest dbt/context sources, and enable MCP integration.

Frequently Asked Questions about ktx-ai-data-agents-context-layer

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

FAQPage Schema
How do I stop AI agents from guessing metric definitions when querying my data warehouse?

You can use a semantic context layer to enforce canonical metric definitions and join logic. This ensures AI agents query the data warehouse using approved business logic instead of inventing math.

How do I connect dbt context to MCP tools so my AI agent understands warehouse semantics?

Connect dbt context to MCP tools by ingesting knowledge from dbt, LookML, Metabase, and Notion into a semantic layer. This exposes search and query MCP tools that provide agents with correct warehouse context.

Does this semantic layer approach work with PostgreSQL, Snowflake, and BigQuery?

Yes, this semantic layer approach works with PostgreSQL, Snowflake, BigQuery, ClickHouse, MySQL, SQL Server, and SQLite. It builds executable context allowing agents to query these data warehouses with correct metric definitions.

What is the best way to set up an MCP server for analytics governance and metric search?

Set up an MCP server for analytics governance by configuring a ktx.yaml file with your database and context sources, running ingestion, and starting the server to expose query and search tools to AI agents.

Why does my AI agent generate incorrect SQL for monthly revenue queries?

AI agents generate incorrect SQL for monthly revenue because they lack canonical metric definitions and join logic. Ingesting business context from sources like dbt into a semantic layer provides the correct definitions needed for accurate queries.