Reach a running agent session from your other tools
channels
A coding-agent session runs in your terminal and acts when you prompt it. Channels lets the other programs on your machine reach that session directly: you connect channel servers, small local processes that push events into it, and a push wakes the session the moment it is idle. If the session is already working, the push waits for that to finish and then arrives together with anything else that came in while it was busy. Each server registers its own tools with the agent, so the agent can act on what arrived. The servers are subprocesses the session spawns from your config, and everything runs on your own machine.
$ pi install npm:channels.tools
what it is
Everything that happens outside your terminal — mail from another agent's session, a review round landing, a build finishing, a file changing — has to be pulled into the session by hand: the agent only sees it once you notice it and paste it in or re-prompt. Channels turns that around by running each source of events as a subprocess that pushes into the session instead, so the session subscribes through your config, the servers push, and the agent handles what arrives.
connect
You list the servers you want in a channels.json file, and the session connects to each one as it starts. See docs for what a server is and how to write your own.
wake
A server pushes an event, and the session starts a turn to handle it when it is idle, or buffers it and delivers it once the current turn settles.
act
Each server registers its own tools with the agent, so the guidance a server sends arrives with the tools the agent needs to read the event and answer it.
install
Channels is a pi extension that installs into pi from npm with the command below. Nothing connects until you create a channels.json — global at ~/.pi/agent/channels.json, or per-project at <project>/.pi/channels.json — and name a server in it.
$ pi install npm:channels.tools
get started