🛡 PipelineGuard Gemini 2.5 Flash ● Live

AI agent that auto-diagnoses GitLab CI pipeline failures and proposes diff-ready fixes

Stop debugging pipelines manually.

PipelineGuard connects to your GitLab project, reads the failure logs, and returns a structured root-cause analysis with code fixes — in seconds.

~15s
median diagnosis time
6
failure categories
100%
read-only on your repo
0
manual steps required
🔍

Root-Cause in Seconds

Gemini 2.5 Flash reads pipeline logs and pinpoints the exact cause — missing env vars, dependency conflicts, flaky tests, auth failures.

🔧

Diff-Ready Fix Patches

Returns unified diffs with confidence levels (high/medium/low). Copy-paste directly into your CI config or source file.

💬

Auto MR Comments

Optionally posts the full diagnosis on the failing merge request so your team sees it immediately.

Zero-Touch Webhook

Register once as a GitLab Pipeline webhook. Every failure triggers an automatic diagnosis — no engineer action needed.

📊

Splunk Integration

Ingest pipeline events into Splunk and run natural-language investigations across historical failure data.

Cloud-Native

Deploys to Google Cloud Run in one command. Scales to zero when idle. Uses Vertex AI for enterprise-grade inference.

▶ Interactive Demo

Select a scenario below to see a real PipelineGuard diagnosis. These outputs were produced by Gemini 2.5 Flash against actual GitLab pipelines.

🎥 Demo Video

▶ Full walkthrough video showing PipelineGuard diagnosing a real failing pipeline, posting an MR comment, and the Splunk integration.

📹 View demo videos on GitHub

🧱 Architecture

GitLab Pipeline Fails | v POST /webhook/gitlab (X-Gitlab-Token validated) PipelineGuard / FastAPI -----------------------------------------------+ | | v fetch logs + MR context v GitLab REST API Gemini 2.5 Flash (python-gitlab or (Vertex AI Agent Builder GitLab MCP Server) or AI Studio) | | +-------------- structured DiagnosticReport <-----------------+ | +-------------------+-------------------+ v v v root_cause fix_proposals failure_category (MR comment) (diff patches) (flaky/env/code/...)

The agent uses the GitLab MCP Server (Model Context Protocol) to give Gemini structured access to pipeline data — no prompt engineering for log parsing. Falls back to direct python-gitlab calls when MCP is unavailable.

📖 API Reference

GET / Landing page
GET /health Health check → {"status":"ok","service":"PipelineGuard"}
POST /demo Read-only live diagnosis — body: {"project":"org/repo","pipeline_id":123}
POST /webhook/gitlab GitLab Pipeline webhook receiver — auto-diagnoses and posts MR comment
GET /docs OpenAPI / Swagger UI — interactive API explorer

Self-host: pip install pipelineguard[web] then GITLAB_TOKEN=xxx GEMINI_API_KEY=yyy pipelineguard serve

🧰 Built With

Gemini 2.5 Flash Vertex AI Agent Builder GitLab MCP Server FastAPI python-gitlab Google Cloud Run google-genai SDK Splunk HEC Pydantic v2

🚀 Quick Start

# Install pip install pipelineguard[web] # One-shot diagnosis export GITLAB_TOKEN=glpat-... export GEMINI_API_KEY=AIza... pipelineguard diagnose myorg/myrepo # Start webhook server (auto-diagnoses every failure) pipelineguard serve --port 8080 # Then: GitLab Settings -> Webhooks -> Pipeline events -> your URL # Deploy to Google Cloud Run bash deploy_cloudrun.sh