# Agents working together

Side by side, handing each other work, roles, other computers, and a secretary that takes in messages and lines up tasks.

Web page: https://gerdr.dev/docs/teamwork

Five ways to have several agents work, from the simplest to the most hands-off:

## 1. Side by side

Split the window and run a session in each pane, on different engines if you like. The sidebar's Active list has everyone at work; the one waiting on you is red, and `ctrl+b` `o` jumps there. [Step by step in this recipe](https://gerdr.dev/docs/recipe-parallel).

## 2. One agent hands work to another

Every agent in Gerdr can start sessions, hand them work and wait for the result with `gerdr session`. You just say:

1. "Start a Codex to review this change and list the problems for me": it opens a Codex pane beside it, waits, and brings the verdict back.
2. "Split these three pages across three agents": it opens three panes working in parallel, then sums up.
3. "Ask the billing session how far the refund work got": it messages a session already open and reads the reply.

The sessions it starts are real ones: you see every step, can cut in, approve, and pick them up later. The commands:

```
gerdr session new --agent codex --title reviewer --prompt "Review the uncommitted diff…" --wait
gerdr session send reviewer "Also check the tests" --wait
gerdr session list
```

## 3. Roles

Set up roles like "Reviewer" or "Docs writer" in Settings, each with its own prompt and tools, and name one when handing out work: "have the reviewer look". [How to set one up](https://gerdr.dev/docs/agents).

## 4. Another agent carries on

Out of quota, or want another take: `⋯ → Fork…` in the session's menu, pick another agent, and it carries on beside it with the whole conversation. [Step by step in this recipe](https://gerdr.dev/docs/recipe-fork).

## 5. A secretary takes the work in

Install the Superagent panel (`Settings → Panels → Install from GitHub`, `gerdr-dev/gerdr-panel-superagent`). Messages from outside and what you ask for reach the secretary, which decides which repository and agent take it; each becomes a task in the list on the left. Opening a task opens its worker's chat, and you talk to the worker directly: it knows the task best and asks the sharpest questions. What needs your call is flagged first.

## Across computers too

With another computer paired, add "on the office machine": the agent starts the session there with `gerdr session new --host`, runs commands there with `gerdr host exec`, and copies files with `gerdr host cp`.

> A session or the agent's own sub-agent? Short work where only the answer matters (search the code, summarise twenty files): a sub-agent, cheaper. Work you should see, talk to, that runs long or needs another agent: a session.
