sentry-triage-managed-agent

Deploys a scheduled Claude Managed Agent that triages Sentry issues into a daily report.

52.3k|6.2k|Updated Aug 15, 2023
One-click install
npx skills add https://github.com/anthropics/claude-cookbooks --skill sentry-triage-managed-agent
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: sentry-triage-managed-agent
Source: https://github.com/anthropics/claude-cookbooks/tree/main/managed_agents/sentry
Command: npx skills add https://github.com/anthropics/claude-cookbooks --skill sentry-triage-managed-agent

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires anthropic, python-dotenv.

What problem does it solve?

On-call engineers need a prioritized summary of new and escalating Sentry issues each morning, but manually querying Sentry, classifying issues, and writing a triage report is repetitive. This Skill sets up a server-side scheduled Claude Managed Agent that pulls the last 24 hours of Sentry issues with sentry-cli and writes a prioritized triage report, with the Sentry token held in a vault so the model never sees the secret.

Core Features & Use Cases

  • Scheduled server-side triage: A cron deployment (weekday 9 AM Eastern) starts sandboxed sessions on Anthropic infrastructure with no host process running on your machine.
  • Vault-based credential handling: The Sentry auth token is stored as an environment_variable vault credential; an egress proxy substitutes the real token only for allowlisted Sentry hosts, so the sandbox and model only ever see a placeholder.
  • Full lifecycle scripts: setup_agent.py provisions the vault, credential, agent, and environment; deploy.py creates the cron deployment; run_now.py smoke-tests manually and downloads the report; update_agent.py pushes prompt or model changes and re-pins the deployment; runs.py shows run history; teardown.py archives everything.
  • Use Case: An SRE team wants a morning report classifying issues as NEW, REGRESSION, ESCALATING, or ONGOING, ranked by user impact. After setup, the deployment produces TRIAGE_REPORT.md automatically every weekday.

Quick Start

Ask Claude to walk you through setting up the scheduled Sentry triage agent, starting with creating a Sentry auth token and running the setup script.

Frequently Asked Questions about sentry-triage-managed-agent

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I schedule a Claude Managed Agent to run on a cron schedule?

Create a deployment with client.beta.deployments.create, passing the agent ID, environment ID, vault IDs, initial events, and a schedule object with a POSIX cron expression and IANA timezone. Sessions then start automatically on Anthropic infrastructure with no host process required.

How do I give a managed agent an API token without exposing it to the model?

Store the token as an environment_variable vault credential with a networking allowlist of permitted hosts. The sandbox holds only an opaque placeholder, and the egress proxy substitutes the real token only on requests to allowlisted hosts such as sentry.io and *.sentry.io.

Why does sentry-cli return 401 inside the managed agent sandbox?

A 401 means the placeholder was not substituted, usually because the host is missing from the credential's allowed_hosts. Note that *.sentry.io does not cover the apex sentry.io, so both entries must be listed on the credential.

Does updating the agent prompt change what scheduled runs use?

No. A deployment pins the agent version at creation time, so agents.update alone never reaches scheduled runs. You must also call deployments.update with the agent ID to re-pin the deployment to the latest version.

What happens when a scheduled deployment fails permanently?

Permanent failures such as vault_not_found, agent_archived, and environment_archived auto-pause the deployment and set paused_reason. Transient failures like rate limits do not pause it, and every trigger writes a deployment run record with an error code.