Loading...
Loading...
Inspect and tune Cube's in-product AI agent — its rules, certified queries and Agent Skills — by authoring markdown in the semantic model with the Cube CLI. Use whenever someone wants the Cube agent to answer better: teach it a business definition, stop it making a recurring mistake, certify a trusted query, capture a repeatable workflow as a skill, or find out why it answered the way it did. Triggers on "the agent keeps getting X wrong", "teach the agent that", "make the agent always", "add a certified query", "create an agent skill", "why did the agent say that", "what rules does the agent have". To change the underlying model use cube-build-model; to explore what is queryable use cube-explore-model.
npx skill4agent add cube-js/cube-agent-skills cube-configure-agentcube-build-modelcommand -v cube >/dev/null || echo "Cube CLI not installed: curl -fsSL https://raw.githubusercontent.com/cube-js/cube/master/install-cli.sh | sh"
cube whoami || echo "Not authenticated. Interactive: cube login. Headless: set CUBE_API_URL + CUBE_API_KEY."
cube context listcube agents list <deployment>
cube agents skills <deployment>
cube agents skills <deployment> --space <space> --branch <branch>cube agents skillsagents/agents/
rules/ always-on instructions
certified_queries/ trusted, named queries
skills/ named multi-step workflows, run from the / menucube data-modelcube data-model get <deployment> agents/rules/revenue-definitions.md
cube data-model dev-mode <deployment> main
cube data-model put <deployment> agents/skills/weekly-revenue-report.md --file ./skill.md --branch <dev-branch>
cube data-model commit <deployment> -m "Add weekly revenue report skill" --branch <dev-branch>weekly-revenue-report.mdweekly-revenue-report| Use | When |
|---|---|
| Rule | A fact or constraint that should apply to every answer. "Revenue excludes refunds." "Never show data before 2024." Always in context, so keep them few and short. |
| Certified query | A specific question with one correct query. Pins the answer so the agent stops re-deriving it. |
| Skill | A repeatable multi-step workflow a person would otherwise re-type. "Weekly revenue report" — pull, break down, compare, summarize. |
cube-build-modeltitledescriptiondescriptioncube-run-query| Symptom | Cause |
|---|---|
| Skill does not appear | Not on the branch the chat is using, or the branch has not been built |
| Write rejected | Not on a dev-mode branch — see |
| No skills authored, or the wrong |