# Publish an Agent to Slack

> Add a Slack channel to an Agent, publish it, connect a Slack workspace, and verify the first message.

Source: <https://everruns.com/docs/how-to/publish-to-slack/>

This guide deploys an Agent as a Slack bot through an Agent-owned channel. For Slack scopes, manual setup, and troubleshooting, see [Slack Integration](https://everruns.com/docs/capabilities/slack/).

## Prerequisites

* An active Agent.
* A public HTTPS Everruns origin configured through `PUBLIC_APP_URL`.
* Permission to install an app in a Slack workspace.

## Add the Channel

1. Open the Agent and select **Integrations**.
2. Select **Add channel**, then select **Slack**.
3. Choose a session strategy.
4. Leave the Slack credentials empty and select **Save channel**.

## Choose a session strategy

`session_strategy` controls how incoming Slack messages map to Everruns sessions:

| Strategy               | Behaviour                            | Use when                                                        |
| ---------------------- | ------------------------------------ | --------------------------------------------------------------- |
| `per_thread` (default) | Each Slack thread is its own session | Support bots, Q\&A, each thread is a separate conversation      |
| `per_channel`          | One session per channel              | Persistent channel assistant, context shared across the channel |
| `per_user`             | One session per user                 | Personal assistant, each user has their own ongoing chat        |

## Choose when the agent responds

The Slack endpoint editor shows a **Response policy** selector:

* **All messages** preserves the existing behavior and is the default.
* **Mentions only** responds to direct messages and explicit `@mentions`.
* **Relevant messages** also responds to clear requests within the agent’s purpose, including contextual thread follow-ups. Unrelated and uncertain messages stay silent.

Relevant messages requires a decision model. By default that is the deployment’s Decisions service: for Jev, set `UTILITY_TYPESAFE_API_KEY` and select `UTILITY_DECISION_DRIVER=typesafe`. An organization can use its own model instead: pick a **Default decision model** on the Models page and set **System decisions** to **This organization’s model**. The check then runs on your provider account. In a thread that already has a session it counts against that session’s budget and usage. A message that would start a new session is checked before any session exists, so it is not budget-checked.

Mentions and direct messages work without a classifier. A missing classifier or a failed decision leaves unmentioned messages silent, without posting an acknowledgement or running the agent. An organization that chose its own model stays silent when that model is missing or failing; it never falls back to the deployment’s model.

The Agent’s **Communication** setting controls what an accepted turn posts to Slack: a Direct Agent posts its replies, and an Explicit Agent posts only what it sends with `send_message`. See [Explicit communication](https://everruns.com/docs/features/explicit-communication/). Response policy controls whether that turn starts. Select **All messages** to restore the previous behavior.

## Publish and Connect

Your organization must have a Slack workspace connected in **Settings** > **Slack workspaces** first; an administrator does this once. See [Connect a Slack Workspace](https://everruns.com/docs/capabilities/slack/#connect-a-slack-workspace).

1. Select **Publish** in the channel editor.
2. If more than one workspace is connected, choose which one.
3. Select **Add to Slack**.
4. Approve Slack’s consent screen. The workspace is already selected.
5. If one-click setup is unavailable, return to **Integrations**, expand the channel, and select **Create Slack app**. Copy the resulting signing secret and bot token back through **Configure**.

Publish first because Slack verifies the manifest’s channel Request URL when it creates the Slack app. New installs use `/v1/channels/{channel_id}/slack/events`.

The Slack app uses the agent’s avatar as its icon. With one-click setup, Everruns sets the icon when it creates the app, again once the app is installed, and whenever you change the avatar in **Branding**. When this deployment’s API is reachable on the public internet, Slack fetches that image; otherwise Everruns uploads the 512 px PNG. A Slack app created from the manifest by hand keeps Slack’s default icon: upload the avatar’s 512 px PNG (`/v1/avatars/{avatar_id}/square-512.png`) under **Basic Information** in Slack.

With one-click setup, later changes to the agent’s display name and description also update its Slack app automatically. If no display name is set, Slack uses the agent’s name. Updates preserve the app’s permissions and connection settings. A manually created Slack app needs its name and description updated in Slack.

## Verify

1. In Slack, enter `/invite @botname` in a channel.
2. Mention the bot.
3. Return to the Agent’s **Integrations** tab and expand the Slack channel.
4. Confirm that the checklist records the first message.

To stop new Slack messages without deleting the configuration, select **Unpublish** on this channel. Existing sessions remain available.

## Remove an Agent from Slack

Select **Delete** in the Slack channel editor to remove that connection. For an app created through **Add to Slack**, this also deletes its Slack app, bot, and workspace installation. The confirmation explains this before you continue. Removing managed Slack apps requires permission to delete Agent integrations, including when archiving an Agent.

Archiving or deleting the Agent removes all of its Slack apps created by Everruns and stops new Slack messages. Archiving keeps the Agent definition, but its Slack connections become disabled and managed installation credentials are cleared. Restoring the Agent does not restore its Slack apps; install and publish its Slack channels again.

Manually configured Slack apps must be removed manually in Slack. The confirmation identifies these connections; Everruns stops receiving new messages but cannot remove their installations automatically.

If managed app removal fails, the action reports an error instead of completing. Check the connected workspace in **Settings** > **Slack workspaces** and retry. If the Agent has multiple Slack apps, some may already have been removed before another fails; retrying completes the remaining cleanup.

## Resolve installation issues

Open **Settings** > **Health** to review pending Slack permission or credential issues. The same warning appears beside the endpoint and under **Action required** in notifications. Reading or snoozing an announcement leaves the issue open.

For an app Everruns created, select **Reconnect Slack** and approve the additional permissions. For a manually configured app, add the listed bot scopes in Slack, reinstall the existing app, and save the refreshed bot token in the endpoint editor. Your Slack administrator may need to approve the change. Use **Check again** to verify the installation; unavailable or stale permission evidence keeps the issue open until a current check succeeds.

## See also

* [Slack Integration](https://everruns.com/docs/capabilities/slack/), including scopes, manual setup, and troubleshooting.
* [Change History](https://everruns.com/docs/features/change-history/), to see and restore earlier agent configurations.