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

# Adding Agents to Slack channels

> Configure AI agents to respond in specific Slack channels

<Note>
  Before adding agents to Slack channels, the Realm Slack app must be installed in your workspace by an admin. See [Slack app](/integrations/slack-app) for setup instructions.
</Note>

## Adding an agent to a Slack channel

<Steps>
  <Step title="Invite Realm">
    In the desired Slack channel, type @Realm and add the Realm app.
  </Step>

  <Step title="Copy Channel ID">
    Click the channel name at the top and find the Channel ID at the bottom of the pop-up window.

    <Frame>
      <img src="https://mintcdn.com/realm/xWMNicvTca1Noevf/images/agents-slack-channel-id.png?fit=max&auto=format&n=xWMNicvTca1Noevf&q=85&s=a303d36b986036253ee06bb24ef1fc88" alt="Finding the Slack Channel ID" width="820" height="1160" data-path="images/agents-slack-channel-id.png" />
    </Frame>
  </Step>

  <Step title="Configure the agent">
    In the Realm agent editor under Advanced Settings, paste the Channel ID into the Slack Integration section.

    <Frame>
      <img src="https://mintcdn.com/realm/xWMNicvTca1Noevf/images/agents-slack-channel-paste.png?fit=max&auto=format&n=xWMNicvTca1Noevf&q=85&s=88d95ec7298d480ef672eee787dbe21a" alt="Pasting the Channel ID in the agent editor" width="1298" height="650" data-path="images/agents-slack-channel-paste.png" />
    </Frame>
  </Step>
</Steps>

## How to interact with an agent in a channel

Team members can mention the agent with the `@` key followed by their question in the connected channel. The designated agent will post a threaded reply with the answer and source citations.

The way the answer appears depends on the Slack integration's **Public channel answer mode** setting:

| Mode        | What users see                                                                                                                                 |
| ----------- | ---------------------------------------------------------------------------------------------------------------------------------------------- |
| **Preview** | Realm first shows the answer as an "Only visible to you" preview for the person who asked. They can then share it to the thread or dismiss it. |
| **Share**   | Realm posts the answer directly as a visible threaded reply.                                                                                   |
| **None**    | Realm does not answer questions in channels.                                                                                                   |

Admins can change this in the Slack data source settings under **Public channel answer mode**. Use **Share** if you want agents to reply directly in Slack threads without the private preview step.

When an agent is invoked from Slack, its normal response is sent back to the same Slack thread. You usually do not need to add or enable a separate Slack post-message tool for the agent to reply in that thread. Use the Slack post-message tool only when the agent should send a separate message to another channel, user, or thread; otherwise, it may create a new channel message instead of continuing the current thread.

## Example use cases

* **#sales-support**: An agent trained on product documentation, pricing, and competitive battle cards.
* **#customer-success**: An agent connected to your CRM and support systems for quick customer account summaries.

## Tips

* You can call a different agent than the default one by typing `@Realm <Agent name> <your question>`.
* If users see "Only visible to you" answers, the Slack integration is using **Preview** mode. Switch to **Share** mode to post answers directly to the thread.
* Do not add the Slack post-message tool just to answer Slack mentions. The agent's final answer is already returned to the thread where it was invoked.

<Note>
  Only users with an active Realm license can interact with agents in Slack.
</Note>
