How do I trigger guided tours from the widget?

Guided tours let the CMD+K assistant launch in-product walkthroughs from a chat turn. When a user asks 'How do I invite my team?', the assistant can either explain it in text or click a button that highlights the real UI element and steps the user through. Tours are defined in the dashboard and exposed to the model as a special tool — no extra integration needed.

When should I use a tour?

  • Onboarding new users to a feature they've never used.
  • Walking a support ticket "how do I…?" question through the real UI.
  • Pointing out settings buried two clicks deep in your app.

Step shape

json
{
  "selector": "[data-testid='invite-button']",
  "url": "/settings/team",
  "title": "Invite your team",
  "body": "Click here and add your teammates by email."
}

Prefer stable selectors (data-testid, data-cmdk-tour) over class names — tours break when CSS-in-JS class hashes change between deploys.

Tour analytics

  1. Started — how often the assistant launched the tour.
  2. Completed — finished all steps.
  3. Skipped — exited early.
  4. Selector misses — element not found; tour skipped a step.

Next steps

FAQ

Do tours work across pages?
Yes. Each step can specify a URL; the widget navigates there before highlighting the selector.
What if a selector changes?
The widget falls back to skipping the step and surfaces a warning in the dashboard analytics so you can fix it.
Can end-users skip a tour?
Yes — every tour has a Skip button. Completion and skip rates are tracked per tour.