# AI Message Bubble

An assistant reply with a formula, a comparison table and a copyable SQL query in a chat.

- id: `ai-message-bubble`
- Page: https://agentic-ui-kit.com/components/ai-message-bubble
- Live preview: https://agentic-ui-kit.com/live/component/ai-message-bubble

## Install

```bash
agentic-ui add ai-message-bubble
npx shadcn@4.17.0 add @agentic-ui/ai-message-bubble
```

## Metadata

- **Level:** block
- **Category:** block
- **Installable in:** Radix UI (registry variant new-york)
- **Capabilities:** markdown-rendering, fenced-code-blocks, code-block-copy, message-copy, aligned-tables, latex-inline-and-display, latex-source-copy, malformed-tex-fallback, currency-safe-dollar-parsing, role-alignment, author-avatar-and-timestamp, sending-and-streaming-states, empty-state, error-recovery
- **Intents:** communicate, explore-detail
- **Suits domains:** ai-workspace, knowledge, devtools, saas, analytics
- **Interaction:** copy-code-block, copy-message, copy-latex-source, retry-after-error, keyboard-navigation
- **Screen role:** communication
- **Density:** medium
- **Dark mode:** yes
- **Use it for:** an assistant reply with a formula, a comparison table and a copyable SQL query in a chat, a data copilot message that explains a metric with LaTeX and returns the snippet to reproduce it, a technical support thread where the agent attaches shell commands with a copy button, a system notice in a conversation when the model or configuration changes
- **Avoid when:** replies that are still arriving token by token and need flicker-free reconciliation: use ai-stream-renderer inside the thread, long editable or collaborative documents, where an editor rather than a chat bubble is appropriate
- **Preserve when adapting:** role-based-alignment, per-block-copy-with-live-announcement, display-math-segmentation-before-markdown, focusable-scroll-containers
- **Replace when adapting:** message-copy, author-identity, bubble-tints, katex-macros
- **Adaptation effort:** low
- **Coupling:** low
- **Quality score:** 9.05/10
- **Quality breakdown:** visual 9/10, responsive 9/10, accessibility 9/10, code 8/10
- **Uses primitives:** avatar, badge, button, table
- **npm dependencies:** katex
- **Motion:** profile subtle, library css, reduced-motion fallback yes
- **npm dependencies (registry):** katex@^0.16.22
- **Registry dependencies:** ai-stream-renderer, lib-primitives
