Docs
AI Agent

Ask AI Copilot

A global, slide-out AI assistant that helps operators answer questions about tickets and (soon) the product.

The Ask AI Copilot is a global, right-hand slide-out panel available from anywhere inside the product app. It gives operators a quick way to ask questions about the ticket they are viewing, draw on workspace knowledge, and get an AI-assisted answer without leaving the page.

Opening the copilot

  • Click the Ask AI button in the app sidebar.
  • Use the keyboard shortcut ⌘/ on macOS or Ctrl+/ on Windows/Linux.
  • Click the Ask AI button on any ticket detail page.

The shortcut works even while you are typing in a composer, because it toggles the panel open and closed.

Context modes

The copilot infers context from the current route:

  • Ticket mode — when you open the copilot on a /tickets/[id] page, it automatically asks about that ticket. The header shows the ticket subject, and the request is sent to /api/tickets/[id]/copilot.
  • General mode — on any other route, the copilot switches to Ticket0 context and posts to /api/copilot.

Use the Clear ticket context chip to switch the current ticket page to General mode. Navigating to a different ticket re-engages ticket mode automatically. Navigating to a non-ticket route switches to General mode.

General mode today

General product and documentation answers are a planned follow-up (TIC-39). For now, General mode returns a placeholder response with no AI call and no cost:

General product & docs answers are coming soon. For now, open a ticket and ask about it — I can help with that conversation.

Cost visibility

Every ticket-mode question is a real API call, so the copilot shows a running session cost meter in the header:

  • Total tokens used across the session
  • Estimated BYOK spend in USD for the session

General mode costs $0.00 because it does not call an AI model. The real token counts come from the AI service, not a client estimate, so the meter reflects the actual injected context (ticket history, knowledge base results, customer history) rather than a simple character count.

Resizing and persistence

The left edge of the panel is a drag handle. Drag it to resize the panel between the minimum and maximum widths. The current width is saved in localStorage and persists across reloads for that browser.

Enabling and disabling

The copilot is controlled by the Ask AI copilot toggle in Settings → AI features. It defaults to on. Turning it off:

  • Hides the Ask AI button in the sidebar
  • Disables the ⌘/ / Ctrl+/ shortcut
  • Makes both /api/copilot and /api/tickets/[id]/copilot return 403 FEATURE_DISABLED

The flag is stored in the existing aiFeatures JSON column, so no database migration is needed.

Pitfalls and boundaries

  • Thread lifetime — the chat thread persists while the panel stays open and you navigate between routes in the same tab. Closing the panel or reloading the page clears the thread and resets the cost meter.
  • Inbox preview — the inbox split-pane preview does not change the URL, so the copilot opens in General mode when triggered from the inbox. Open the full ticket page for ticket-mode context.
  • General mode is limited — it only returns the placeholder response until TIC-39 adds documentation knowledge.
  • History mixes contexts — within a single session, prior turns from one ticket or General mode are sent with the next question. Ticket mode always grounds the answer on the current ticket's server-fetched context, so this is safe.

On this page