PRDCT-502: add Semantic Layer documentation - #1103
Conversation
Re-cut of #999 on current main, with the parts the product outgrew corrected. - Tool visibility: the semantic MCP tools are gated on the project already having a semantic model, not on a support-enabled feature flag (the mcp-semantic-tooling flag was removed from keboola/mcp-server in 8ab508e2, two days after #999 opened). Section order follows: build a model first, then use it via MCP. - Adds the two paths that already exist and were missing: the Semantic Layer section in the Keboola UI, and the kbagent semantic-layer command group that main already documents in the CLI reference. - get_semantic_schema reports available schema versions rather than the schema document; the table says so and points at kbagent semantic-layer schema. - Notes that /sl-build and /sl-validate --deep need the kbagent binary on PATH. - Enablement callout describes availability by stack instead of "contact support to enable"; plan-level wording flagged VERIFY(Jordan). - Extends main's existing "Semantic layer" bullet on the MCP Server page instead of adding a second one for the same category. - Leaves ai/ai-kit/index.md to PR #1095, which already rewrites that page. - Drops the "don't document semantic layer" clause from the CLAUDE.md guardrails, which would otherwise contradict the shipped docs. Build clean (362 pages); audit-phase2 reports no issues on the touched pages. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
- "six semantic object types" contradicted this repo's own CLI reference, which documents a seventh (semantic-reference-data). Scope the six to what makes up a model and name the seventh separately. - The kbagent note overstated a hard prerequisite: sl-build and sl-validate --deep degrade without the binary rather than failing. - Restore "or push it yourself" to the powerbi-to-sl push sentence, per the plugin README. - Tighten the VERIFY(Jordan) note on the UI section to call out the "AI guidance" sentence, which no public source can confirm. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Cross-reference from #1106 (Kai chat controls). While documenting Kai's chat surface I investigated Kai's semantic-layer capability against The beta-flag premise looks out of date
I can't find a flag on that path. Two sources point the other way:
So the gate to describe is the one this PR already describes for the MCP tools — stack has Metastore, or nothing works — plus a second, UI-only gate. There's a case where a customer's project has a Kai-written semantic model they cannot see in the UI. That's worth a sentence wherever the enablement callout ends up. What Kai actually does, if the follow-up wants itFrom the bundled
Not adding it to #1106#1106 covers the chat surface (slash commands, attachments, plan mode, approvals). Per @davidesner this belongs with the semantic-layer docs rather than the Kai pages, so #1106 stays out of it — this comment is the handoff. One note for whoever lands it: point 9 of this PR drops the |
…ions Five gaps from the agentic-Kai rollout, verified against keboola/ui rather than the changelog. Slash commands: the `/` menu, and what `/plan`, `/compact`, and `/feedback` each do. `/feedback` copies debug details to the clipboard by default and only opens the support form when asked, so it is cross-referenced to the Report a bug button rather than described twice. Compaction: the transcript keeping every message after a compact is deliberate, not a bug — it stays a full record while Kai moves to working from a summary of it. Also that Kai compacts on its own, and that text after the command steers the summary. Documents the kai-agent behaviour only; the legacy backend's new-chat compaction is left out. Attachments: CSV/TSV/.gz become Storage tables in in.c-uploads-from-Kai, everything else is uploaded to File Storage and restored on return, so attachments do survive across a session. 10 MB per file, and non-permanent files are deleted after 15 days. Plan mode and questions get their own sections next to Action Approval, since both are approval flows the controls table could only gesture at: the three plan outcomes and how the toggle resolves, and that Kai asks with clickable options carrying a free-text Other. Semantic layer is deliberately not here — it belongs with #1103.
…he layer itself Per davidesner's cross-reference on the PR (sourced to the 2026-08-19 #kbc-news-feed announcement, verified verbatim): the semantic-layer project feature gates only the sidebar UI; Kai and the MCP tools work unconditionally wherever the metastore service is available. A project can therefore hold a Kai-built model before the Semantic Layer section appears — the callout now says so. Follow-up for documenting Kai's building itself: PRDCT-671. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
|
Thanks — confirmed, the beta-flag premise was wrong. I re-read the 2026-08-19 #kbc-news-feed message and your quote is verbatim: the Acted on it three ways:
🤖 Generated with Claude Code |
…he AI-guidance claim Jordan's 08-21 ask: refresh the page against the current UI with fresh screenshots. Three shots from the demo project (europe-west3 /projects/264, feature semantic-layer on, model 'Active Customer'), captured via Playwright per shoot.mjs conventions (1600x950, news popup suppressed, expanded sidebar): model list, model tabs, read-only metric with Edit. Live verification also settled the VERIFY(Jordan) on this section: the object view ships NO 'AI guidance' field (the sentence rested only on AI-3616), so it is cut; the Metadata tab (revision / schema version / branch) is documented instead. The VERIFY comment is replaced with the verification record. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…th ways Addresses davidesner's comment on PR #1103: the page listed the UI, the CLI, and the AI Kit plugins as the ways to build a model, but not Kai, which builds and maintains models from a chat in the project. Kai now leads the build section, and the Kai pages point back. /ai/semantic-layer/ - New "With Kai" build path, first of four: chat-based building with nothing to install, the explore-draft-validate-approve order, the approval card naming the model and per-type counts, conversational edit/remove/share, and the scope rules (project by default, org-wide needs an organization admin). Verified against keboola/ui packages/kai-agent-sandbox/skills/ semantic-layer-building/SKILL.md at main; sourcing recorded in a comment. Kai's four write tools themselves stay for PRDCT-671. - Intro: Kai and the CLI read the definitions too, not only assistants connected through the MCP Server. - "With the CLI": name search-context and get-context, the CLI's read surface. /kai/ - Semantic Layer capability in "What Kai Can Do", plus a Learn More link. - Semantic Layer section in Use Cases with build, add-metric, and share prompts. Kept the concepts, object types, and build paths on the one canonical page; the Kai pages describe the capability in a line or two and link out. Verified: npm run build clean (363 pages), scripts/audit-phase2.mjs unchanged (the 29 broken links are pre-existing and on other sections), every new link and the /kai/getting-started/#action-approval anchor resolves in dist/.
|
Acted on my own comment above rather than leaving all of it to the follow-up: The gap was that "Building a semantic model" listed the UI, the CLI, and the AI Kit plugins, but not Kai, which is the one path that needs nothing installed. The enablement callout mentioned a Kai-built model in passing, so the reader met the idea without ever being told they could ask for one. What the commit does
VerificationI did not take my own comment at face value. Everything above is verified against
The sourcing is recorded in a comment next to the section, in the same style as the other two verification comments on the page.
This closes PRDCT-671Correcting what I wrote a moment ago: I called the follow-up "narrowed", but checked against PRDCT-671 it is satisfied. Its deliverable is "how Kai builds and maintains semantic models" on this page, and of the six points its spec lists, five are now on the page in reader-facing form: the write path with approval gating and the card naming per-type counts, the no-beta-flag situation via the enablement callout, the reads hidden until a model exists, the six object types, and sharing with organization-admin-only widening. What is left over is tool-level plumbing that does not belong on a page whose reader is learning what a semantic model is: the four tool names, So PRDCT-671 should close when this PR merges, not carry forward. It is blocked by PRDCT-502, and until #1103 lands the content is only on the branch. One style note for whoever reviews: the new Semantic Layer bullet in |
Supersedes #999 (open since 2026-07-08, 75 commits behind main). That PR's content was accurate when it was written; the product moved underneath it. This is the same page, re-cut on current
mainwith the stale parts corrected — @jordanrburger, take it over or close whichever of the two you prefer.Docs are the last thing blocking the announcement of a rollout that has been live for a month, so this aims to unblock it rather than start over: the prose, structure, and examples are Jordan's.
What changed vs #999
1. Tool visibility — was wrong, and created a support loop.
#999 says the four semantic tools "automatically appear" once the semantic layer is "enabled for your project". The
mcp-semantic-toolingfeature flag was deleted fromkeboola/mcp-serverin commit8ab508e2(2026-07-10, merged via keboola/mcp-server#619) — two days after #999 opened — and replaced withproject_has_semantic_models(), a per-request metastore probe that fails closed (src/keboola_mcp_server/mcp.py:103-117, applied aton_list_tools:1023-1025 andon_call_tool:1117-1125). The tools appear only once the project already contains a semantic model. A reader following #999 would email support, be told it is already on, connect, and still see nothing.2. Section order follows from that. Building a model now comes before using it via MCP, because the model has to exist first. #999 had it the other way round.
3. The two paths that already exist are no longer missing. #999 presents the two AI Kit plugins as the only way to build a model:
kbagent semantic-layercommand group — already documented onmainin_data/cli/command-reference.mdand listed on/cli/commands/. Omitting it is an add-alongside of somethingmainalready documents.4.
get_semantic_schemadoesn't return a schema. #999 tells readers (and their agents) to fetch the JSON Schema with it. The tool calls the bareapi/v1/schema/{type}endpoint (tools/semantic/tools.py:723passes no version;clients/metastore.py:94-96only versions the path when given one), which returns a{"versions": [...]}listing.keboola/clidocuments this and calls it an upstream gap it deliberately does not mirror. The table entry now says what the tool actually returns and points atkbagent semantic-layer schemafor the schema document.5.
/sl-buildand/sl-validate --deepneed thekbagentbinary onPATH(sl-build.mdStep 0 detects it withcommand -v kbagent). #999's install snippet never mentions it, so those two commands fail for anyone who follows the page literally.6. Enablement callout. "Private beta — contact support to have it enabled" no longer matches how the feature is reached. The callout now describes availability by stack (multi-tenant yes, single-tenant no — the
metastoreservice is absent there) and tells the reader what to do if their project has no Semantic Layer section. FlaggedVERIFY(Jordan)in the source for the plan-level wording, since that rollout was still moving at the last project update.7. No duplicate bullet on the MCP Server page.
maingained- **Semantic layer** – Explore the project's semantic models…in the "Available Tools" list during the 75 commits #999 is behind. #999 appends a second bullet for the same category with different capitalisation — invisible in its diff. Here the existing bullet is extended with the cross-link instead.8.
ai/ai-kit/index.mdis deliberately untouched. #999 rewrites the same paragraph, the same install block, and adds the same two plugin sections that open PR #1095 (agent/kbagent-marketplace-repoint) already covers — a head-on collision. #1095 should own that page; this PR owns/ai/semantic-layer/.9.
CLAUDE.mdguardrail.mainstill tells every agent "don't document … semantic layer". Dropped that clause, otherwise merging semantic-layer docs leaves a contributor guide contradicting the shipped docs. Owner's call — it is a stakeholder guardrail, revert the one-liner if you want it kept.Also: the missing blank line before the following heading in
ai/index.md, and sentence-case H2s perCLAUDE.md:43(the rest of/ai/is still Title Case — say the word and I'll match the siblings instead).Fact-check pass
An independent verification pass against
keboola/mcp-server,keboola/ai-kit,keboola/cliand this repo's own synced CLI reference caught three things in my own draft, fixed in the second commit:semantic-reference-data(_data/cli/command-reference.md:2509-2551). The six-type table is now scoped to what makes up a model, with the seventh named separately.kbagentprerequisite was overstated.sl-build.md:69andsl-validate.md:93degrade rather than fail: without the binary,/sl-buildasks you to describe your tables and--deepchecks are skipped.powerbi-to-slpush — the README's "or the user directly" had been dropped; restored.Everything else checked out: the four tool names and their
readOnlyHint=Trueregistrations, the gating logic and its fail-closed behaviour, theX-Read-Only-Modeinteraction, the constraint severity enum, the six object-type descriptions against the JSON schemas, the CLI command list, both plugin descriptions, and the marketplace plugin names.The UI section is the one part no public source can confirm (
keboola/uiis private) — it is flaggedVERIFY(Jordan)in the source, with the "AI guidance" sentence called out specifically.Deliberately left out
Kai's semantic-layer building (AI-3661): four write tools (
apply_semantic_model,update_semantic_objects,delete_semantic_objects,share_semantic_objects), all approval-gated. This section originally claimed they sit "behind a beta flag" — @davidesner's comment below corrects that: there is no flag on Kai's path. Thesemantic-layerproject feature gates only the sidebar UI (verified against the 2026-08-19 #kbc-news-feed announcement), so Kai creates and uses models wherever the metastore service is available, and a project can hold a Kai-built model before the UI section appears. The enablement callout now says so (third commit). Documenting Kai's building itself is PRDCT-671 (blocked by this PR), with David's comment as the spec.Verification
npm run buildclean — 362 pages.node scripts/audit-phase2.mjs— no issues on the touched pages.dist/, including/ai/mcp-server/#restricting-tool-access.npm run gen:sidebar(not hand-edited).keboola/mcp-serveratmaintoday; CLI commands against the repo's own synced reference; plugins againstkeboola/ai-kit.🤖 Generated with Claude Code