New in v2.0
A new suite of components for BrainStorm's AI agent experiences. The agent (codenamed BrainStorm AI) helps admins understand adoption data, create flows, and surface insights. These components must feel trusted, calm, and purposeful — never flashy.
| Zone / Moment | Component | Use when… |
|---|---|---|
| Empty chat state | buildStarterCards() | 2–4 prompt cards with icon + title + description; shown before first message |
| After agent response — follow-up chips | buildSuggestedPrompts() | Short ≤ 6-word chips inviting the next question |
| Before agent response — agent working | buildAgentActivity() | Collapsible thinking + tool-use trace shown while agent is running |
| Agent response body | buildAgentMsg() | Narrative text + optional embedded charts in the chat thread |
| AI artifact surfaced in chat thread | buildAgentActionCard() | Flow draft, report, or object created by agent — accept / edit / dismiss |
| Recommendations in a report zone (not in chat) | buildRecommendedActions() | 1–4 recommended actions with evidence + CTA, outside the chat thread |
| Follow-up action buttons below a response | buildChatFooter() | 1–3 action buttons anchored below the agent's last message |
12.2 — Agent Message Block Component
The Agent Message Block renders a full AI response: brand avatar, response body, optional follow-up action suggestions, and thumbs-up/down feedback row. Use buildAgentMsg() via .bsn-agent-msg-mount — never hardcode the avatar, bubble, or feedback row.
buildAgentMsg(cfg) via .bsn-agent-msg-mountbody (HTML string) · actions (array of label strings, renders as suggestion pills with arrow icons) · class (extra CSS)buildAgentActivity() above when the agent did non-trivial reasoning. Feedback row is always rendered. Max 3 action suggestions.
12.3 — BrainStorm AI Input States Component
The input bar transitions through five states. All states share the same Salt background bar and storm-input-shell component. The shell changes shape, the attach button changes weight, the send button appears/disappears, and chips update contextually. Use buildStorm() via .bsn-storm-mount — never hardcode.
State 1 — Empty (resting)
--border-default · Attach button: transparent/flat (resting class) · Send button: hidden · Placeholder: --text-muted · Suggestions: 2 generic chipsState 2 — Focused (contextual suggestions expand)
--border-focus · Ring: --focus-ring · Chips expand to full admin-contextual setState 3 — Typing (send button appears, suggestions update contextually)
--agent-bg fill, no resting class) · Send button appears (--color-alpine bg, --color-bsi-yellow icon) · Typed text: --text-primary · Suggestions narrow to match typed intentState 4 — Files attached (shell expands, border-radius reduces)
has-attachments added to shell → radius collapses from --radius-pill to --radius-card · Attachment tray renders above text row · File chips: --color-salt bg, --agent-border border, Alpine icon bg · Remove button: --color-alpine fill, hover --color-canyonlandsState 5 — Send hover (pointer cursor, send button hover)
--color-alpine at 85% opacity + transform:scale(1.05) via --transition-spring · Send button active: transform:scale(.95) · Cursor: pointer over send buttonLive — buildStorm() mount (interactive)
:focus-within). Type → send button appears, attach button loses .resting. Clear text → reverts.storm-input-shell max-width 42.5rem, border --border-default 1.5px, --radius-pill · Focus: --border-focus + --focus-ring · has-attachments modifier collapses radius to --radius-card · Attach button: resting = transparent/--text-muted, active = --agent-bg/--color-alpine · Send button: --color-alpine bg, --color-bsi-yellow icon, hidden until typing · Suggestion chips: --agent-bg background — never white or Salt · Pinned to bottom via flex-shrink:0 — NEVER position:fixed · Use buildStorm() via .bsn-storm-mount — never hardcode.
12.4 — Agent Activity Trace Component
A collapsible trace of agent thinking + tool-use steps, surfaced above or before an agent message in chat. Collapsed by default to keep the chat thread clean; click the header to expand and inspect the work. Use buildAgentActivity() via .bsn-agent-activity-mount — never hardcode the thinking bubble or tool-use blocks.
Thinking state — agent is still processing
Complete state — agent has finished its work
Click either trace above to expand it and see the full thinking + tool-use detail.
2px 0, gap 8px · Leading caret = fa-chevron-right at 9px in --text-disabled, rotates 90° on expand to point down · Status text = 12px --text-muted when collapsed, Alpine when expanded; italic + regular weight on state=thinking, medium otherwise · Duration = 11px tabular-nums in --text-disabled, preceded by a · separator · Body messages are quiet text rows — no bubble, no block, no border. Inside .bsn-agent-activity-body the .thinking-bubble renders as italic 12px --text-muted (no rgba bg, no border, no bouncing dots), and each .tool-use-block renders as a single line — 11px --text-disabled leading icon, 12px --text-muted label, trailing 10px Uinta "Done" tag or small spinner for running steps. Rows stack with 4px gap under the header's var(--space-4) left indent · Avatar = showAvatar: false by default; the trace usually sits next to an agent message that already shows the brand identity. Collapsed by default.
12.5 — Agent Action Cards Component
When the agent creates something (a flow draft, a report, a suggested audience) it surfaces it in an action card within the chat thread. Cards are actionable — the user can accept, edit, or dismiss. Sibling to §12.11 Recommended Action Cards (different anatomy, different job). Use buildAgentActionCard() via .bsn-agent-action-card-mount — never hardcode.
Flow draft generated by agent
Insight report generated by agent
--agent-border · --radius-card · --shadow-sm · header bg --agent-bg, uppercase letter-spacing 1px, --color-alpine text · body padding --space-4 --space-5 · footer border-top --border-default · Max 3 footer actions (primary/outline/ghost) · Render only inside the chat thread — for report-zone recommendation cards use buildRecommendedActions() (§12.11) · Use buildAgentActionCard() via .bsn-agent-action-card-mount — never hardcode.
12.6 — Suggested Prompts & Actions Component
Inline suggestion chips appear after agent responses and on the empty chat state. They scaffold the user into useful queries without requiring them to know what to ask.
Suggested follow-ups after a response:
<div class="bsn-suggested-prompts-mount" data-bsn-suggested-prompts='{"ariaLabel":"…","items":[{"label":"…","icon":"fa-plus","value":"…"}]}'></div>
items[] (required: label; optional: icon = FA name, value = emitted as data-value for click handlers), ariaLabel, class. Renders into the existing .agent-suggestions / .agent-suggestion CSS so the visual is identical to the hardcoded original. NEVER hardcode .agent-suggestions markup. Sibling component: buildStarterCards() for the empty-state starter cards beneath.
Empty state starter prompts:
12.7 — Agent Task List Component
When the agent performs a multi-step agentic workflow, it surfaces a task list so the user understands what's happening. Each step has a clear state. Use buildAgentTaskList() via .bsn-agent-task-list-mount — never hardcode.
buildAgentTaskList(cfg) via .bsn-agent-task-list-mountlabel (optional heading) · tasks[]: each task has label and status (done · running · pending)12.8 — Citations & Source References Component
When the agent cites data sources, it uses numbered superscript badges inline, with an expandable citations panel below the message. Use buildAgentCitations() via .bsn-agent-citations-mount — never hardcode.
buildAgentCitations(cfg) via .bsn-agent-citations-mounttext (HTML string with inline <span class="agent-citation"><span class="citation-badge">N</span></span> superscripts) · sources[]: each has source and excerptsources is non-empty. Badge numbers must correspond to inline citation order.
12.9 — Proactive Agent Nudges Component
The agent can surface proactive notifications outside of chat — e.g., in the dashboard or notification center — when it detects adoption risk or opportunities. Use buildAgentNudge() via .bsn-agent-nudge-mount — never hardcode.
buildAgentNudge(cfg) via .bsn-agent-nudge-mountvariant (warning · success · info · danger · default) · title · text · actions[] (label, variant)12.10 — Agent Handoff Notice Component
When the agent reaches the limits of what it can do autonomously and needs the admin to take action, it surfaces a clear handoff notice. Use buildAgentHandoff() via .bsn-agent-handoff-mount — never hardcode.
buildAgentHandoff(cfg) via .bsn-agent-handoff-mounttitle · text · icon (FA name, default arrow-right-arrow-left) · actions[] (label, variant)12.11 — Recommended Action Cards Component
When the agent recommends an action you could take based on what the data shows, it surfaces it in a Recommended Action Card in the report's recommendations zone. Cards are workflow handoffs — primary CTA commits the action; secondary link verifies the cohort first. Sibling to §12.5 Agent Action Cards (different anatomy, different job). Two layout variants share the same builder and data shape — switch via "layout": "grid" | "row". Use buildRecommendedActions() via .bsn-recommended-actions-mount — never hardcode.
Variant A — Grid layout default · dashboard feel
Variant B — Row layout compact · title + evidence only · ~52px per row
"layout": "grid" | "row". White surface · 1px --border-default · --radius-card · --shadow-sm. Grid (default): 3-up repeat(3, minmax(0, 1fr)), gap --space-4, card padding --space-5; collapses to 1-col below 1080px. Row: single-column flex list, gap --space-2 between rows, each row grid with padding var(--space-2) var(--space-4) and target height ~52px; the leading count in the evidence line is a clickable Wasatch .bsn-recommended-action-row-count; below 720px the CTA reflows beneath the text block. No hover state on the card/row itself — buttons inside are the affordances · Min 1, max 4 cards (recommend 3) · Use buildRecommendedActions() via .bsn-recommended-actions-mount — never hardcode.
12.13 — Chat Follow-Up Footer Component
The Chat Follow-Up Footer closes an AI-generated response with a "What would you like to do next?" prompt and 2–5 suggested action pills. Use buildChatFooter() via .bsn-chat-footer-mount — never hardcode.
buildChatFooter(cfg) via .bsn-chat-footer-mountlabel (default "What would you like to do next?") · actions (array of {label} objects, 2–5 max)12.12 — Agentic Token Reference
| Token | Value | Preview | Usage |
|---|---|---|---|
| --agent-bg | rgba(35,64,59,.06) | Agent message backgrounds, card headers | |
| --agent-border | rgba(35,64,59,.15) | Agent message borders, action card borders | |
| --thinking-bg | rgba(158,187,208,.18) | Thinking bubble background — Bonneville | |
| --thinking-border | rgba(90,135,195,.35) | Thinking bubble border — Wasatch | |
| --tool-use-bg | rgba(90,135,195,.08) | Tool use indicator background | |
| --tool-use-border | rgba(90,135,195,.25) | Tool use indicator border | |
| --chat-user-bg | var(--color-alpine) | User message bubble | |
| --chat-agent-bg | #ffffff | Agent message bubble |
Avatar Component
Agent or user avatar. agent renders the branded mark; user shows initials. Sizes sm/md.
<div class="bsn-avatar-mount" data-bsn-avatar='{…}'></div> — rendered via buildAvatar(). Auto-generated from ssot/components/avatar/.