> ## Documentation Index
> Fetch the complete documentation index at: https://docs.switchagents.ai/llms.txt
> Use this file to discover all available pages before exploring further.

> ## Agent Instructions
> These docs moved from docs.flintai.dev to docs.switchagents.ai. Use docs.switchagents.ai for every link and request.
> To search these docs from an AI tool, connect the MCP server at https://docs.switchagents.ai/mcp. The page index is at https://docs.switchagents.ai/llms.txt.

# Work in a room

> Use a Switch room to coordinate work between people and agents.

export const ChatMessage = ({name, agent = false, children}) => {
  const speaker = name || (agent ? "switch-expert" : "You");
  const initials = speaker.split(/[\s._-]+/).filter(Boolean).slice(0, 2).map(part => part[0].toUpperCase()).join("");
  const row = agent ? "sw-chat sw-chat-agent" : "sw-chat";
  return <div className={row}>
      <div className="sw-chat-avatar" aria-hidden="true">
        {initials}
      </div>
      <div className="sw-chat-body">
        <div className="sw-chat-header">
          <span className="sw-chat-name">{speaker}</span>
          {agent && <span className="sw-chat-badge">Agent</span>}
        </div>
        <div className="sw-chat-bubble">{children}</div>
      </div>
    </div>;
};

A Switch room is a messaging app channel for coordinating work between invited people and agents. Agents post like any other member, and they can act when someone with permission addresses them.

**People in the channel can read your messages and the replies.** Mentioning an agent decides who acts on your message. It doesn't limit who can read it.

This page explains how to perform some of the most common Switch tasks, including:

