Comments: private threads and a natural home for AI
Comment threads can now be made private to certain users, allowing you to create internal-only notes, private review workflows, and feedback that only the right people can see. Plus, adding AI to comment threads is easier than ever.
Most companies are trying to figure out how people and AI can naturally work
together. Our opinion on
how humans and AI will work together
is that the best place to start is with patterns people already understand, such
as comments. They’re familiar, they’re anchored to real context, and they turn
out to be one of the most natural ways to bring AI into a product.
Check out what we’ve recently released, whether you already have Comments live
or have been meaning to add them.
Comment threads now have a visibility property. Each thread is public by
default, private when you need it, with permissions to control exactly who can
see and reply. That unlocks internal-only notes, private review workflows, and
feedback that only the right people can see.
To hide private threads from certain users, ensure they cannot see them with the
"comments:private:none" permission. For example, when creating a room, you can
create a group of users that has no access to see them. Below, admin users
will see all threads, whereas regular users will not be able to see private
threads
A comment thread is anchored to a specific place in your app. So when someone
leaves a comment that says “make this bigger,” there’s no ambiguity about what
“this” is—and any AI working in the thread has the full conversation as context.
Add an AI assistant as a user people can @ mention right in the composer, and
a comment becomes a way to put agents to work alongside your team.
You can then listen for
commentCreated webhook events,
check if the AI user was mentioned, and generate a response if they were.
if(event.type ==="commentCreated"){// Only reply if the AI user was @-mentionedconst mentions =getMentionsFromCommentBody(comment.body);if(!mentions.some((m)=> m.id ===AI_USER_INFO.id))return; // Get the threadconst thread =await liveblocks.getThread({ roomId, threadId }); // Generate a responseconst{ text }=awaitgenerateText({ model:anthropic("claude-opus-4-8"), system:`Respond to the user's comment: ${thread}.`,}); // Update the comment with the AI responseawait liveblocks.editComment({ roomId, threadId, commentId: aiComment.id, data:{ userId:AI_USER_INFO.id, body:markdownToCommentBody(text), metadata:{},},});}
We’ve expanded our get started guides with a range of new examples, so you can
drop in ready-made, contextual commenting and have it working in minutes, not
weeks.