Skip to content

What it can do ​

Most of this guide is about one session in one terminal. This page names the eight things it does beyond that, each with the command that starts it.

CapabilityIn one lineNeeds
JIT harnessThe model writes, loads and calls a Python tool in one turnzettcode
Code reviewA second agent reads your uncommitted changeszettcode, a git checkout
Background agentsA session with nobody at the keyboardzettcode
Messaging and @Sessions message each other; @name picks onezettcode
GroupsA named set of sessions; one message reaches allzettcode
The Graph pageSessions as nodes, groups as regions, with replayzettcode gateway start
The web gatewayA page for daemons, sessions and groups, also on a phonezettcode gateway start
Codex and Claude CodeBoth run as members you can message and put in a groupzettcode[code-agents] and that CLI

Every row but the last is in plain zettcode; [all] adds /monitor, /recap, the vendor models and the last row. See Getting started.

JIT harness ​

The model writes the tools the task needs (one repository can hold several), loads them with repo_load, and calls them in the same turn. Use it when a task needs a tool of its own, such as listing every TODO with its author from git blame.

text
/harness gen find the TODO comments in this repository and group them by file
/harness reset

Details. The JIT harness.

Code review ​

/code-review asks a second agent to read your uncommitted changes, in a session of its own, and goes round again after each fix. Use it before you commit.

text
/code-review
/code-review the error handling in src/api.py

Under the deny shell level no reviewer starts; the model reads the files itself.

Details. Code review.

Background agents ​

A daemon is a session with nobody at the keyboard: it keeps running after you close the terminal, and you reach it by messages. Use it for a long job you do not want to sit through.

bash
zettcode daemon spawn --name builder --title "tool builder" --permission safe
zettcode daemon list
zettcode daemon prompt <session-id> "Run the tests and tell me what fails."
zettcode daemon stop <session-id>

spawn prints the session id. Nobody approves a daemon's commands, so pass --permission safe or deny.

Details. Background agents.

Messaging between sessions ​

Every session registers with a local broker, so one session can send another a message. Type @ to pick a session, and the model sends the request.

text
❯ @tool-builder write a helper that lists TODO comments, then tell me its name

The arrival is marked with who sent it. Sessions on one machine only.

Details. Talking between sessions.

Groups ​

A group is a named set of sessions, written #name; a message to it reaches every connected member. Use one when a planner, a reviewer and a tester must hear the same thing. Ask a session's model to create one (it uses manage_group), or press New group on the gateway's Chats page.

Details. Talking between sessions: group chats.

The Graph page ​

A page of the web gateway: sessions as nodes, groups as regions, each message a packet to its recipients. Use it when several agents talk and you want to know who is talking to whom. Replay redraws a past period and sends nothing again.

bash
zettcode gateway start

Open Graph.

Details. The graph on the web gateway page.

The web gateway ​

zettcode gateway serves a page for the daemons, sessions and groups on this machine, on 127.0.0.1:8765. Use it to start a daemon from a browser, or to follow the work from a phone.

bash
zettcode gateway start        # detach, print the address
zettcode gateway stop

With --token the page asks for it once and keeps a cookie; without one it listens on this machine only. It is plain HTTP: put it behind TLS if it leaves a network you trust.

Details. Web gateway, Desktop & phone apps.

Codex and Claude Code ​

The code-agents plugin runs Codex and Claude Code as agents you can address with @, each keeping one persistent command-line session. Use it to put another vendor's agent beside your own.

bash
pip install "zettcode[code-agents]"     # or zettcode[all]
zettcode gateway restart

Then open New, choose External agent, and press Start external agent. These agents run at full by default; set "permission" to workspace or read in ~/.zettcode/code-agents/config.json to narrow them.

Details. Codex & Claude Code.

Released under the MIT license.