Skip to content

Slack Agent

The slack agent delivers pipeline notifications to Slack channels via incoming webhooks. It is a notify-only agent — you don’t put it in a phase’s agent: field. Instead, it fires when pipeline events trigger from notify blocks or the notifications configuration.

Use the slack agent to keep your team informed about pipeline progress, escalations, and completions without leaving Slack.


- name: implement
agent: cursor
role: developer
notify:
on_escalate:
agent: slack
channel: alerts

The slack agent cannot be used as a workflow phase agent. It has no action field, no sources, and no target_entries. It activates exclusively through notify blocks on other phases.

FieldTypeRequiredDescription
agentstringYesMust be "slack"
channelstringNoChannel name from settings (defaults to "default")
messagestringNoCustom message text

Supported events: on_complete, on_escalate, on_fail.

  • "slack" or channel: default — routes to the default webhook
  • channel: alerts — routes to the named alerts channel

Configure under agents.slack in settings.json (via cliq setup or cliq settings):

KeyRequiredDefaultDescription
agents.slack.channelsYesNamed channel map (must include at least default)
agents.slack.channels.default.webhook_urlYesWebhook URL for the default channel
agents.slack.channels.<name>.webhook_urlNoWebhook URL for a named channel

Channels are named targets for notifications. Every slack agent configuration must include at least a default channel:

{
"agents": {
"slack": {
"channels": {
"default": {
"webhook_url": "https://hooks.slack.com/services/T00/B00/xxxx"
},
"alerts": {
"webhook_url": "https://hooks.slack.com/services/T00/B00/yyyy"
},
"deploys": {
"webhook_url": "https://hooks.slack.com/services/T00/B00/zzzz"
}
}
}
}
}

The default channel is used when a notify block doesn’t specify a channel name.


The slack agent does not produce handoff envelopes. It is a fire-and-forget notification delivery mechanism with no downstream data.


Post a success message to the default Slack channel when work finishes.

phases:
- name: implement
agent: cursor
notify:
on_complete:
agent: slack
channel: default
message: "Pipeline completed successfully"
- name: finalize
agent: git
action: create_pr
depends_on: [implement]

Example: Route escalations to an alerts channel

Section titled “Example: Route escalations to an alerts channel”

Notify the on-call team in a dedicated alerts channel when a review gate escalates.

phases:
- name: implement
agent: cursor
- name: review
type: gate
agent: hug
depends_on: [implement]
review:
reviewer: tech-lead
timeout: 4h
notify:
on_escalate:
agent: slack
channel: alerts
message: "Review escalated — human intervention required"

Combine completion and failure notifications for full pipeline observability.

phases:
- name: deploy
agent: exec
depends_on: [review]
commands:
- name: deploy-prod
run: ./scripts/deploy.sh production
escalate_on_fail: true
notify:
on_complete:
agent: slack
channel: deploys
message: "Production deployment succeeded"
on_fail:
agent: slack
channel: alerts
message: "Production deployment FAILED — investigate immediately"

  1. Go to https://api.slack.com/appsCreate New AppFrom scratch
  2. Name it (e.g., cliq notifications) and pick your workspace
  3. In the left sidebar, click Incoming Webhooks → toggle On
  4. Click Add New Webhook to Workspace → pick a channel → Allow
  5. Copy the webhook URL
  6. Repeat steps 4-5 for each Slack channel you want to notify
Terminal window
echo $SLACK_WEBHOOK | cliq settings agents.slack.channels.default.webhook_url --stdin --global
cliq doctor agent slack

cliq doctor agent slack checks:

  • agents.slack.channels is configured in settings
  • At least one channel (preferably default) has a valid webhook URL
  • Webhook URLs are reachable