Inspiration

Every maintainer knows the pain: a constant stream of issues with vague titles, missing labels, no severity, and no obvious owner. Triage often takes 5–10 minutes per issue before real work can even begin. High-severity bugs get buried next to feature requests, duplicates pile up, and regressions can go unnoticed until they turn into incidents.

We wanted to turn that entire process into a single @mention.

What it does

Mention the Issue Triage Agent on any GitLab issue, and within seconds it reads the issue and discussion, classifies it as bug, feature, or support, assigns a severity and confidence score, searches for likely duplicates, and detects escalation patterns such as multiple similar issues that may indicate a regression.

It then posts a structured triage comment with:

category severity confidence suggested labels suggested owner missing information recommended next steps

When information is incomplete, it asks the reporter targeted follow-up questions. When confidence is high enough, it can also apply labels automatically.

How we built it

We built Issue Triage Agent as a public GitLab Duo custom flow using the Agent Platform’s v1 flow registry. The core implementation is a single YAML flow file that orchestrates GitLab tools through a carefully designed system prompt.

The flow uses these GitLab tools:

get_issue list_issue_notes gitlab_issue_search list_issues create_issue_note update_issue

Project-specific rules such as label taxonomy, severity rubric, routing logic, and duplicate or escalation thresholds live in AGENTS.md, which GitLab automatically injects into the agent’s runtime context.

That means the project is highly customizable without requiring any external infrastructure, custom backend, or separate database. It is built entirely on top of the GitLab platform.

Challenges we ran into

The biggest challenge was project context resolution.

The trigger provides a numeric project ID, but API calls using that ID returned 404 errors. To solve this, we engineered the prompt to extract the project path from AGENTS.md, then use the URL-encoded path for subsequent tool calls. Debugging this required inspecting CI pipeline logs carefully to understand exactly what context the agent receives at runtime.

We also had to calibrate the confidence scoring and ask-back behavior so the agent knows when to act automatically and when to request more information from the reporter.

Accomplishments that we're proud of

We’re proud that the agent does more than just classify issues — it actually moves them forward.

The follow-up questions are specific to what is missing, the escalation detection helps identify potential regressions early, and the confidence score is designed to reflect real uncertainty rather than pretending to know more than it does.

We’re also proud that the full solution is extremely lightweight: just a few files, zero external dependencies, and no custom infrastructure. Using AGENTS.md as grounding makes the flow easy to adapt to different projects without changing the main logic.

What we learned

We learned that prompt engineering for tool-calling agents is very different from writing prompts for chat.

Instruction order matters a lot. Critical setup, such as resolving the correct project path, must appear before workflow steps rather than being buried inside them.

We also learned that GitLab automatically injecting AGENTS.md into the agent context is a powerful pattern. It enables project-specific behavior and configuration without requiring file access tools or extra integration code.

What's next for Issue Triage Agent

  • Auto-assignment: route issues to the right person based on ownership signals and recent activity
  • Cross-project escalation detection: identify regression patterns across repositories in the same group
  • Learning from maintainer corrections: improve future triage based on label or classification changes
  • Merge request triage: extend the same workflow to incoming MRs
  • Slack or webhook notifications: alert on-call teams when escalation patterns are detected

Built With

  • agents.md
  • gitlab-api
  • gitlab-ci/cd
  • gitlab-duo-agent-platform
  • gitlab-duo-custom-flows-(v1-flow-registry)
  • yaml
Share this project:

Updates