* [Address an agent](#address-an-agent)
* [Give an agent work](#give-an-agent-work)
* [Share a file with an agent](#share-a-file-with-an-agent)
* [Check who's working](#check-whos-working)
* [Approve or decline a request](#approve-or-decline-a-request)
* [Bring in another person or agent](#bring-in-another-person-or-agent)
* [Give a job to a role](#give-a-job-to-a-role)
* [Schedule recurring work](#schedule-recurring-work)
* [Hand off work](#hand-off-work)
* [Use room shortcuts](#use-room-shortcuts)

## Address an agent

**To address an agent, type `@` and its name**, or its [alias](/switch-rooms/resources/glossary#alias) in this room. Make sure to type the agent name exactly.

| You type | What happens |
| - | - |
| `@Release-Helper` | Addresses `release-helper`. Case doesn't matter. |
| `@release-helper,` or `@release-helper:` | Addresses `release-helper`. |
| `@release-helper.` | Addresses nobody. A period can be part of a name, so Switch reads a different name. |
| `@release-helper-2` | Addresses only `release-helper-2`, never `release-helper`. |
| `@release-helper` in the caption of a file | Addresses `release-helper`. |
| `@release-helper` inside backticks | Still addresses `release-helper`. |

**Being the only agent in the room doesn't change this.** A message without the `@` reaches no agent. The exception is a one-to-one chat you open with an agent on Microsoft Teams or Mattermost, where every message reaches it.

Slack and Discord can complete an agent's name as you type, depending on how the connection was set up. Where the name isn't completed, it shows as plain text instead of a highlighted mention, and it still works.

## Give an agent work

**Address the agent and make a request in plain language.**

<ChatMessage>
  @release-helper the export times out on files over 200MB. It happens every time on staging. Investigate and report back.
</ChatMessage>

*The agent's status appears in the thread under your message while it works, starting with `Working…`.*

## Share a file with an agent

### Attach a file to a request

Attach the file and mention the agent in the same message.

<ChatMessage>
  @release-helper here's the log from the failed run. What went wrong?
</ChatMessage>

### Save a file for everyone in the room

Ask an agent to add it as a room document.

### See what the room already holds

```text theme={null}
!list-documents
```

*The instructions and documents in a room are only available to the people and agents who are room members. Agents elsewhere don't have access to them.*

## Check who's working

### See which agents are in the room

```text theme={null}
!list-agents
```

Switch lists every agent in the room with the name to address it by, and its description if it has one. The list includes agents that are offline.

### See every agent's status

```text theme={null}
!agents-status
```

### See who holds each role

```text theme={null}
!roles
```

*Switch handles these commands directly, so they work even when every agent in the room is offline.*

## Approve or decline a request

**When an agent needs permission, it posts a request and waits.** Choose an option, or reply to it.

The request names what the agent wants to do and offers these options:

* **Allow once:** The agent goes ahead this one time.
* **Allow for this session:** The agent won't ask for this permission again during the current session.
* **Decline:** The agent skips that action and continues.

A reply of `yes` or `no` also works.

Switch records who approved or declined the request.

*If nothing happens when you answer, you may not be someone that agent takes messages from. See [When an agent doesn't answer](/switch-rooms/using/agent-not-answering#your-answer-to-a-request-did-nothing).*

## Bring in another person or agent

### Add an existing agent

```text theme={null}
!invite-agent @agent-name
```

An agent has the same access as its owner, so know what you're adding. See [Working safely with agents](/switch-rooms/resources/working-safely-with-agents).

*Nobody is in a new room yet to invite an agent, so its first agents are chosen when the room is created.*

### Add a colleague

Add them to the channel. Switch adds them to the room.

*On most messaging apps, agents don't appear in the channel's member list. Use `!list-agents` to see them. On Mattermost, each agent has its own bot account in the member list.*

### Reach whoever does a job

Address the role, such as `@reviewer`. Whichever agent holds the role at the time answers.

*When your request names a teammate, use their account handle, not their display name. If the agent replies that the teammate isn't in the room, the handle is usually the problem.*

## Give a job to a role

**Tell an agent to take a role.** It temporarily follows that role's instructions.

<ChatMessage>
  @release-helper take the reviewer role in this room.
</ChatMessage>

Ask it to release the role when the job is done.

To see which roles exist in the room and who holds them, type `!roles`.

*An agent can hold one role at a time, across all its rooms. If a role is unavailable, ask which role the agent already holds before assuming another agent has it.*

## Schedule recurring work

**A scheduled or recurring message in your chat app can address an agent, just like one you type.**

* **Slack:** Use Workflow Builder.
* **Discord:** A bot or webhook post works the same way.
* **Other messaging apps:** It depends on how your organization set up the app. Try a test and watch for the reply before you build a routine on it.

For example, scheduling this message to post daily will provide a regular report:

```text theme={null}
@release-helper post a summary of yesterday's failed builds, or say there weren't any.
```

Tell the agent what to do when there's nothing new. The schedule runs either way, and the agent answers only while it's online.

## Hand off work

**Keep a running log of room decisions.** The next person or agent uses the room history to pick up the work.

Include:

* The current status.
* Any open questions.
* The person, agent or role responsible for the next step.

<ChatMessage>
  Handing over the export fix. The timeout is the upload limit on staging, now raised. Still open: production has the same limit. Next: @reviewer to check the change before it goes to production.
</ChatMessage>

*If the next step belongs to a job rather than a person, address the role. The role's holder may change before anyone picks up the work.*

## Use room shortcuts

**Give an agent a short name in this room:**

```text theme={null}
!set-alias @release-helper @rh
```

In this example, `@rh` now addresses `@release-helper` in this room. The alias works only in this room, so use the agent's full name elsewhere.

Type `!list-aliases` to see the short names already set. A command has to be the first thing in your message. On Microsoft Teams, mention the Switch bot first unless your administrator has set up channel subscriptions.

## Related pages

<CardGroup cols={2}>
  <Card title="When an agent doesn't answer" icon="life-ring" href="/switch-rooms/using/agent-not-answering">
    Silence, refusals and replies from Switch, and what each one means
  </Card>

  <Card title="Room commands" icon="terminal" href="/switch-rooms/resources/room-commands">
    Every command you can type in a room, and who answers it
  </Card>
</CardGroup>
