In AI chat, users interact with both the assistant and any tool UIs it renders. Most tool UIs treat this as incidental — a tool UI appears, the user clicks, done. That undersells what's happening. The assistant, the tool UI, and the user form a collaborative triad.
The assistant gives context and narration. The tool UI gives structure that prose cannot — sortable tables, controls, media. They work together.
Found 8 React auth libraries on GitHub. Here are the top results by recent activity:
| next-auth↗ | 19,420 | +342↑ | 86 | MIT |
| passport↗ | 847 | -12↓ | 124 | MIT |
| auth0-react↗ | 3,210 | +89↑ | 23 | MIT |
| firebase-auth↗ | 562 | +8↑ | 45 | Apache-2.0 |
| clerk-sdk↗ | 1,580 | +156↑ | 31 | MIT |
Which one would you recommend for a Next.js app?
I recommend next-auth. It's purpose-built for Next.js, has by far the most stars, and was updated most recently. Want me to show you setup instructions?
The assistant introduces the tool UI, the user scans it and asks a follow-up, the assistant answers by referencing specific rows. This is the triadic loop.
Every Tool UI has a job:
Information — Display data. Users read more than they click. Examples: Data Table, Chart, Link Preview.
Decision — For choices that matter (approve/reject, send/cancel). Show clear options and receipts that confirm what happened. Examples: Approval Card, Option List.
Control — Adjust parameters without commitment (filters, sort orders, date ranges). Changes are reversible. Examples: Parameter Slider, Preferences Panel.
State — Show internal activity (progress indicators, status logs, loading states). Examples: Progress Tracker, Terminal.
Some tool UIs combine roles. A data table with row actions is "information with control." When combining, pick one role to lead.
Tool UIs live in chat: narrow widths, variable heights, mixed with prose.
If the assistant can't point at something later, you lose half the value of rendering it.
id: Identifies this specific tool UI in the conversation ("the preview above", "that table").assetId / row IDs / option IDs: Identify real objects ("that link", "row 4", "the merge option").Use stable IDs from your backend — database IDs, canonical URLs — not array indexes or render-time UUIDs. Anything the user can act on should have an ID the assistant can cite.
When a user takes an action with consequences, the tool UI should transition to a receipt — a read-only confirmation of what happened. This gives the user proof and the assistant something to cite later.
See the Receipts page for patterns and copy guidance.