Beyond the Semantic Layer: Building a Context Layer for the Agentic Era
Summary
Späti argues that pointing an AI agent like Claude or Codex at a data warehouse produces mediocre results because the agent lacks knowledge of joins, metric definitions, and business rules that give numbers meaning. He proposes a 'context layer' as an evolution beyond the semantic layer—one that captures both 'hard semantics' (warehouse schema, joins, and metric definitions as YAML and SQL) and 'soft semantics' (business knowledge living in docs, wikis, and Notion). Both are committed to git and reviewed like code, keeping humans in the loop while giving agents a 'warm start' instead of a cold database connection. The bulk of the post introduces ktx, a new open-source context layer from Kaelio, walking through its CLI commands for discovering metrics, validating SQL, searching the wiki, and serving governed context to agents via MCP. The payoff Späti emphasizes is accuracy plus literal cost savings, since a well-contextualized agent makes fewer and cheaper warehouse queries. The piece is openly a sponsored product explainer written as part of his consulting services.
Key Insight
Reliable analytics from AI agents depends less on the model and more on a governed, git-reviewed context layer that unifies hard warehouse semantics with soft business knowledge, giving agents a warm start that is both more accurate and cheaper.
Spicy Quotes (click to share)
- 4
Writing SQL was never the hard part. Making it accurate and trustworthy against your warehouse always was.
- 2
Both are committed to git and reviewed like code, so a human stays in the loop while agents get a warm start instead of a cold database connection.
- 2
Any AI assistant is only as good as the context we give it, and how easily it can read and express context, metrics, models, and knowledge.
- 2
Every bit of human-written data can help the agent make better decisions.
- 3
An agent only knows what the context makes explicit.
- 2
More governance means the agent knows the system in more detail and therefore needs to make fewer queries to the actual database.
- 3
More context doesn't always help, but if it's well maintained and fetched from the actual source or pulling in actual domain knowledge from Notion pages, it's priceless.
- 3
The challenge of natural language for semantic layers being too imprecise is real.
Tone
technical, opinionated, promotional
