Inspiration

Every engineer knows the ritual: pipeline goes red, you open the job, scroll 800 log lines, and eventually find the one line that matters. It's tedious, interrupt-driven, and scales terribly. Beyond the technical pain, there's a structural problem: a pipeline failure is a business exception -- it has a lifecycle, needs a human decision, and demands an audit trail. UiPath Maestro Case was built exactly for this. We're the first team to apply it to DevOps incident management.

What it does

PipelineGuard x UiPath Maestro turns every GitLab CI failure into a structured Maestro Case with a full audit lifecycle:

  1. GitLab pipeline fails -> webhook fires to UiPath Orchestrator API trigger
  2. Maestro Case created -- one case per failure, tracked end-to-end with audit trail
  3. AI Diagnosis -- calls PipelineGuard /api/diagnose -> Gemini 2.5 Flash reads job logs, identifies exact root cause, generates a unified diff fix (~46 seconds)
  4. Human Review -- Action Center task; engineer sees root cause + diff and clicks Approve or Reject
  5. Approval Gateway -- Approved: fix posted as GitLab MR comment; Rejected: case closed with log

Every step recorded in the Maestro Case audit trail. No more lost-in-Slack diagnoses.

How I built it

UiPath side (Studio Web -- Low-code Agents):

  • Main.xaml -- orchestrates 4 workflows via Invoke Workflow activities
  • CreateMaestroCase.xaml -- HTTP POST to /odata/Cases with structured failure metadata
  • DiagnoseWithAI.xaml -- HTTP POST to PipelineGuard /api/diagnose; parses root_cause + fix_proposals
  • HumanReview.xaml -- creates Action Center external task; waits for human decision
  • PostApprovedFix.xaml -- HTTP POST to /api/uipath/callback; triggers GitLab MR comment

AI backend (Python/FastAPI on Google Cloud Run):

  • Gemini 2.5 Flash in a dual-MCP tool-call loop (official GitLab MCP + bundled pipeline MCP)
  • /api/diagnose: structured DiagnosisReport (root cause, failure category, diff proposals)
  • /api/uipath/callback: called by PostApprovedFix.xaml; posts approved fix to GitLab MR

BPMN modeling: 9-element Maestro Case process with exclusive gateway, script tasks, try-catch in all workflows.

Challenges I ran into

  • Maestro Case API schema: The /odata/Cases endpoint has specific required fields; mapping failure metadata to the right Case structure took iteration
  • Action Center timing: Human review tasks need explicit wait/resume logic; the Persistence Activities pattern was non-obvious
  • Cross-system auth: Orchestrator to Cloud Run HTTPS required careful credential management via Orchestrator Assets
  • BPMN to XAML mapping: Designing the BPMN process first then implementing each element kept the architecture clean but required careful translation

Accomplishments I'm proud of

  • First Maestro Case application to DevOps incident management -- a genuinely new use case for a product built for insurance claims and HR workflows
  • Full human-in-the-loop: the fix does not get posted until a real engineer approves it in Action Center
  • 46-second AI diagnosis verified end-to-end against a real failed pipeline (gitlab-org/cli, pipeline #2552952663)
  • Built entirely with Claude Code -- qualifies for the +2 bonus points in the UiPath AgentHack judging rubric

What I learned

Maestro Case is far more powerful outside its traditional use cases. The business exception mental model maps perfectly to any structured workflow needing: a lifecycle (Open -> Diagnose -> Review -> Resolve), a human decision point, and an audit trail. DevOps is just one example -- the pattern works for any agentic pipeline where you want human oversight before an AI takes an irreversible action.

What's next for PipelineGuard: Maestro Agentic Case Orchestration

  • Production deployment: connect real GitLab orgs running CI/CD to live Automation Cloud tenants
  • Expand CI/CD support: GitHub Actions, Jenkins, CircleCI
  • Richer Action Center UI: show the full diff inline in the human review task
  • Multi-failure batching: group related pipeline failures into one Maestro Case
  • SaaS tier: freemium (1 project) -> Pro ($29/mo) -> Business ($99/mo)

Built With

  • cloud-run
  • gemini-2.5-flash
  • javascript
  • maestro-bpmn
  • uipath-studio-web
Share this project:

Updates