Digitorn
Digitorn
← All use cases
developer

Build a pr triager in YAML

An agent that labels new pull requests, assigns reviewers, and flags risky changes.

triggers.webhookwebbehavior
The pattern

A focused webhook agent that does not review code, only triages. It reads the diff at a high level, assigns labels (needs-review, breaking, docs-only), pings the right team, and posts a one-paragraph summary. Cheap, fast, and the cap on tool calls keeps it that way.

What good looks like
  • Labels and a summary within 60 seconds
  • Right team pinged based on which files changed
  • Risk tags are consistent across PRs
  • Costs under $0.01 per typical PR
Common pitfalls
  • Doing full review work in a triager, defeats the cost model
  • Inconsistent labels because the prompt is vague
  • No turn cap, freak PRs blow the budget
  • Pinging the wrong team during a refactor

The minimum YAML to ship this

app.yaml
1modules:2  web: {}34triggers:5  - id: pr-opened6    kind: webhook7    path: /hooks/pr-triage8    target: { agent: triager, message: "{{event.body.pull_request.title}}" }910behavior:11  rules:12    - condition: tool_calls > 813      action: gate1415agents:16  - id: triager17    modules: [{web: [fetch]}]18    brain: { model: claude-haiku-4-5 }19    system_prompt: "Read the diff at a high level. Tag risk. Be terse."
Ship in 5 minutes

Install Digitorn and deploy this agent

# 1. install runtime
curl -sSL https://digitorn.ai/install | sh

# 2. save the YAML above to ~/.digitorn/apps/my-pr-triager/app.yaml
mkdir -p ~/.digitorn/apps/my-pr-triager
# paste the YAML into app.yaml

# 3. deploy
digitorn deploy my-pr-triager
Newsletter

Get the next post in your inbox.

Engineering notes from the Digitorn team. No marketing, no launch announcements, no "10 prompts that will change your life". Just the things we write that we'd want to read.

One-click unsubscribe. We never share your address. Powered by our own infrastructure, not a tracker.

Other things you can build

communicationSlack copilot/use-cases/slack-botdeveloperAutomated code reviewer/use-cases/code-reviewknowledgeResearch agent with citations/use-cases/research-agentdeveloperDocumentation generator/use-cases/documentation-generatorcommunicationVoice assistant/use-cases/voice-assistantopsScheduled reporter/use-cases/cron-reporterknowledgeMeeting note-taker/use-cases/meeting-notesopsEmail triager/use-cases/email-triagecreativeLive React app builder/use-cases/react-builder