ktx-data-agent-context-layer

Build a semantic context layer for AI agents querying data warehouses.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

It solves the problem of AI agents generating incorrect or inconsistent SQL for data warehouses by grounding answers in a shared semantic layer built from your real warehouse metadata, dbt models, and business definitions.

Core Features & Use Cases

  • Automatic semantic layer creation: Builds approved metrics, dimensions, and relationships from warehouse introspection and dbt artifacts.
  • Business context + wiki integration: Connects operational definitions (wiki, dbt docs, and other sources) to resolve meaning, contradictions, and terminology.
  • MCP tool access for agents: Exposes read-only MCP tools for semantic search and wiki retrieval so agents can select canonical logic before querying.
  • Read-only guardrail: Avoids writing back to your data warehouse to reduce risk during agent usage.

Quick Start

Run ktx setup in your analytics project directory, configure your warehouse connection and context sources, ingest to build the semantic layer, then start the MCP server with ktx mcp start.

Frequently Asked Questions about ktx-data-agent-context-layer

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

FAQPage Schema
How do I stop AI agents from generating incorrect SQL for my data warehouse?

To stop AI agents from generating incorrect SQL, build a semantic context layer that grounds agent queries in approved metric definitions and business logic derived from dbt artifacts and warehouse metadata.

What is a semantic layer for AI agents and how does it work with dbt?

A semantic layer for AI agents provides canonical metrics, dimensions, and relationships built by introspecting your data warehouse and ingesting dbt models, exposing them via read-only MCP tools for accurate SQL generation.

How do I connect wiki documentation to my data warehouse metrics for AI agents?

You can connect wiki documentation to data warehouse metrics for AI agents by configuring context ingestion from wiki sources, dbt docs, and warehouse metadata to resolve terminology and business definitions into a unified semantic layer.

Can I use MCP tools to search for metric definitions before generating SQL?

Yes, you can use MCP tools to search for metric definitions before generating SQL, as this Skill exposes read-only MCP tools for semantic search and wiki retrieval to help agents select canonical logic.

Does the semantic layer write back to the data warehouse during agent queries?

No, the semantic layer does not write back to the data warehouse during agent queries; it enforces a read-only guardrail to reduce risk and prevent modifications to your underlying data infrastructure.

How do I set up a dbt semantic layer for analytics agents in my project?

To set up a dbt semantic layer for analytics agents, run the project setup command in your analytics directory, configure warehouse and context sources, ingest metadata to build the layer, then start the MCP server.