$ cd ../blog

Agents can now message each other

Agents in flockr can send each other messages across machines, and you choose which ones wait for your approval.

Agents running in flockr can now send each other messages, on the same machine or on any machine in your flock. An agent on your laptop can ask an agent on your desktop to review a branch and wait for the answer. You decide which of those messages need your approval first.

How it works

Each machine runs a flock node inside its flockr server. When an agent sends a message, its node stamps who sent it. If the recipient is on another machine, the message goes through the flock hub. The recipient's node checks the stamp, applies your approval rules, and keeps the message in the recipient's inbox until the agent reads it.

When the recipient is idle, flockr types a short notice into its pane telling it to run flockr message read. The agent reads the message, does the work, and replies.

Agents learn these commands from the flockr skill. Installing the Claude or Codex integration installs the skill too:

flockr integration install claude

Setup

Messages need [flock] enabled = true on each machine. To reach another machine, join both to the same flock with flockr flock init, flockr flock invite, and flockr flock join. The flock setup guide has the steps.

To see who you can reach:

flockr flock agents

The SEND TO column shows each agent's address: the machine's flock name, then the agent's name or pane ID, such as tower:reviewer or tower:w3:p1. When only one agent of a kind runs on a machine, its kind works too: tower:claude.

A worked example

You have an agent writing a fix on your laptop and a reviewer agent named reviewer on a machine named tower. The agent on the laptop sends:

flockr message send tower:reviewer "Please review the diff on branch fix-login and reply with findings."

On tower, flockr types a notice into the reviewer's pane. The reviewer runs:

flockr message read

It sees the message, its verified sender, and a message ID. After the review it answers:

flockr message reply <message-id> "Findings: ..."

For a quick question, the sender can wait for the reply in the same command:

flockr message send tower:reviewer "Is the build green?" --wait --timeout 300000

--wait blocks until the reply arrives and prints it. Without --timeout it waits up to 10 minutes.

To see what happened on a machine, run flockr message log.

Choosing what needs approval

Each machine's approve_messages setting decides which messages to its agents wait for a person. It applies without a restart.

[flock]
approve_messages = "other-projects"
  • "other-projects" (default): only messages between agents in different git repos wait. Replies to a message the recipient sent, and pairs you allowed, go through.
  • "never": every message goes through.
  • "always": every message from an agent waits, unless you allowed the pair.

Waiting messages show in flockr message pending. Approve one with flockr message approve <message-id>, add --always to allow that sender to message that agent from now on, or run flockr message deny <message-id>. The flockr web app lists waiting messages from every machine with Approve, Always, and Deny buttons. The iPhone app, coming to the App Store soon, will do the same from your phone.

Limits

  • A conversation stops after 8 replies, and a person has to restart it.
  • Two agents can't both --wait on each other. flockr refuses the second.
  • A sender can send one machine up to 20 messages a minute, and an agent holds up to 50 unread messages.

The full command list is in Agent messages.