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

# External channels

> Use agents in Slack and other external channels.

External channels let people use agents in apps like Slack, Telegram, Microsoft Teams, WhatsApp, Linear, etc. Currently, Slack is the only external channel supported.

## Example requests

Ask your coding agent which agent to put in Slack and how it should respond. It can connect the channel and listen mode.

> "Put our support agent in the #support channel and have it reply only when mentioned."

> "Connect the data analyst agent to #data so the team can ask questions there."

## Connect agents to Slack

The simplest way to connect an agent to Slack is from the web app. Each agent's detail page has an **External Channels** panel where you connect Slack once and bind the channels the agent should answer in.

<Steps>
  <Step title="Open the agent">
    In the web app, go to **Agents** and select your agent. The **External Channels** panel is on the right.
  </Step>

  <Step title="Connect Slack">
    Next to Slack, click **Connect** and approve the OAuth prompt. This connects your Slack workspace to the organization once; you don't need to reconnect it for this agent or any other agent later.
  </Step>

  <Step title="Bind a channel">
    Click the connected Slack workspace, then **Add channel**. Pick a channel and choose how the agent should respond:

    | Listen mode     | What it does                               |
    | --------------- | ------------------------------------------ |
    | Mentions only   | Responds only when the agent is @mentioned |
    | All messages    | Responds to every message in the channel   |
    | Direct messages | Responds to direct messages with the agent |

    Leave **Threads** on to let the agent follow up in the same thread.
  </Step>

  <Step title="Message the agent">
    Message the bound channel according to its listen mode. Keystroke starts or continues an agent session and posts the reply back to Slack. Review runs in **History** by filtering **Type** to **Agent**.
  </Step>
</Steps>

Once Slack is connected, the workspace stays connected for the organization. Adding more agents to Slack is just the bind step.

## Channel access and credentials

Channel membership is how you control access to an agent. Once an agent is bound to a Slack channel, anyone in that channel can message it, and the agent runs with its assigned tools, actions, and credentials regardless of who sent the message.

The agent acts on behalf of the channel, not the individual user: a teammate messaging the agent uses the agent's credentials, not their own. Only bind agents to channels whose members you trust with everything the agent can do.

## Manage Slack from the CLI

You can connect Slack and manage channel bindings entirely from the CLI instead of the web app.

```bash theme={null}
keystroke auth login
keystroke connect slack
```

```bash theme={null}
keystroke channels platforms list
keystroke channels accounts --platform slack
keystroke channels directory --platform slack --account <team-id>
keystroke channels bind --agent support --platform slack --account <team-id> --channel <channel-id> --mode mention
keystroke channels list --agent support
```

Channel commands are platform/org-scoped and require CLI authentication. See the [CLI reference](/cli#channels) for the full command set.

Slack OAuth and gateway routes mount automatically on your deployed project, so connecting against the cloud target works out of the box; you don't need to add Slack to `keystroke.config.ts`.

If you instead run a local server with `keystroke dev`, Slack must be able to reach it, so expose a public tunnel via `PUBLIC_PLATFORM_PROXY_URL` instead of `localhost`:

```bash theme={null}
SLACK_CLIENT_ID=...
SLACK_CLIENT_SECRET=...
SLACK_SIGNING_SECRET=...
PUBLIC_PLATFORM_PROXY_URL=https://your-public-url.example.com
keystroke dev
```

## Other external channels

Additional external channels listed below will be added over the coming weeks. You can request specific channels by contacting us at [team@keystroke.ai](mailto:team@keystroke.ai) and we will add them promptly.

* Microsoft Teams
* Telegram
* WhatsApp
* Linear
* Discord
* Google Chat

## Next steps

<CardGroup cols={2}>
  <Card title="Run agents" href="/learn/agents/run-agents">
    Prompt the same agent directly while testing channel behavior.
  </Card>

  <Card title="Agent runs" href="/learn/logs/agent-runs">
    Inspect Slack-started agent sessions in History.
  </Card>

  <Card title="Credentials" href="/learn/credentials/connect-credentials">
    Connect OAuth credentials used by tools and integrations.
  </Card>

  <Card title="Build agents" href="/learn/agents/build-agents">
    Tune the agent prompt and tools for channel use.
  </Card>
</CardGroup>
