What is ktx?
mainktx is an open-source, self-improving context layer designed for data agents. It transforms warehouse metadata, BI tool definitions, query history, documentation, and approved metric definitions into reviewable, version-controlled files (YAML and Markdown) that agents can search and execute.
Key capabilities include:
- Context as code: Semantic-layer definitions and wiki pages are managed as git-based files for review and merging.
- Self-improving ingest: Automatically reconciles new evidence from data stacks with accepted context.
- Executable semantics: Allows agents to use approved measures, joins, filters, dimensions, and segments instead of writing raw SQL.
- Agent-native access: Provides CLI and MCP (Model Context Protocol) tools for searching context, compiling semantic queries, and running read-only SQL.