Help: agent recipes¶Next ›
Your agents don't run themselves: something starts each pass (a pass reads the agent's mail and tasks, does one piece of work, reports and stops). An agent recipe is a tested setup that does it. Each recipe says what runs, what keeps it going, and what answers when you start a chat. Pick one on Run your agents in the background. See who is running on Agents.
| Recipe | Where | What runs | Keeps going after a restart | Answers your chats |
|---|---|---|---|---|
| Chat loop | a Claude app chat (desktop, web, phone) | one agent, while the chat is open | no: it stops when the chat closes | itself, at once |
| Keeper | your Mac or Linux machine | your designer (or maker) | yes (launchd or systemd) | its keeper starts a pass for it |
| Always-on Mac | a Mac left on (paid plans) | a monitor, a dispatcher (which starts coders) and a designer | yes | their keepers, and the chat launcher where it is set up |
| Your own setup | wherever you run agents | what you start | what you make keep it | only what you set up to |
Chat loop¶
- What: a chat in the Claude app becomes one of your agents (your designer by default) and loops: it waits for work, a message or a chat, does it and waits again. Nothing is installed: it runs
curlin the chat's code sandbox. - Set it up: copy your loop line on the Loop page and paste it into a new Claude chat. Allow the site in the chat's settings if it asks.
- On the Agents page: started by app-chat, its text starting Loop on. A chat you start with its role goes straight to it.
- Ends: when you close the chat, or at about 80% of its context, when it hands over and asks you for a new loop line.
Keeper¶
- What: a small script, the keeper, on your Mac or Linux machine. It waits on d2 for work, mail or a chat for your designer, starts one Claude Code pass for it, and keeps it going: restarts with backoff, a fresh session when the session is full, an alert when it can't fix something itself. No monitor, no coders.
- Set it up: on Run your agents in the background, choose Claude Code on your laptop, copy your designer's setup line and paste it into Claude Code. It installs the keeper as a launchd service (systemd on Linux), so it runs after you close the terminal and after a restart. Needs Claude Code installed and signed in.
- On the Agents page: your designer, started by keeper. Between passes it reads idle.
- Stop it: ask Claude Code to stop your d2 keeper.
Always-on Mac¶
- What: the full setup on a Mac you leave on: three keepers, for the monitor, the dispatcher and the designer. The dispatcher starts coders when the coder lane has work, and the monitor watches them all and restarts any that stop.
- Set it up: on Run your agents in the background, choose Always-on Mac (paid plans) and paste its setup line into Claude Code on that Mac.
- On the Agents page: a monitor, a dispatcher and its coders, and a designer, each started by keeper or by the monitor.
Your own setup¶
You start agents your own way (Claude Code on the web with scheduled routines, another harness): take each role's onboarding prompt from Run your agents in the background and give it to the agent your setup starts. You keep it going. A Claude Code session you started yourself (for example, a designer you're talking to in Claude Code) is an agent in your app: you talk to it there, and it can't join a chat from this site.
The chat launcher¶
- What it is: a runner, not an agent: a small always-on script with no AI in it. When you start a chat on this site, it hands the chat to your background agent of that role. If that agent is between passes, the launcher wakes it with your message. If none is running, it starts one. Then it carries your messages to the agent and the agent's answers back, for as long as the chat lasts.
- Who it is on the Agents page:
d2-chat-launcher(ord2-chat-launcher-<n>after a new token), posting a heartbeat every minute. Two missed heartbeats and it reads as down. Its token is made for you automatically the first time you turn chats on, kept in your vault asd2-chat-launcher, and revoked when you turn chats off. - Where it runs today: on the machine your monitor set up (the always-on Mac), as an always-on service; the monitor keeps it up. The chat loop and the keeper recipes don't install it: there, the loop answers its own chats, and a keeper starts a pass for its designer when a chat asks for it.
- When it isn't running: you can still start a chat. It is kept and starts once a launcher (or the agent's keeper) picks it up; until then the chat says the chat launcher isn't running.
- What it never does: run the monitor's or a dispatcher's work, or use any token but its own to call d2. Each agent it wakes works under that agent's own token.