Autonomous Sentry issue remediation agent built with Google ADK-Go.
Receives Sentry error events via webhook, analyzes the error, searches the codebase for context, plans and implements a fix in an isolated sandbox, opens a PR, and monitors for regressions — all autonomously. Communicates via Slack.
Sentry Webhook → Triage → Code Search → Plan → Fix → PR → Slack Notification
↑
GitHub PR Merged Webhook → Mark Resolved → Monitor Regressions
| Agent | Role | Tools | Output |
|---|---|---|---|
| TriageAgent | Analyze Sentry event, extract stacktrace | get_sentry_event, update_issue_status |
triage |
| CodeSearchAgent | Search repo for error context | search_code, search_code_github, read_file, list_files |
code_context |
| PlanAgent | Plan minimal fix | (LLM reasoning only) | fix_plan |
| FixAgent | Edit files in sandbox | read_file, write_file, search_code, get_diff, commit_and_push |
fix_result |
| PRAgent | Create PR, notify Slack | create_pull_request, slack_post, update_issue_status |
pr_result |
- Sentry fires webhook on new issue → agent creates tracking entry + Slack thread
- Pipeline runs: triage → search → plan → fix → PR
- GitHub fires webhook when PR is merged → agent resolves Sentry issue
- If Sentry fires a regression webhook → agent notifies Slack
- Go 1.21+
- A Gemini API key
- Sentry auth token + organization
- GitHub personal access token (repo scope)
- Slack bot token (chat:write scope)
cp .env.example .env
# Edit .env with your credentialsKey: REPO_MAPPING maps Sentry project slugs to GitHub repository names:
{"my-sentry-project": "my-github-repo"}make build
make runmake install-service
sudo systemctl start sentry-agent
make logs # follow logsConfigure these in Sentry and GitHub:
| Service | URL | Events |
|---|---|---|
| Sentry | https://your-host:8080/webhooks/sentry |
Issue alerts |
| GitHub | https://your-host:8080/webhooks/github |
Pull request events |
GET /health— health checkGET /issues— list tracked issues (optional?status=pr_open&limit=50)POST /webhooks/sentry— Sentry webhook receiverPOST /webhooks/github— GitHub webhook receiver