iii-channels

Originally fromiii-hq/skills
Installation
SKILL.md

Channels

Comparable to: Unix pipes, gRPC streaming, WebSocket data streams

Key Concepts

Use the concepts below when they fit the task. Not every worker needs channels.

  • A Channel is a WebSocket-backed binary stream between two endpoints (writer and reader)
  • createChannel() returns a writer/reader pair plus serializable refs that can be passed to other workers
  • StreamChannelRef is a serializable reference (channel_id, access_key, direction) that can be included in function payloads
  • Writers send binary data (chunked into 64KB frames) and text messages
  • Readers consume binary chunks via readAll() or receive text messages via callbacks
  • Consumers must construct a reader from a serializable StreamChannelRef (e.g., ChannelReader::new(...)) rather than using the producer-side reader object returned by createChannel()
  • Channels work cross-worker and cross-language — a Python writer can stream to a Rust reader

Architecture

A function creates a channel via createChannel(), receiving a writer and reader pair. The writer ref or reader ref is passed to another function (potentially in a different worker/language) via a trigger payload. The engine brokers the WebSocket connection between the two endpoints. Binary data flows directly between workers through the engine's channel endpoint.

Related skills
Installs
36
Repository
iii-hq/iii
GitHub Stars
15.6K
First Seen
Apr 6, 2026