# Channel modes

URL: https://swb.one/docs/channel-modes

A **space** is a place where messages arrive. Spaces include Slack channels, Discord channels and threads, Telegram groups, and GitHub repositories.

| Mode | What SwB does |
| - | - |
| `off` | Drops all GitHub events, including owner events. Drops messages from other people on Slack, Discord and Telegram |
| `watch` | Collects messages into a digest, a summary of recent events |
| `assist` | Wakes an agent to read context and reply in the thread |
| `triage` | Wakes an agent to review an event and choose a response. The default action is a reply in the thread |
| `work` | Handles messages from the owner |

On Slack, Discord and Telegram, your mentions and direct messages use `work` in every mode. Visibility settings still control access to channels and targets.

For GitHub `work` mode, add your account number to the space's [owner list](/docs/blocks/github#owner-accounts).

## Set a mode [#set-a-mode]

Set the mode under **Channel modes** on the connection or project page. You can also set it in YAML. The owner can use `space_mode` to set the mode, target, project and allowed actions.

YAML is the text format of the SwB configuration file. In YAML, write `"off"` with quotes.

```yaml
blocks:
  github:
    use: github
    spaces:
      example-org/app:
        mode: "off"
```

SwB first checks the saved setting, then the channel and space settings. It then checks older block settings, the project mode, and `modes.default`. The default is `off`.

## Bind a target [#bind-a-target]

On GitHub, Slack, Discord and Telegram, the project route can wake an agent in `assist`, `triage` or `work` mode. SwB uses the first applicable target.

| Order | Target |
| - | - |
| First | Target on the saved `space_mode` setting. A channel setting replaces the whole space setting |
| Next | YAML `target` in the channel, space or project mode setting, in that order |
| Next | In `triage`, an available target named `claude-<project>-triage`, such as a Claude routine |
| Next | The space's `default_target` or its `target` alias |
| Last | The route for the project |

Choose a target from `targets`. This example binds an agent mailbox to an existing GitHub space.

```python
space_mode(block="github", space="acme/app", mode="triage", target="agent:beta")
```

Use `mode="assist"` for assist mode. Omit `target` to keep the binding. Set `target=""` to clear it.

To set the fallback, call `routes_set` with the linked project and target address. For a locked Capy route, use a target such as `capy:captain:<name>` and keep `allow_override=false`.

## Allow outside GitHub senders [#allow-outside-github-senders]

Call `visibility_list` for the names you can use in `visibility_set`. The address `agent:beta` points to the mailbox. The rule `target:beta` controls who can reach it.

```python
visibility_set(resource="channel:github/acme/app", visibility="shared")
visibility_set(resource="target:beta", visibility="shared")
```

To limit access to one sender, use the same verified sender ID on both resources. For example, set `visibility=["github:1234"]` on both.

## Read a Watch digest [#read-a-watch-digest]

Set the interval with `modes.digest_minutes`. The default is 60 minutes. SwB puts the digest in the target mailbox when the interval ends or the batch reaches 50 events. The owner mailbox is the fallback.

Read every digest as the owner in the console **Inbox** or through MCP `inbox` and `wait`. The digest lists the event count. It lists each event's author, excerpt and available link. Its trust is `external`.

Watch keeps agents asleep. Use the inbox to read a digest. [GitHub event destinations](/docs/blocks/github) still get individual event copies.

## Triage actions [#triage-actions]

The triage agent can read information about the event. By default, its only action is `reply` in the same thread. Use `github_reply` for a GitHub thread. Pass the conversation ID in `handle`. Put the reply in `text`.

Set `actions` in `space_mode` or in YAML to give the agent more actions. Include `reply` to keep replies enabled. For example, use `actions=["reply", "notify_owner"]`.

| Action | What it does |
| - | - |
| `label` | Adds labels to a GitHub issue or pull request |
| `comment` | Adds a GitHub comment |
| `open_issue` | Opens a GitHub issue |
| `link_duplicate` | Links and closes a duplicate GitHub issue |
| `notify_owner` | Sends a note to the owner |

GitHub changes require a GitHub credential with write access. SwB records triage actions in the audit log.

## Check a delivery [#check-a-delivery]

Use `modes_status` to check the mode, its target, its actions and any setup problems. The console mode row shows the bound agent. In triage, the default-agent hint appears only when SwB uses the fallback. Both `space_mode` and `modes_status` prompt you to choose a triage agent when triage needs a target.

SwB records drop reasons for Slack, Discord and Telegram in the audit log. It records at most one entry every 10 minutes for the same block, space, channel and reason.

SwB also records reasons for dropped GitHub webhooks. Open **Audit** or run `swb log` to see the reason.
