convex-agents-streaming_skill

This skill enables real-time, non-blocking streaming of agent responses to UIs, improving responsiveness and multi-client collaboration.

19

GitHub Stars

1

Bundled Files

2 months ago

Catalog Refreshed

4 months ago

First Indexed

Readme & install

Copy the install command, review bundled files from the catalogue, and read any extended description pulled from the listing source.

Installation

Preview and clipboard use veilstrat where the catalogue uses aiagentskills.

npx veilstrat add skill sstobo/convex-skills --skill convex-agents-streaming

  • SKILL.md3.0 KB

Overview

This skill streams agent responses in real-time to clients without blocking, enabling responsive UIs and progressive content display. It supports asynchronous background generations, configurable delta chunking, and broadcasting a single generation to multiple clients. Use it to improve perceived performance and maintain persistence across reloads.

How this skill works

The skill continues an agent thread and emits text deltas as the model generates, optionally saving those deltas to a database. You can configure chunking (by word, line, regex, or custom function) and throttle saves to balance responsiveness and write volume. Clients subscribe to stream deltas and render updates live; stream status flags (e.g., message.status === "streaming") indicate active streams.

When to use it

  • Real-time chat interfaces with live typing updates
  • Generating long responses where progressive reveal improves UX
  • Broadcasting a single generation to multiple clients or devices
  • Background asynchronous generations that shouldn’t block other work
  • Smooth text animations or progressive content rendering in the UI

Best practices

  • Enable saveStreamDeltas to persist progress so reloads resume cleanly
  • Configure chunking and throttleMs to reduce DB writes while keeping UI responsive
  • Check message.status === "streaming" to trigger client-side animations or listeners
  • Use useSmoothText (or equivalent) on the client for visually smooth updates
  • Stream generation in background actions for long-running tasks to avoid blocking requests

Example use cases

  • Chat app showing token-by-token or line-by-line replies for better perceived speed
  • A collaborative session broadcasting a single agent answer to multiple participants
  • Long-form content generation where the user can read early sections while later sections finish
  • Background summary generation that updates the UI when each delta is available
  • Interactive demos with smooth text animations tied to streaming status

FAQ

Enable saveStreamDeltas when calling streamText so deltas are stored and can be synchronized later with syncStreams.

How do I avoid excessive database writes from many tiny deltas?

Configure chunking (e.g., "line" or a regex) and set throttleMs to batch deltas at a reasonable interval.

Built by
VeilStrat
AI signals for GTM teams
© 2026 VeilStrat. All rights reserved.All systems operational