> ## Documentation Index
> Fetch the complete documentation index at: https://docs.holace.io/llms.txt
> Use this file to discover all available pages before exploring further.

# AI Chat

> The per-Journey AI chat widget — what's shipped, where to find it, and what the (still-stubbed) standalone AI Assistant page will become.

HoLaCe's AI chat is shipped as a **floating widget** that lives on every page in the dashboard and is *journey-aware*: open it on a Journey detail page and it answers questions about that specific case. The standalone **AI Assistant** page in the sidebar is a placeholder today — the journey-scoped widget is the live surface.

<Warning>
  The standalone **AI Assistant** page (Sidebar → AI Assistant, route `/dashboard/ai-chat`) is currently a **Coming Soon** placeholder. The live page renders a single card with the message *"Soon you'll be able to chat with an AI assistant that understands your cases and can help answer questions about your matters,"* plus a tip pointing users to the floating widget. Cross-case / firm-wide chat is coming; today, use the widget.
</Warning>

## Where the widget lives

The floating chat button sits in the **bottom-right** corner of the dashboard, next to the bug-report button. It's available on every page, but its behavior changes based on context:

* **On a Journey detail page** (any URL matching `/dashboard/avenue/journeys/[id]` or `/dashboard/journeys/[id]`), the widget auto-detects the Journey ID from the URL and scopes the chat to that case. The header reads **Case Chat** and the subtitle reads **Journey-specific assistance**.
* **Anywhere else in the dashboard**, the widget opens in **COO Intelligence** mode — firm-wide context, no specific case attached. (See the [COO Engine](/admin-cross-cutting/ai-features/coo-engine) for what this mode is built for.)

\[Screenshot: The floating chat button collapsed in the bottom-right corner of a Journey detail page]

## Opening and using the widget

<Steps>
  <Step title="Click the floating bot button">
    The chat window pops up above the button — `400px × 600px` on desktop, full-screen on mobile.
  </Step>

  <Step title="Confirm the journey context">
    On a Journey page, a **context badge** in the header shows the Journey number, client name, and current stage. If the chat is grabbing the wrong context (or you want to clear it), use the dropdown menu in the header to switch to firm-wide mode.
  </Step>

  <Step title="Pick a prompt chip or type your question">
    The first time you open the widget on a Journey, a row of one-click **prompt chips** appears: *Draft Demand Letter*, *Draft Lien Reduction Letter*, *Create Interrogatories*, *Draft a Subpoena*, *Create a Motion*, *Draft a Mediation Letter*, *Draft a Pleading*, *Letter of Representation*, and *Find Case Law* (the last one is currently disabled). Click one to kick off a generation flow, or just type a question.
  </Step>

  <Step title="Read the streamed reply">
    Replies stream in token-by-token. When the model is "thinking," the header subtitle changes to *Thinking…* and a stop button appears next to the close button — tap it to interrupt a long generation.
  </Step>
</Steps>

\[Screenshot: Open Case Chat window with the journey context badge, a row of prompt chips below the input, and the bot's first reply rendering]

## What the widget can do today

When pinned to a Journey, the widget has read access to that case's data — client, stage, contacts, medical records, damages, demand info, activity feed, and attached documents — and can:

* Summarize the case ("Brief me on this case before my 2pm")
* Surface specific numbers ("What's the total medical bills so far?")
* Answer document questions ("What does the chronology say about lost wages?")
* Draft case documents from the prompt chips (demand letters, motions, subpoenas, etc.)

In COO mode (no Journey selected), the widget answers cross-case questions: *"Which open cases haven't had activity in 30 days?"*, *"List my litigation cases where the demand response is overdue."*

## Conversation history

The chat header has a **History** button (clock icon) that opens a conversation list sheet from the left side. Past conversations are persisted, and clicking one resumes it in the current widget — context badge and all. The dropdown menu also offers **Clear History** to wipe the current conversation without deleting it from history.

## What it can't do

* **Edit data** — the chat is read-only for case data. It will draft a demand letter but won't mark a task complete or change a stage.
* **Reach external systems** — no Westlaw, no court dockets, no carrier portals. HoLaCe data only.
* **See other firms' data** — strictly organization-scoped.

## What the standalone AI Assistant page will become

When `/dashboard/ai-chat` ships, it's intended to be the **firm-wide** chat surface — the same conversation experience the widget gives you, but full-page, persistent, and not pinned to whatever Journey URL you're on. Until then, the COO mode of the floating widget is the closest live equivalent.

\[Screenshot: Today's `/dashboard/ai-chat` page rendering the Coming Soon card with the bot icon and the "available as a floating widget" tip]

## Where to go next

<CardGroup cols={2}>
  <Card title="COO Engine" icon="brain" href="/admin-cross-cutting/ai-features/coo-engine">
    Firm-wide AI capabilities — what runs in the background and how COO mode plugs into it.
  </Card>

  <Card title="Notes / Activity" icon="sticky-note" href="/case-management/journey-tabs/notes-activity">
    Where AI-assisted document drafts and chat-triggered actions land in the audit trail.
  </Card>
</CardGroup>
