Skip to content
Back to skills

Understanding Iii

ASecurity

<!-- generated by iii-skill-render. DO NOT EDIT (changes here are overwritten on the next render). Edit docs/0-16-0/understanding-iii/channels.mdx. -->

  • 18,978 stars
  • 0 votes
  • 0 copies
  • 3 views
  • Added September 3, 2026
developmentpythonrustnode

Security analysis

A100/100

Pro scans all 7 files and shows the line behind each finding

Scanned September 3, 2026

npx -y skills add iii-hq/iii --skill understanding-iii --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Understanding Iii?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Understanding Iii
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/iii-hq-understanding-iii-319630e8/badge)](https://www.skillsdirectory.com/skills/iii-hq-understanding-iii-319630e8)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
<!-- generated by iii-skill-render. DO NOT EDIT (changes here are overwritten on the next render). Edit docs/0-16-0/understanding-iii/channels.mdx. -->

# Channels


## What channels are

Channels are stream pipes between iii workers. They let one function write bytes while another
function reads those bytes in real time, even when the functions run in different processes or
languages.

## The model

| Concept | What it does                                                    |
| ------- | --------------------------------------------------------------- |
| Channel | A WebSocket-backed pipe managed by the engine.                  |
| Writer  | Sends bytes or text messages into the pipe.                     |
| Reader  | Receives bytes or text messages from the pipe.                  |
| Ref     | A small serializable token passed through `trigger()` payloads. |

The key idea is that refs travel through regular function calls, but the data itself travels over
the channel.

## Why channels exist

Function invocations are JSON messages. That is perfect for structured events and command payloads,
but it is the wrong approach for large files, media, streaming responses (agents, chats), and
long-running partial output.

Channels split coordination from data transfer:

- A function call coordinates the work.
- A channel carries the stream.
- The engine tracks tracing and routing.

## Runtime flow

```mermaid
sequenceDiagram
    participant A as Producer function
    participant Engine
    participant B as Consumer function

    A->>Engine: createChannel()
    Engine-->>A: writer, reader, writerRef, readerRef
    A->>Engine: trigger B with readerRef
    Engine->>B: invoke B with reader ref
    A->>Engine: writer sends chunks
    Engine->>B: reader receives chunks
    A->>Engine: writer closes
    Engine->>B: reader ends
```

The producer creates a channel and passes `readerRef` to the consumer. Node and Python materialize
that ref into a live reader before the handler runs. Rust receives the ref as JSON and constructs a
`ChannelReader` from it. The producer writes chunks into its local writer, and the consumer reads
those chunks from its local reader.

## Backpressure and lifecycle

Channel streams connect lazily. Creating a channel allocates refs, but the WebSocket stream connects
when one side starts reading or writing. Backpressure is handled by the SDK stream implementation so
writers can pause when readers cannot keep up.

When the writer closes, the reader receives the stream end. When a worker disconnects, its channel
connections close with it.

For bidirectional communication, create two channels: one for each direction.

Files in this skill

  • channels.mdx2.6 KB
  • channels.mdx.skill.md2.6 KB
  • engine.mdx3 KB
  • engine.mdx.skill.md3 KB
  • index.mdx14.4 KB
  • index.mdx.skill.md14.3 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in development →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.