# Group chats

Put several bots in one conversation, decide who answers, use @mentions and hand-offs, write group instructions, and use group chats on all your devices.

Canonical page: https://themachine.myapps.ai/docs/desktop/bots/group-chats

A **group chat** is a conversation with you and several bots. The bots see
each other's replies, so they can build on each other's work.

## When to use a group chat

![The Website launch group chat, with replies from several bots and the group instructions bar at the top](/images/docs/desktop/group-chat.webp)

Use one when a job needs different kinds of help working together:

| Group | Who does what |
|---|---|
| **Content team** | A *Researcher* gathers facts, a *Writer* drafts, an *Editor* polishes. |
| **Website launch** | A *Designer* plans the look, a *Developer* builds it, a *Tester* checks it. |
| **Second opinion** | Two bots on different models answer the same question so you can compare. |
| **Planning** | An *Ops* bot plans, a *Finance* bot checks costs. |

For a single task with a single helper, a normal thread is simpler.

## Create a group chat

You need at least one bot first. See [Create a bot](/docs/desktop/bots/create-a-bot).

### Open New group chat

Click **+** at the top of the sidebar and choose **New group chat**.
### Name it and pick a team

Type a name, like *Website launch*. Optionally type a **Team** to file it
under in the sidebar, like *Work* or *Client A*.
### Choose the bots

Tick each bot to include, then click **Create group chat**.
### Set it up

The first time you open the group chat, you see **Set up** with two
choices:

- **Default responder**: who answers when you don't mention anyone. See
[Who answers](#who-answers).
- **Group instructions**: what the group is for. See [Group
instructions](#group-instructions).

Click **Save & continue**, or **Skip for now** and do it later.

## Who answers

### The default responder

Choose from the dropdown in the group chat's header:

| Setting | What happens |
|---|---|
| **Everyone responds** | Every bot answers each message, one after another. The default for new group chats. |
| **Only when mentioned** | Only bots you `@mention` answer. Messages without a mention get no reply. |
| **Lead: …** | One bot you choose answers by default. Mention others to bring them in. |

**Tip:** with three or more bots, **Only when mentioned** or a **Lead** keeps
things tidy and saves money, because not every bot answers every message.

### @mentions

A mention always wins over the default.

- Type `@` and start typing a bot's name, then pick it from the list.
- Mention several bots and they answer **in the order you wrote them**.
- `@everyone` asks every bot.

> @Scout find the three best-reviewed standing desks under $500.
> @Writer then turn Scout's findings into a short buying guide.

Here Scout answers first, then Writer answers, already able to see Scout's
findings.

### How turns work

- Bots answer **one at a time**, never all at once.
- Before each bot's turn, it catches up on the recent messages it missed, and
  re-reads the group instructions.
- Each bot works on its own computer, just like in a normal thread.
- **Stop** interrupts the bot that's speaking and cancels the ones waiting
  after it, including any hand-offs.

The member who's working has a ring around its avatar in the header.

### Bots hand off to each other

A bot can bring another member in by `@mentioning` it in its reply, for
example *"@Writer, the research is done, over to you."* The mentioned bot
takes a turn once any bots already waiting have answered, and it sees the
message that mentioned it. Every bot in a group chat knows it can do this.

- A bot that was already going to answer this message doesn't answer twice.
  It sees the mention when its turn comes.
- To stop two bots passing work back and forth forever, each message you send
  allows at most **6 hand-offs**. After that, mentions are ignored until you
  write again.
- Bots treat a request from another bot as help with the work you gave the
  group, never as an instruction from you.
- **Stop** ends the chain.

### If a bot's computer won't start

Sometimes a member's computer won't wake up. Instead of leaving the whole
group chat stuck, Machine moves that bot to a fresh computer in the same
thread and catches it up on the last 30 messages, including what it said
itself. Files from the old computer aren't on the new one, so the bot may
need to fetch or redo something. The old computer and its files are kept.

## Group instructions

Group instructions apply to every bot in this group chat, on top of each
bot's own [Soul](/docs/desktop/bots/soul). Use them for the goal, who owns
what, and shared rules.

**Example:**

```text
Goal: launch the new Trailhead website by March 1.
Scout researches competitors and customer reviews.
Writer drafts all page copy, based on Scout's research.
Editor has the final say on wording and checks for typos.
Keep messages short. Put long work in files and share the file name.
```

**To edit them:** click the bar at the top of the group chat (*"Add group
instructions…"* if it's empty). Press **Ctrl+Enter** (**⌘Enter** on Mac) to
save, or **Esc** to cancel.

## Manage members

Click the **+** next to the member avatars in the header to open **Manage
members**. Tick or untick bots, then click **Save**.

- A bot that leaves keeps its earlier messages in the chat.
- A group needs at least one bot.
- Archived bots don't answer.

## Threads in a group chat

Like bots, group chats can have several threads. Start a **New thread** under
the group chat in the sidebar for a fresh topic with the same bots. A group
chat always keeps at least one thread. A thread's title comes from your first
message in it.

Each bot's threads in the sidebar end with an **In rooms** list: the group
chat threads that bot takes part in, shown as *group chat name · thread
title*. Click one to open that group chat thread.

## On all your devices

Your group chats follow you. Machine keeps a copy of them with your account,
so Machine Desktop on your other computers and the Machine phone app show the
same group chats, threads, and messages. The app checks for changes when it
starts, when you come back to its window, and every few minutes. To check
straight away, click **Refresh threads** at the top of the sidebar.

Renaming, moving to a team, and deleting a group chat or one of its threads
happen on every device. Group chats don't appear on the Machine website.

## When your computer is off

Where Machine offers it, Machine runs a group chat's turns on its own
servers. You send a message, Machine passes it to the bots one by one, and
the conversation keeps going even if you close your laptop. When you open
Machine Desktop again, the group chat shows where it got to.

When Machine doesn't offer this, Machine Desktop runs the turns itself, so
keep the app open until the bots have finished. A message with an attached
file is always handled by Machine Desktop, because the app copies the file
onto each bot's computer.

If Machine doesn't confirm that it received your message, the group chat
shows *"Machine did not confirm this message. If nobody answers in a minute,
send it again."* Wait a minute, and if no bot starts answering, send the
message again.

## Other things you can do

- **Pin** a message to keep it in a banner at the top. Click the banner to
  jump to it.
- **Reply** to a specific message to quote it.
- **Find** (**Ctrl+F**) and **export** work like in any chat. See [Find,
  share, and export](/docs/desktop/chat/find-share-export).

### The group chat menu

Right-click a group chat in the sidebar:

| Item | What it does |
|---|---|
| **Rename group chat** | Change its name. |
| **Move to team** | File it under a team in the sidebar. |
| **Copy conversation ID** | For support. |
| **Delete group chat** | Delete it, on all your devices. |

> **Deleting a group chat doesn't ask first**
> **Delete group chat** happens immediately, without a confirmation. It
> deletes the group chat on all your devices, and deletes each bot's side of
> that conversation on Machine. It can't be undone.

## Common questions

**Do the bots in a group share files?**
No. Each bot works on its own computer. Ask bots to put results in their
messages, or share file contents, so the others can use them.

**Is a group chat more expensive?**
Each bot that answers uses its own turn, so a message that three bots answer
costs about three turns. A hand-off is a turn too. Use **Only when
mentioned** or a **Lead** to control this.

**Can I add the same bot to several group chats?**
Yes.

**Can I give a group a ready-made team?**
Yes. [Recipes](/docs/desktop/bots/recipes) add a team of bots with their
group chats already set up. You can also share your own team, with its group
chats, as a recipe file.
