iii-stream
What it does
Stores real-time data in named streams and pushes changes to connected clients, so live features do not need polling. It is for developers maintaining existing iii systems, since this worker is deprecated and will be removed.
When to use it
- βWhen you are maintaining an existing iii system that already uses streams.
- βWhen you need a live feed that pushes updates to subscribers.
- βWhen you plan to move a streaming feature to a newer approach.
Skill link
https://github.com/iii-hq/iii/blob/main/engine/src/workers/stream/skills/SKILL.mdCopy it and paste it into your AI (Claude, ChatGPT or Cursor), asking it to follow the instructions.
How to use
The easiest way: copy the message and paste it into your AI. It reads the skill and follows the instructions.
Ready-to-paste message
For Claude Code, Codex or Cursor: run it in your project folder and the skill gets installed.
Download the SKILL.md and drop it into your agentβs skills folder.
Example of what to ask your AI
βShow me how an existing iii stream pushes updates to subscribed clients, so I can plan the migration.β
5 new skills a week. 1 minute to read.
How it works
The worker stores items in a three-level structure and sends each change to clients subscribed to that stream. An authorization check can run when a client joins. Its behavior is unchanged for now, and migration guidance is linked from its documentation.
Technical content (original SKILL.md)
Original text by the author, straight from GitHub.
iii-stream
Deprecated. iii-stream is deprecated (iii-stream) and will be removed in an upcoming release. Behavior is unchanged for now. Migration guide: https://iii.dev/docs/upgrading/migrate-from-streams
The iii-stream worker stores real-time data as a three-level hierarchy (stream_name -> group_id -> item_id) in the configured adapter and exposes two surfaces: a CRUD-shaped stream::* function namespace for reading and writing items, and reactive trigger types (stream, stream:join, stream:leave) that fire on data changes and on WebSocket subscriber connect/disconnect. Reactive backends are built by binding handlers to those triggers rather than by polling.
A write persists the new value, dispatches matching stream triggers on a spawned task (fire-and-forget, so the originating call returns before handlers finish), and broadcasts the change to every WebSocket client subscribed to that (stream_name, group_id). The stream:join trigger doubles as an authorization gate: returning { unauthorized: true } from its handler rejects the subscription before any data flows. Pair it with the worker's auth_function config, which runs once per WebSocket handshake and stamps a context value into every join/leave event.
Adapters: kv (default; in-memory or file-backed; single-instance only, no cross-process fan-out) or redis (required for multi-instance fleets that need real-time fan-out). Browser and client subscriptions use the Browser SDK (iii-browser-sdk), which subscribes to stream changes over a single engine WebSocket. Connecting directly to the stream port (ws://host:{port}/stream/{stream_name}/{group_id}) is deprecated in favor of the Browser SDK.
When to Use
- A stream change should kick off side effects elsewhere (derived projections, audit logs, notifications) without polling
stream::list. - You need to gate WebSocket subscriptions server-side instead of trusting client-side filtering.
- You want server-side reactions to subscriber connect/disconnect for presence counters, per-subscription rate buckets, or audit trails.
- An item needs atomic partial updates that concurrent writers would otherwise race on.
Boundaries
- Not a general key/value store β data is stream-shaped (
stream_name/group_id/item_id). Use the standalonestateworker for scope/key values. - The default
kvadapter does not fan out across processes; multi-instance fleets that need real-time broadcast must useredis. stream:leaveis not an authorization gate β the subscription is already gone by the time it fires, and its return value is ignored.- Trigger handlers run after the originating write returns; a handler failure neither rolls back the write nor surfaces to the caller.
Functions
stream::setβ persist an item and broadcast a create/update event; returns the previous value alongside the new one.stream::updateβ atomically apply orderedset/merge/increment/decrement/append/removeops to an existing item.stream::deleteβ remove an item and broadcast a delete event carrying the removed value.stream::sendβ broadcast a transient event to a group's subscribers without persisting it (typing indicators, cursor positions).stream::getβ read one item by its full(stream, group, item)triple.stream::listβ enumerate items in a group.stream::list_groupsβ enumerate groups in a stream.stream::list_allβ enumerate every stream's metadata.
Reactive triggers
Bind a stream-family trigger when a function should run automatically on stream activity β without polling stream::list. Three types cover two concerns: stream reacts to data changes, while stream:join / stream:leave react to WebSocket subscriber lifecycle.
Reach for them when:
- A
set/update/delete/sendshould drive a projection, audit log, or downstream notification. - Subscriptions need server-side authorization (
stream:join) or paired setup/teardown (stream:join+stream:leave).
If you only need the current value on demand, call stream::get instead of binding a trigger.
How to bind
- Register a handler:
iii.registerFunction('presence::on-change', handler). - Register the trigger:
iii.registerTrigger({
type: 'stream',
function_id: 'presence::on-change',
config: {
stream_name: 'presence', // required for `stream`; the worker indexes triggers by it.
group_id: 'room-1', // optional. Empty/omitte
FAQ
Is this worker still supported?
It is deprecated and will be removed in an upcoming release, though its behavior is unchanged for now.
Where is the migration guide?
The worker's documentation links to a migration guide on the iii site.
Can it run across several server processes?
Only with the Redis adapter, since the default storage does not share updates between processes.
Details
Original description by the author
Durable real-time streams with a CRUD function surface plus reactive triggers that fire on item changes and WebSocket subscriber lifecycle β reach for it to build live backends without polling. iii-stream is deprecated (iii-stream) and will be removed in an upcoming release. Behavior is unchanged for now. Migration guide: https://iii.dev/docs/upgrading/migrate-from-streams
repo: iii-hq/iii
Popularity
- GitHub stars
- 19k
- Ranking position
- #10489
- License
- β
- Updated
- 11/2/2026
Comments
- β¦
More skills from this repository
iii-sandbox
19kHelps your agent run untrusted or AI-generated code safely inside a temporary isolated virtual machine, then discard it when finished.
configuration
19kLets your agent set up a shared registry of named configuration values, checked against a schema, so workers can read and react to changes.
iii
19kTeaches your agent how iii workers work, so it can add a capability by first checking what already exists, then building a worker.
iii-observability
19kHelps your agent add tracing, structured logs, metrics and alerts to an iii engine, using OpenTelemetry so you can see what is happening.
Similar skills
api-connector-builder
280kHas your agent build new API connections following the existing pattern. Use when you need to add one more integration without creating a new way of doing things.
api-design
280kHelps your agent design REST APIs following best practices. It's useful for defining how APIs communicate, how errors are shown, and how to organize data.
backend-patterns
280kHelps your agent with server-side architecture patterns and database optimization. It's useful for building or reviewing code that runs on the server.