useAgentStream
stableSSE stream subscription hook — returns { chunks, status, latency, start, reset }. Simulates token-by-token delivery with configurable TTFT, chunkInterval, and chunkSize.
import { useAgentStream } from "@nodus/design-system/patterns"Props
| Prop | Type | Default | Description |
|---|---|---|---|
content | string | — | Text to stream. Defaults to finance commentary. |
chunkInterval | number | — | Ms between chunk deliveries (default: 40). |
chunkSize | number | — | Characters per chunk (default: 3). |
ttft | number | — | Simulated time-to-first-token in ms (default: 320). |
contentstringDefault —Text to stream. Defaults to finance commentary.
chunkIntervalnumberDefault —Ms between chunk deliveries (default: 40).
chunkSizenumberDefault —Characters per chunk (default: 3).
ttftnumberDefault —Simulated time-to-first-token in ms (default: 320).
This component was designed to express:
Explore Related
Live FX position tick hook — returns { positions, lastUpdate, delta, running, pause, resume }. Configurable volatility and tick interval.
Agent status polling hook — returns { agents, lastPing, stale, ping }. Marks agents stale after configurable staleness window. Used in multi-agent orchestration views.
Streaming LLM output with temporal cursor. Displays content immediately — no fake simulation. StreamingDot disappears instantly on completion.
In-progress LLM reasoning indicator with temporal pulse, elapsed timer, and optional chain-of-thought trace