🚑 Inspiration

Debugging failed CI/CD pipelines is a frustrating and time-consuming process.

Developers often have to manually:

  • scan logs
  • identify the failing job
  • correlate errors with recent commits

This slows down development and breaks workflow momentum.

We wanted to solve a simple but high-impact problem: What if pipeline failures could explain themselves?


💡 What it does

PipeMedic is an AI-powered GitLab agent that diagnoses failed pipelines by analyzing:

  • failing jobs
  • job logs
  • recent commits and diffs

It provides a structured response including:

  • Failure summary
  • Likely root cause
  • Evidence from logs
  • Recommended next step
  • Whether rerunning the pipeline will help
  • Confidence level

Instead of reading logs, developers get instant, actionable insights.


🛠️ How we built it

We built PipeMedic using the GitLab Duo Agent Platform.

  • Created a custom agent (agent.yml)
  • Designed a flow (flow.yml) to analyze pipeline context
  • Integrated GitLab tools:
    • get_pipeline_failing_jobs
    • get_job_logs
    • list_commits
    • get_commit_diff
  • Designed a structured prompt for consistent diagnosis output

The system works directly inside GitLab using Duo, making it part of the developer workflow.


⚙️ Challenges we ran into

  • Understanding the correct schema for agent and flow configuration
  • Fixing CI validation errors (placeholders, missing fields, schema issues)
  • Handling tool integration incrementally to avoid runtime failures
  • Ensuring outputs were structured, useful, and not overly verbose

🧠 What we learned

  • How to build workflow-driven AI agents (not just chatbots)
  • How to integrate AI into real developer workflows
  • Importance of structured outputs for usability
  • How GitLab Duo Agents can automate real DevOps tasks

🚀 Why it matters

PipeMedic reduces time spent debugging pipelines by:

  • eliminating manual log scanning
  • providing clear root cause analysis
  • guiding developers to the fastest fix

It turns pipeline failures into quick decisions instead of long investigations.


🔮 Future improvements

  • Automatic fix suggestions
  • Issue creation for failures
  • Historical failure pattern analysis
  • Integration with data engineering tools like Airflow and dbt

👨‍💻 Who it's for

  • Developers
  • DevOps engineers
  • Data engineers working with CI/CD pipelines

PipeMedic is designed as a practical AI teammate for real-world development workflows.

Built With

  • agent
  • ai/llm
  • ci/cd
  • duo
  • gitlab
  • platform
  • yaml
Share this project:

Updates