Watch the reply arrive, and stop it.
Replies stream into the thread without reading out every token: the finished message is announced once. Stop keeps what was written and marks it as stopped.
- Thread

Solution · Agent chat
Stream replies people can stop, render their Markdown safely, autocomplete mentions and commands, and attach blueprints that are validated before the player paints them. The demo uses fixture replies, no live model.
Status: in development
Try this
Use Reset to return to the starting example.
Hi! 👋 I answer from fixtures, with no live model. Pick a scenario, or type `/` for a command, `@` to mention a teammate and `:` for an emoji.
Every construct has a direct spelling in this format.
If the interactive demo cannot load, use the static preview above.
Apply start, delta and end events to the message list. Plain text only; Stop ends the stream and keeps the partial text.
Package: @texuli/chat
Message text is read by the shared CommonMark parser and filtered to safe nodes: no HTML, links through the untrusted URL policy.
Package: @texuli/core
Check an attached blueprint against the agent catalog at the untrusted tier before anything paints.
Package: @texuli/catalog
Hand the validated value to the player; a refused one shows its reasons instead.
Package: @texuli/player
Write a reply in another chat dialect (Slack, Discord, Teams, WhatsApp) and see what had to be adapted.
Package: @texuli/core
Solution
Agent chat
Packages
@texuli/playerPaints a validated blueprint attachment.Subpaths: .@texuli/catalogValidates an attachment against the agent catalog before it paints.Subpaths: ./validate@texuli/chatThread, message list, composer, streaming events and the attachment card; on npm, with autocomplete, stopped replies and ChatAttachment released in 0.18.0.Subpaths: .@texuli/coreReads message Markdown into safe nodes and writes a reply in chat dialects (subpaths released in 0.18.0).Subpaths: ./markdown · ./markdown-dialectsBuilt on
@texuli/blocks (Content blocks)@texuli/charts (Charts)@texuli/data (Data views)@texuli/media (Media)@texuli/workflows (Workflow graphs)texuli (Styled components)@texuli/tokens (Theme tokens)@texuli/primitives (Headless primitives)@texuli/spec (Blueprint contract)Build with Agent chat
pnpm add @texuli/[email protected]<script lang="ts">
import { applyChatStreamEvent, type ChatMessage, ChatThread } from '@texuli/chat';
let messages = $state<ChatMessage[]>([]);
const agent = { id: 'agent', name: 'Example agent' };
function onSend(body: string) {
messages = [...messages, { id: crypto.randomUUID(), author: { id: 'me', name: 'Me' }, at: Date.now(), body }];
const id = crypto.randomUUID();
messages = applyChatStreamEvent(messages, { type: 'start', id, author: agent, at: Date.now() });
messages = applyChatStreamEvent(messages, { type: 'delta', id, text: 'Hello from **example.com**.' });
messages = applyChatStreamEvent(messages, { type: 'end', id });
}
</script>
<ChatThread {messages} currentUserId="me" {onSend} /><script lang="ts">
import { validateDraft } from '@texuli/catalog/validate';
import { ChatAttachment } from '@texuli/chat';
import { createPlayerCatalog, Player } from '@texuli/player';
let { blueprint }: { blueprint: unknown } = $props();
const catalog = createPlayerCatalog();
const check = (artifact: unknown) => {
const result = validateDraft(artifact, { catalog, tier: 'untrusted' });
return result.ok && result.draft
? { ok: true as const, value: result.draft }
: { ok: false as const, reasons: result.diagnostics.map((d) => d.message) };
};
</script>
<ChatAttachment artifact={blueprint} title="Report" {check}>
{#snippet preview(value)}<Player blueprint={value} label="Report" />{/snippet}
</ChatAttachment>Verified by tests/e2e/site-solution-agent-chat.spec.ts
Stream replies, add composer autocomplete and attach validated blueprints.
The package example with grouping, streaming and the reading position.
An agent writes plain text and blueprints. The host validates every blueprint against the catalog before it paints, and message text never becomes HTML. This demo replays fixtures; it calls no model.
@texuli/chat@texuli/chat: In developmentThread, message list, composer and streaming events; published on npm.
Composer autocomplete, stopped replies and ChatAttachmentComposer autocomplete, stopped replies and ChatAttachment: PlannedReleased in 0.18.0 (pre-1.0).
Svelte 5 packages published on npm (pre-1.0).
Kotlin Multiplatform renderer on the JVM, built in this repository.
Native renderer target.
Native renderer target.
A thread whose replies paint validated blueprints.

