Ask the release agent in a team channel

Let the Payments team ask a release agent what is running and what failed, from a private Slack channel, with a binding that reads only what they may read.

The situation

The Payments team keeps asking each other the same things in #payments-releases: which snapshot is running in production, why the last release stopped, whether staging is healthy. You have a Release agent that can answer all of it. You want the team to ask it where they already talk, and you want to be sure that:

  • only people who are members of your Wardn organization can ask;
  • the agent can read the Payments apps and nothing else, whatever anyone in the channel types;
  • nobody, including the agent, can change production from a chat message.

Wardn does this with a Slack app of the agent's own and a binding: the channel, and a scope of what the agent may read there. Slack agents explains the model; this recipe is the setup.

What is built

Questions, answers and bindings work. They are tested only against fakes: a fake Slack, not yet a live workspace. The agent answers questions about releases, deployments, logs and events. A binding that allows proposals lets it propose a fix from the channel; a person still approves it in Wardn, so nothing a channel asks changes anything by itself.

What lives where

PieceWhere it lives
The agent Release agent, owned by the Payments teamAgents (Agents)
Its Slack app, with its bot token and signing secretSlack, and Wardn's secret store
The binding of #payments-releases to the agentThe agent's Settings › Slack
The scope: read, on the payments-api and ledger appsThe same binding

Nothing is stored in git. The one thing that exists only in Slack is the app.

Choose the channel

Use a private channel and invite only the people who should be able to use the agent. Everyone in the channel can use the binding and sees every answer, so the channel's membership is the access control. A public channel works, but anyone in the workspace can join it and ask, so Wardn asks you to confirm that when you bind it, and marks it Public in the list.

Do not bind a channel that is shared with another organization (Slack Connect): Wardn refuses to. Guests, and anyone whose Slack email does not match a Wardn member, are refused privately and can read nothing.

Settings

Create the app and connect it

In Wardn, open Agents › Release agent › Settings and choose Connect Slack in the Slack section.

Choose Copy, then Open Slack apps. In Slack choose Create New App › From a manifest, pick your workspace, paste, and create it. Install it to the workspace.

Back in Wardn, enter the App ID and Signing secret from the app's Basic Information, and the Bot token (xoxb-…) from OAuth & Permissions, then choose Connect. Wardn checks the token with Slack, then keeps both secrets in its secret store and never shows them again.

Bind the channel

In Slack, invite the app to the channel: /invite @Wardn Release Agent. Then, in the last step of Connect Slack:

Pick #payments-releases. The list shows the channels the app is in, with a lock on private ones.

Under On, choose Add and pick the payments-api and ledger apps. These are the only places the agent may look in this channel.

Under Can, switch on Read. Leave Propose fixes off for now. Only the switches you could do yourself are enabled: you cannot give a channel a permission you do not hold on those apps.

Read the warning (it says everyone in the channel can use the agent here and will see its answers), then choose Bind channel.

The row Raise releases, roll back, approve, bypass or change guardrails says Never from chat, and is not a switch.

api() { curl -fsS -H "Authorization: Bearer $WARDN_TOKEN" -H 'Content-Type: application/json' "$@"; }
AGENT="$WARDN_API_URL/api/v1/agents/$AGENT_ID/slack"

api -X PUT "$AGENT/connection" -d '{"appId":"A07RLS2AGNT","botToken":"xoxb-…","signingSecret":"…"}'
api "$AGENT/channels"                 # find the channel's id
api -X PUT "$AGENT/bindings/C0123ABCD" -d '{
  "permissions": ["app:read", "deployment:read", "release:read", "incident:read"],
  "targets": [{"kind":"app","id":"'"$PAYMENTS_API_ID"'"}, {"kind":"app","id":"'"$LEDGER_ID"'"}]
}'

The reply carries the warning to show a person. A public channel is refused with chat.public_unacknowledged until you add "acknowledgePublic": true.

Try it

In the channel, write:

@Wardn Release Agent what is running in production for payments-api, and why did the last release stop?

You should see a thread reply that first shows the agent's status ("Looking at the deployments…") and then a single message with the answer and links into Wardn. In Activity, the ask is recorded under your name, not the agent's. Ask in a channel that is not bound, or as someone who is not a Wardn member, and you get a private reply that says why, which nobody else sees.

Proposing a fix, and who approves it

When remediations are available, switch on Propose fixes in the binding. The agent can then answer "roll back payments-api" with a proposal instead of an action: it appears in Agents › Remediations, and a person who holds the approval duty decides it. The person who asked cannot approve their own request, and neither can the agent. Wardn executes the change after approval, with its own credentials, and every step is in Activity. Until then, the agent says it cannot propose.

Pause, unbind, disconnect

  • Pause one channel with the switch in the Channels table. The agent answers privately that it is paused there and nothing is removed. Resume with the same switch.
  • Unbind from …: the agent no longer answers there, and each channel's conversation is kept only as a volume until the agent is revoked.
  • Pause the agent (Settings › Danger zone) and it answers nobody anywhere.
  • Disconnect removes the app's secrets and every binding.

Common problems

You seeWhy
Nothing happens when you mention the agentThe app is not in the channel (invite it), or the channel is not bound. Wardn answers an unbound channel privately, but only if the app is in it.
"I couldn't match your Slack email to a member of this organization."The person's Slack email is not a Wardn member's. Invite them to Wardn with that address.
"Queued, 2 ahead"The organization is at its limit of chat requests being answered at once. It runs in order.
Answers that say the agent cannot read somethingThe scope does not cover it. Add the app, environment or deployment to the binding.
"Shared channels can't be bound"The channel is shared with another organization. Use a channel only your workspace is in.

On this page