← Back to Projects
API

CI/CD Agent

Autonomous AI agent that triages CI failures, classifies security scans, and controls canary releases on GitHub Actions.

PythonFlaskAnthropicGitHub ActionsDevOps

Overview

CI/CD Agent is an autonomous AI reasoning layer that sits on top of GitHub Actions pipelines. Instead of surfacing raw logs and alert noise, it uses Claude (Haiku for fast triage, Sonnet for deep analysis) to read pipeline results, identify root causes, classify security findings, and make promotion decisions — posting structured summaries directly to Slack and GitHub PRs. Built across three progressive tiers, it covers everything from basic failure triage all the way to canary deployments with automatic rollback and AI-generated release notes.

Key Features

  • Two-phase agent design: Haiku handles binary triage (skip bots/duplicates), Sonnet handles full root-cause analysis and structured reports
  • Security scan pre-processor converts raw SAST/SCA/Trivy JSON into concise markdown tables before reaching the LLM, cutting token costs by 70–95%
  • Deterministic auto-approve gate for low-risk changes (docs-only, clean scans) — no LLM call needed
  • Canary deployment controller batches metric snapshots into a single Claude call and triggers automatic rollback on SLO breach
  • Prompt caching on system prompt and tool definitions, saving ~1,400 tokens per repeated call within the 5-minute TTL
  • Structured audit trail (run_log.json) and AI-generated release notes published to GitHub Releases

Technical Decisions

Token cost is the primary design constraint across all three tiers. Every tool output is pre-processed before reaching Claude — logs are filtered to error/warning lines and hard-capped, scan JSON is converted to markdown tables, and canary metrics are sent as delta snapshots rather than full history. The project uses Claude’s model tiering deliberately: Haiku for repetitive binary decisions, Sonnet for analysis, Opus reserved for rare high-stakes calls. Each tier is a self-contained, runnable product rather than a layered patch, keeping each milestone independently deployable and testable.