Skip to content

Agent Comment Thread

A comment thread with agents in it. Mention an agent to ask it something or hand it a job, and it answers in the thread with numbered sources, a streaming state that says what it is doing, and Stop.

On this page
Used for
  • Asking an agent in a thread
  • Handing work to an agent
  • Answers with sources
  • Review threads with AI

Examples

Installation

Installation is part of Pro

Pro components install from a licensed registry. The live preview stays open to everyone.

Props

agents
CommentAuthor[]
Agents in the thread: kind "agent", a role, and an icon such as modelIcon("claude").
onAsk
(agent, body, signal) => void
A reply mentioned this agent. Start it and add its reply to comments as it streams.
onStop
(commentId) => void
Stop pressed on a writing reply; the signal passed to onAsk is aborted too.
comments[].sources
{ n, title, href?, meta? }[]
The reply's sources; its text marks them [1], [2].
comments[].streaming, status
boolean, string
Still writing, and what it is doing: "Reading 2 sources".
...
CommentThreadProps
Everything the Comment thread takes.

Accessibility

  • An agent's reply is announced like any comment, with "Agent" after the name.
  • Each citation marker is a link named "Source 1: Trial funnel, week 3" with the source in a tooltip.
  • While it writes, the status is a polite live region; Stop is a button next to it.

What it handles

  1. 01Lists agents after people in the @ picker, and calls onAsk for each agent a reply mentions, with an AbortSignal.
  2. 02Draws an agent's reply with its mark, an Agent badge and numbered markers that light up their source chips.
  3. 03Shows a reply that is still writing with a caret, what the agent is doing and Stop, and holds reactions and edits until it is done.
  4. 04Leaves the agent to you: stream its text into the comments you pass, the thread only draws it.

States

First render
Comments sit in place; nothing plays
none
Agent starts
The reply slides in with the status chip
180ms ease out
Writing
The caret and the status dot pulse
CSS pulse
Hover a marker
Its source chip highlights
120ms ease out
Reduced motion
No pulse, the reply appears at once
0ms

Works with

When to use

When to use

  • A thread where people @mention an agent to ask a question or hand it a job, and its answer stays next to the discussion.
  • Review threads where an answer needs its sources shown and checked.

When not to use

Using with AI

Use Copy page for AI above to give your assistant this page, Copy prompt under the install command to have it installed and wired to your data, or connect the Knowns UI MCP server and just ask:

  • Add the Knowns UI Agent Comment Thread to my app and wire it to my own data.
  • I need a thread where people @mention an agent to ask a question or hand it a job, and its answer stays next to the discussion. Set that up with the Knowns UI Agent Comment Thread.
  • Which Agent Comment Thread props do I need for a minimal setup? Show me a short example.

With the server connected, your assistant calls get_component({ name: "agent-comment-thread" }) and search_docs({ query: "agent comment thread" }). Pro props, full examples and source come back once your license key is in the MCP config.

Need help?

Stuck on Agent Comment Thread, or found something off? We read every message.