一键导入
iii-realtime-streams
Pushes live updates to connected WebSocket clients via streams. Use when building real-time dashboards, live feeds, or collaborative features.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Pushes live updates to connected WebSocket clients via streams. Use when building real-time dashboards, live feeds, or collaborative features.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
| name | iii-realtime-streams |
| description | Pushes live updates to connected WebSocket clients via streams. Use when building real-time dashboards, live feeds, or collaborative features. |
Comparable to: Socket.io, Pusher, Firebase Realtime
Use the concepts below when they fit the task. Not every stream setup needs all of them.
iii worker add iii-streamws://host:{stream_port}/stream/{stream_name}/{group_id}stream_name, group_id, and item_id; data is the item payloadstream, stream:join, and stream:leave let workers react to data changes and WebSocket subscriptionsFunction
→ trigger('stream::set', { stream_name, group_id, item_id, data })
→ trigger('stream::send', { stream_name, group_id, data })
→ iii-stream
→ WebSocket push
→ Connected clients at /stream/{stream_name}/{group_id}
| Primitive | Purpose |
|---|---|
trigger({ function_id: 'stream::set', payload }) | Create or update a stream item |
trigger({ function_id: 'stream::update', payload }) | Atomically update a stream item |
trigger({ function_id: 'stream::get', payload }) | Read a stream item |
trigger({ function_id: 'stream::list', payload }) | List items in a stream group |
trigger({ function_id: 'stream::list_groups', payload }) | List groups in a stream |
trigger({ function_id: 'stream::list_all', payload }) | List streams with group metadata |
trigger({ function_id: 'stream::delete', payload }) | Remove a stream item |
trigger({ function_id: 'stream::send', payload }) | Push an event to connected clients |
See ../references/realtime-streams.js for the full working example — a stream that pushes live updates to WebSocket clients and manages stream items with CRUD operations.
Also available in Python: ../references/realtime-streams.py
Also available in Rust: ../references/realtime-streams.rs
Code using this pattern commonly includes, when relevant:
registerWorker(url, { workerName }) — worker initializationtrigger({ function_id: 'stream::set', payload: { stream_name, group_id, item_id, data } }) — write stream itemtrigger({ function_id: 'stream::update', payload: { stream_name, group_id, item_id, ops } }) — atomic stream item updatetrigger({ function_id: 'stream::send', payload: { stream_name, group_id, data } }) — push event to clientstrigger({ function_id: 'stream::get', payload: { stream_name, group_id, item_id } }) — read stream itemtrigger({ function_id: 'stream::list', payload: { stream_name, group_id } }) — list items in groupregisterTrigger({ type: 'stream', config: { stream_name, group_id, item_id } }) — react to item changesregisterTrigger({ type: 'stream:join' }) / registerTrigger({ type: 'stream:leave' }) — react to client subscriptionsFor browser-side WebSocket connections, use iii-browser-sdk for browser workers or direct stream WebSocket URLs for stream clients. Keep browser access behind the intended public stream or RBAC listener, not the private engine worker port.
Use the adaptations below when they apply to the task.
chat-messages, dashboard-metrics, notifications)group_id to partition streams per user, room, or tenantiii-state-reactions to push a stream event whenever state changesauth_function in iii-stream config when browser clients need connection context.Install/enable iii-stream with iii worker add iii-stream. It must be configured with a port and adapter (kv for local/file persistence or Redis for multi-instance delivery). See ../references/iii-config.yaml for the full annotated config reference.
iii-state-management.iii-state-reactions.iii-realtime-streams when the primary need is pushing live updates to connected clients.iii-realtime-streams in the iii engine.KTG content marketing pipeline. Takes a written blog post and runs the full publishing workflow: repurpose for all platforms, generate hero image, SEO and AI citation optimisation, then pause for green-light before publishing to all channels via Composio. Local-first: uses Ollama for text tasks where quality allows, cloud for image gen and live data. Use when user says "hub", "/hub", "publish this", "run the pipeline", "post this everywhere".
KTG content marketing pipeline — SWARM MODE. Orchestrates 7 plugins via parallel agent dispatch. Drop a post, get it published everywhere with maximum parallelism. Local-first: Ollama for text, cloud for images and live data. Agents run simultaneously, not sequentially.
KTG content marketing pipeline — SWARM MODE v2. Concrete 11-agent parallel pipeline using the Agent tool. Local-first: Ollama for text, cloud for images and publish. Drop a post, spawn agents, publish everywhere.
Browser SDK for connecting to the iii engine from web applications via WebSocket. Use when building browser-based clients that register functions, invoke triggers, or consume streams from the frontend.
Binary streaming between workers via channels. Use when building data pipelines, file transfers, streaming responses, or any pattern requiring binary data transfer between functions.
Registers cron triggers with 7-field expressions to run functions on recurring schedules. Use when scheduling periodic jobs, timed automation, crontab replacements, cleanup routines, report generation, batch processing, or calendar-based work that is genuinely time-driven.