AI AGENTS

On-call agent: Sentry error spike to remediation plan and fix PR

On a Sentry issue spike, an agent decides between a runtime shell mitigation and a code fix, then either gates a shell command in Slack or opens a draft GitHub PR.

CategoryAI Agents
Enginepaperclip
Difficultyadvanced
Triggerevent
Steps5
Setup~25 min

How it runs

The automated pipeline, trigger to output.

  • TriggerSentry issue spike alertSentrySentry
  • LogicClassify: infra-transient vs code-defect
  • ActionInfra path: gate shell mitigation in SlackSlack
  • ActionCode path: open draft GitHub fix PRGitHubGitHub
  • OutputComment chosen path on Sentry issueSentrySentry

What it does

Not every alert needs a shell command — some need a code change. This agent triages a Sentry error spike and branches: transient infra issues get a gated shell mitigation, while code defects get a draft GitHub PR with the proposed fix.

When to use it

Use it when your on-call rotation handles both operational blips and recurring code bugs, and you want the agent to route each to the right remediation path.

How it works

  1. 1A Sentry alert fires on an issue frequency spike with stack trace and release.
  2. 2The agent classifies the cause as infra-transient or code-defect.
  3. 3If infra-transient, it drafts a shell mitigation and posts it to Slack for approval, then runs it on Approve.
  4. 4If code-defect, it opens a draft GitHub PR with the proposed change and links it back to the Sentry issue.
  5. 5Either way it comments the chosen path and reasoning on the Sentry issue for the audit trail.

Set it up

What you configure once, before turning it on.

  1. 1
    Connect SentryErrors, performance, releases.
  2. 2
    Connect ShellRun sandboxed commands inside the workspace.
  3. 3
    Connect SlackChannels, DMs, threads, mentions.
  4. 4
    Connect GitHubRepos, issues, pull requests, actions.
  5. 5
    Set each agent's modelWe leave models unset so you pick the tier — fast + cheap, or top-quality.
  6. 6
    Tune it to your dataEdit the prompts, filters, and field mappings so it matches how your team works.
  7. 7
    Test, then turn it onRun once against a sample, confirm the output, then enable the trigger.

Run this workflow in your colony.

14-day trial. No DevOps. No Sales call. Provisioned in under a minute.