Agents at work¶
When several agents work in one project at once, such as a coding session building the app and an agent run from a workflow, they need to know about each other. Agents at work is the project's roster: who is working right now, what each one is doing, and which files or other resources each has claimed. Agents read it too, so they can avoid editing what another agent is in the middle of.
Turning it on¶
Agents at work, claims and agent messaging together make up agent collaboration. It is turned on per organization and is off until then. While it is off, nothing on this page or on Messages & inbox appears, and agents and sessions work exactly as before.
An instance administrator turns it on for one organization through the admin API:
PATCH /api/v1/admin/organizations/{id}
Content-Type: application/json
{"features": {"agent_comms": true}}
false turns it off again. See Instance administration.
Seeing who is at work¶
- The top bar. On every page of a project, a session's page included, the top bar shows N agents at work while at least one agent is working or waiting. Click it to open the roster as a drawer. The agent editor's header shows the same for the agent's project.
- The project page. The project's More menu lists Agents at work, the same roster as a page of its own.
Each entry shows:
- its kind: Agent, Coding session, Context agent, Bot or Person, and You on your own entry;
- its name and status: Starting, Working, Waiting, Idle or Paused;
- a one-line note of what it is doing;
- its Claims, each with the time left on its lease, for example 12m left;
- Open session or Open run, and when it Joined.
The roster stays live while it is open. With nobody at work it reads No agents are working here right now. An entry's Conversations button lists the message threads it took part in, and, for everyone but viewers, Message writes to it (see Messages & inbox).
What agents see and do¶
Agents. Each run of a stored agent opens with an Agents in this project block: who else is working, what they are doing and what they have claimed (the newest 12 entries, at most about 800 tokens). The agent's Project roster setting on the Brief tab turns the block off; the agent can still look with its tools. Every run gets four tools:
| Tool | What it does |
|---|---|
list_project_agents |
Lists the agents working in the project, their status, what they are doing and what they have claimed, plus the project's claims mode |
set_status |
Sets the agent's own one-line status on the roster, up to 200 characters |
claim |
Claims a resource for a lease, 30 minutes by default (1 minute to 24 hours), with an optional note. A resource is a file pattern (path:src/cart/**), a branch, a workflow, a table, an item or a free-text key |
release |
Releases a claim the agent holds |
The platform records who made each claim; an agent cannot claim in another's name. An agent that runs as another agent's tool gets neither the block nor these tools.
Coding sessions. A coding session sees the same roster in its instructions and gets the same tools. It keeps its status current with the step of the plan it is on, and every file it writes or edits is claimed for 10 minutes. When a session finishes, it leaves the roster with its claims.
Overlapping claims¶
Two agents can claim overlapping resources, for example path:src/** and path:src/cart/api.ts. What happens then is the project's Overlapping claims setting:
- Warn (the default): the agent that claims second is warned, with the holder's name; the holder is not told. Nothing is refused.
- Block: a coding session's write and edit tools refuse a path another live agent has claimed, before anything is written, and an agent's
claimof an overlapping resource is refused. Both name the holder.
Claims expire with their lease, so a claim an agent forgot to release does not block the project for long.
The project's Agent collaboration settings¶
Project Settings has an Agent collaboration section while agent collaboration is on for your organization (see Project settings):
| Setting | What it does |
|---|---|
| Overlapping claims | Warn or Block, as above |
| Context agent | Reserved for a context agent that curates the project's shared context. It has no effect yet |
| Message retention (days) | How long agent messages are kept, 1–365 days, default 30 |
| Hop cap | How many agent-to-agent sends one chain may make before it is stopped, 1–8, default 4 |
Click Save Changes to apply them. A value the server refuses is explained under its field.
From the API¶
GET /api/v1/projects/{id}/agents/roster returns the roster to anyone who can view the project; the app keeps it live over a WebSocket. The settings above are settings.agent_comms on PATCH /api/v1/projects/{id}: claims_mode (warn or block), context_agent_enabled, message_retention_days and hop_cap. While agent collaboration is off for the organization, the roster routes answer 404 with the code agent_comms_disabled. See the REST API.