Skip to content

useAgentStream

stable

SSE stream subscription hook — returns { chunks, status, latency, start, reset }. Simulates token-by-token delivery with configurable TTFT, chunkInterval, and chunkSize.

Orchestration/Storybook ↗
import { useAgentStream } from "@nodus/design-system/patterns"
Loading demo…

Props

content
Type stringDefault

Text to stream. Defaults to finance commentary.

chunkInterval
Type numberDefault

Ms between chunk deliveries (default: 40).

chunkSize
Type numberDefault

Characters per chunk (default: 3).

ttft
Type numberDefault

Simulated time-to-first-token in ms (default: 320).

Metadatasemantictype
Design Rationale

This component was designed to express:

Explore Related

Was this helpful?