Home / Templates / DevOps
DevOps Intermediate ⏱ 2 hours

CI/CD Pipeline Agent Blueprint

Claude agent that validates builds, runs tests, manages deployments, and routes production push approvals through Slack.

What This Blueprint Does

The CI/CD Pipeline Agent manages your entire deployment pipeline — from validating build artifacts to deploying staging to routing production approvals through Slack. It replaces brittle shell scripts with an intelligent agent that understands context, handles errors gracefully, and escalates ambiguity.

The key differentiator: production deploys require human approval. The agent pushes to feature branches and deploys to staging autonomously. Promoting to production always goes through a Slack gate.

Architecture

Three coordinated stages:

  1. Test Validation — Runs tests, validates artifacts, checks for regressions
  2. Deploy Agent — Pushes to staging autonomously; requests approval for production
  3. Notification Agent — Reports outcomes to Slack, updates dashboards

If tests fail, the deploy stage never runs. If staging fails, production approval is never requested.

Policy Configuration

project: acme-platform
agent: ci-cd-pipeline

policies:
  # Git: push freely to feature branches
  - git:read on repos/*
  - git:push on repos/*/branches/feature/*
  - git:push on repos/*/branches/hotfix/*

  # Push to main requires approval
  - git:push on repos/*/branches/main
    requires_approval: true
    approval_channel: slack:#deploy-approvals
    approval_timeout: 30m

  # AWS: staging deploys are autonomous
  - aws:ecs:UpdateService on arn:aws:ecs:*:*:service/staging-*
  - aws:ecr:PutImage on arn:aws:ecr:*:*:repository/acme-*

  # Production requires approval
  - aws:ecs:UpdateService on arn:aws:ecs:*:*:service/prod-*
    requires_approval: true
    approval_channel: slack:#deploy-approvals

budget:
  max_tokens_per_session: 200000

notifications:
  on_complete: slack:#deployments
  on_failure: slack:#deploy-alerts

Approval Flow

When the agent needs production approval, it posts to Slack:

Production Deploy Approval Neededacme/api
3 commits · feat: add stripe webhook handler
Tests: 142/142 passed · Staging: verified
[Approve] [Reject] [View Diff]

One click approves or rejects. Timeout defaults to 60 minutes — no response cancels the deploy automatically.

Error Handling

  • Test failures — Posts details, does not proceed to deploy
  • Staging failure — Rolls back ECS service, alerts with logs
  • Production failure — Immediate rollback, pages on-call via Slack
// get-started

Deploy this blueprint

Get this agent running in 2 hours with Sentrely's managed control plane.

AI agent stories, every 2 weeks

Real-world lessons on running AI agents in production — RBAC patterns, audit gotchas, approval workflows. No spam.

Unsubscribe anytime · No spam, ever

// talk-to-us

Tell us what you're building

We reply within one business day.

Platforms / tools you're using or evaluating *

Or email us directly at jordan@sentrely.com

get early access

Get early access

Leave your details and we'll reach out to get you set up.

No spam. We'll only use this to set up your access.