Slack agents

Give an agent its own Slack app, bind it to the channels where people may ask it things, and know what it can and cannot do there.

An agent can answer in Slack. Each agent is its own Slack app, so people see who answers: mention Wardn Release Agent in a channel, or open its agent view, and it replies in the thread while it works, editing one message instead of posting several. This page is about asking agents things in Slack. For approval and bypass messages that Wardn posts to a channel, see Slack.

What is built

Questions, answers, bindings and the limits below work. They are tested only against fakes: a fake Slack, not yet a live workspace. A channel can read, and where its binding allows proposals the agent can propose a fix; a remediation waits for a person to approve it in Wardn, and nothing in a channel can approve it.

How it works

  1. An admin connects the agent's Slack app to Wardn, and binds it to a channel. The binding says which places the agent may look at there, and what it may do.
  2. Someone in the channel mentions the agent (or writes to it in its agent view). Wardn checks Slack's signature, finds the person's Wardn member by the verified email on their Slack profile, and checks the channel is bound.
  3. Wardn starts a read-only job for the agent in its sandbox. The agent's token holds only what the binding grants and never more than the agent's own roles.
  4. The answer is posted in the thread. Anything with a button is a link into Wardn, never an action.

Every ask is recorded in Activity under the person who asked.

What a channel can do

A binding is a scope: some permissions on some places.

PartChoices
CanRead (the …:read permissions: deployments, releases, logs, events, incidents) and Propose fixes (remediation:propose, where a person must approve). Nothing else can be granted.
OnThe apps, environments or deployments the agent may use the permissions on.

The scope is a ceiling on the agent's token, checked by the same permission engine as the API. It does not rely on the agent's instructions: a request outside the scope is refused even if the agent tries it.

Never from chat

An agent can never raise a release, roll back, approve, bypass a guardrail or change one from a channel. Those are not offered in the binding and are refused if a scope names them.

You can only give what you hold. To bind, you need agent:manage on the agent, and you must hold every permission of the scope on every place in it yourself. A binding cannot give a channel more than the person who made it has.

Everyone in the channel can use the binding and sees the answers. The agent acts for the channel, not for the person who asks. Wardn shows this warning every time you bind, in the server's words:

Everyone in #payments-releases can use Release agent here, with everything this binding gives it, and will see what it answers. The agent acts for the channel, not for the person who asks.

Prefer a private channel. A public channel is one anyone in the workspace can join, so anyone can ask. Binding one needs an explicit confirmation (acknowledgePublic), and it is marked Public in the list. A channel shared with another organization (Slack Connect) can never be bound.

Who can ask

Only people Wardn can match to a member of your organization by verified email. Wardn refuses, privately and only to the person who asked:

WhoWhy
A guest, or someone from another workspaceOnly members of the organization can use an agent.
Another botAgents do not take requests from other bots.
Someone whose Slack profile has no email, or whose email is not a Wardn memberWardn cannot tell who they are.
Anyone, in a channel that is not boundAsk an admin to bind it, or message the agent directly.
Anyone, while the binding is pausedThe agent is paused here.

Direct messages and the agent view work like a channel: they need a Direct messages binding with its own scope.

One conversation per channel

Each channel (and each direct-message binding) keeps one conversation with the agent. People in a channel can build on each other's questions. The agent's runtime owns the conversation and its compaction; Wardn keeps its state on a volume for that agent and channel and resumes it for the next question, so an idle channel holds a volume and nothing running. Each channel's conversation is on its own volume: one channel's agent cannot read another channel's history.

Requests in one channel run in order. Different channels run in parallel. An organization has at most four chat requests being answered at once; past that, the agent replies that your request is queued and how many are ahead. While it works, Slack shows its status under its name ("Looking at the logs…").

Each person may ask one agent six times in quick succession, then about six a minute; past that the agent tells them privately to slow down. If Wardn could not take a request (for example Slack was unreachable while it looked up who asked), Slack's retry is taken up. If Slack delivers an event twice, it is one request. Wardn remembers finished requests for 24 hours, which is longer than Slack retries.

Set it up

You need agent:manage on the agent, and the person who runs Wardn must have set the web address (WARDN_PUBLIC_URL) and WARDN_SECRET_MASTER_KEY, because the bot token and signing secret go in Wardn's secret store.

Open Agents, the agent, then Settings. In the Slack section, choose Connect Slack.

Create the Slack app. Wardn has written the agent's app manifest: its name, the agent view, the least scopes that work and where Slack sends its events. Choose Copy, then Open Slack apps and choose Create New App › From a manifest, paste it, and install the app to your workspace as an internal app.

Connect it back. Enter the App ID (Basic Information), the Bot token (xoxb-…, under OAuth & Permissions) and the Signing secret (Basic Information). Choose Connect. Wardn checks the token with Slack before it keeps anything, and never shows them again. To replace them, connect again.

Choose a channel. Invite the app to the channel first (/invite @Wardn Release Agent). Pick the channel from the list of channels the app is in (a lock marks a private one, and shared channels are disabled with "Shared channels can't be bound"), or Direct messages (agent view). Add the places under On, switch on Read and, if you want fixes proposed, Propose fixes. Only what you hold yourself is enabled. Read the warning, and for a public channel confirm it. Choose Bind channel. Wardn then shows the binding's warning once more.

To add another channel later, choose Add channel in the Slack section. It opens at the last step.

The warning above the button names the channel and the agent. For a public channel it also asks you to tick that you understand anyone in the workspace can join it and ask, and Bind channel stays off until you do.

Manage it

The Slack section of the agent's Settings tab lists the app (workspace, since when, App ID) and a table of Channels: each channel with Can, On, who bound it and when. Use the switch to pause one binding (the agent answers privately that it is paused there and does nothing else, and nothing is removed), and … › Unbind to remove it. Manifest shows the manifest again to copy and Disconnect removes the app, both secrets and every binding. Messages already posted stay in Slack.

In the API

OperationNeeds
GET /agents/{agentId}/slack, …/slack/channelsagent:read
GET …/slack/manifest, PUT and DELETE …/slack/connectionagent:manage
PUT and DELETE …/slack/bindings/{channelId}, PUT …/bindings/{channelId}/pausedagent:manage, and every permission of the scope on every place
POST /webhooks/slack/agents/{agentId}/eventsSlack's signature, not a session

The events address is public by design. A request is believed only if it is signed with that agent's signing secret within five minutes, names that agent's app and, for a question, comes from a person Wardn can match to a member. Every other request gets the same 401, which reveals nothing about which agents exist.

Limits

  • Read-only today. Proposing from a channel waits for remediations.
  • A channel is bound by id; renaming it in Slack changes the name shown here on the next bind.
  • A workspace with very many channels lists the first ones in the picker.
  • Wardn does not store what people ask or what the agent answers. The question travels in the job, and the answer is in Slack.

On this page