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.
Sample Phase
Section titled “Sample Phase”- name: implement agent: cursor role: developer notify: on_escalate: agent: slack channel: alertsPhase Configuration
Section titled “Phase Configuration”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.
Notify Block Fields
Section titled “Notify Block Fields”| Field | Type | Required | Description |
|---|---|---|---|
agent | string | Yes | Must be "slack" |
channel | string | No | Channel name from settings (defaults to "default") |
message | string | No | Custom message text |
Supported events: on_complete, on_escalate, on_fail.
Channel Notation
Section titled “Channel Notation”"slack"orchannel: default— routes to the default webhookchannel: alerts— routes to the namedalertschannel
Settings
Section titled “Settings”Configure under agents.slack in settings.json (via cliq setup or cliq settings):
| Key | Required | Default | Description |
|---|---|---|---|
agents.slack.channels | Yes | — | Named channel map (must include at least default) |
agents.slack.channels.default.webhook_url | Yes | — | Webhook URL for the default channel |
agents.slack.channels.<name>.webhook_url | No | — | Webhook URL for a named channel |
Channel Map
Section titled “Channel Map”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.
Output
Section titled “Output”The slack agent does not produce handoff envelopes. It is a fire-and-forget notification delivery mechanism with no downstream data.
Examples
Section titled “Examples”Example: Notify on pipeline completion
Section titled “Example: Notify on pipeline completion”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"Example: Multiple notification channels
Section titled “Example: Multiple notification channels”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"- Go to https://api.slack.com/apps → Create New App → From scratch
- Name it (e.g.,
cliq notifications) and pick your workspace - In the left sidebar, click Incoming Webhooks → toggle On
- Click Add New Webhook to Workspace → pick a channel → Allow
- Copy the webhook URL
- Repeat steps 4-5 for each Slack channel you want to notify
echo $SLACK_WEBHOOK | cliq settings agents.slack.channels.default.webhook_url --stdin --globalcliq doctor agent slackValidation
Section titled “Validation”cliq doctor agent slack checks:
agents.slack.channelsis configured in settings- At least one channel (preferably
default) has a valid webhook URL - Webhook URLs are reachable