← All integrations

Sentry AI agent integration

Anlyon's Sentry integration gives an AI agent named Sentry actions to call through Anlyon's API: it can read issues and their events, and assign, prioritise, resolve and archive them. Each of your users connects their own Sentry account with a key they create in Sentry, and your company's account connects the same way. Your agent calls each action by name and never holds the key.

Let an agent triage your error queue without burying a live problem. It reads issues and their events, assigns, prioritises and reopens freely, and resolving or archiving one can wait for a person.

This page covers Anlyon's own Sentry integration, while Sentry's official MCP server and how to add it to a client are on the Sentry MCP server page.

Sentrysecret · SENTRY
host
sentry.io
connect
API key, per user
  • Resolve issue

    sentry-resolve-issue

  • Reopen issue

    sentry-reopen-issue

  • Assign issue

    sentry-assign-issue

  • Unassign issue

    sentry-unassign-issue

writes are off until switched on

What can an AI agent do in Sentry? Writes are off until you switch them on.

Each one is a named operation from the pack. Reads change nothing.

Writes

  • Resolve issue

    read back

    sentry-resolve-issue

    Resolve one issue.

  • Reopen issue

    read back

    sentry-reopen-issue

    Reopen one resolved or archived issue.

  • Assign issue

    read back

    sentry-assign-issue

    Assign one issue to a member of the organization, by their primary email address.

  • Unassign issue

    read back

    sentry-unassign-issue

    Remove the assignee from one issue, so nobody owns it.

  • Assign issue to team

    read back

    sentry-assign-issue-to-team

    Assign one issue to a team, by the team's id (see list-teams).

  • Resolve issue in next release

    read back

    sentry-resolve-issue-in-next-release

    Resolve one issue in the next release: Sentry treats it as fixed from the next release of its project on and reopens it as a regression if it happens again after that. The project needs release tracking.

  • Archive issue

    read back

    sentry-archive-issue

    Archive one issue, which hides it from the unresolved list and stops its alerts: until_escalating brings it back if it starts happening much more often, forever keeps it archived.

  • Archive issue for duration

    read back

    sentry-archive-issue-for-duration

    Archive one issue for a fixed time, after which it returns to unresolved: 30 minutes, 2 hours, 6 hours, 1 day or 1 week.

  • Set issue priority

    read back

    sentry-set-issue-priority

    Set one issue's priority to high, medium or low; Sentry then stops changing it automatically.

  • Bookmark issue

    read back

    sentry-bookmark-issue

    Bookmark one issue for the token's user, or remove the bookmark with bookmarked false.

  • Mark issue seen

    read back

    sentry-mark-issue-seen

    Mark one issue as seen by the token's user, or as unseen with seen false.

Reads

  • List projects

    sentry-list-projects

    List the organization's projects, 25 per page: slug, name, platform, teams and environments. For the next page pass cursor 25:1:0, then 25:2:0 and so on (Sentry's Link header with the cursor is not passed back).

  • List issues

    sentry-list-issues

    Search the organization's issues with Sentry's search syntax, 25 per page, without the per-issue event graphs: title, status, level, priority, assignee, counts, first and last seen, project. Without query Sentry shows is:unresolved. Sentry returns the next page's cursor only in a Link header, which is not passed back, so to read further sort by date and repeat with the last issue's lastSeen as a filter (for example query is:unresolved lastSeen:<2026-10-14T10:00:00), or pass a cursor you already have.

  • Get issue

    sentry-get-issue

    Get one issue: title, status and substatus, level, priority, assignee, counts, first and last seen, tags, and its activity, which includes comments, assignments and status changes.

  • List issue events

    sentry-list-issue-events

    List one issue's error events, newest first, 20 per page, without stack traces: event id, time, message, user, tags and release. For the next page pass cursor 0:20:0, then 0:40:0 and so on (Sentry's Link header with the cursor is not passed back).

  • Get issue event

    sentry-get-issue-event

    Get one event of an issue in full, including the stack trace, breadcrumbs, request, tags and contexts. event_id is an event's id, or latest, oldest or recommended (the one Sentry shows first). A large event can be cut at 64 KB.

  • List releases

    sentry-list-releases

    List the organization's releases, most recent first, 20 per page: version, dates, new issue count, commit and deploy counts and projects. Needs the project:read scope. For the next page pass cursor 20:1:0, then 20:2:0 and so on (Sentry's Link header with the cursor is not passed back).

  • List teams

    sentry-list-teams

    List the organization's teams, 25 per page, without their projects: id, slug, name and member count. Use the id to assign an issue to a team. For the next page pass cursor 25:1:0, then 25:2:0 and so on (Sentry's Link header with the cursor is not passed back).

How do users connect? Each one brings their own Sentry.

  1. 1.Call for the userYour server invokes the action for the signed-in user. Without a Sentry connection, the SDK throws EndUserNotConnectedError with a connect link.
  2. 2.The user pastes a keyThe link opens a form that shows where in Sentry's settings to create the key. The link lasts 10 minutes and works once.
  3. 3.Anlyon checks itThe key is checked with Sentry before it is kept, and bound to sentry.io. It is never shown back.
  4. 4.Your server confirmsYour server confirms the connection for the user who is signed in, and the call goes through.

How do I control what an AI agent does in Sentry? Suggested limits and approvals, for you to review.

Suggested limits

  • 100 issues resolved a day
  • 100 issues reopened a day
  • 200 issues assigned a day
  • 200 issues unassigned a day
  • 200 issues assigned to a team a day
  • 100 issues resolved in the next release a day
  • 100 issues archived a day
  • 100 issues archived for a time a day
  • 200 priorities set a day
  • 200 bookmarks changed a day
  • 500 issues marked seen a day

Suggested approvals

  • A person approves resolving an issue
  • A person approves resolving an issue in the next release
  • A person approves archiving an issue
  • A person approves archiving an issue for a time

What the key must allow

  • An auth token you create
  • org:read, project:read and event:write, and nothing else

Good to know

  • Organizations on sentry.io. A self-hosted Sentry cannot be connected yet.
  • A status read-back can match a change someone else made in the same moment.

For your own account

  1. 1.In Sentry, open Settings, Developer Settings, and create a personal token or an internal integration.
  2. 2.Give it org:read and event:write.
  3. 3.In Anlyon, open Actions, then Integrations, choose Sentry and paste the token.
  4. 4.Anlyon checks the token with Sentry before storing it. It becomes a secret named SENTRY, bound to sentry.io.

How do I call Sentry from my agent's code? For one of your users, or for your own account.

Act for one of your users from your server, or connect your company's own Sentry with the CLI.

sentry.ts
import { Client, EndUserNotConnectedError } from "@anlyonhq/sdk";const anlyon = new Client({ apiKey: process.env.ANLYON_API_KEY! });try {  const { data } = await anlyon    .forUser(session.userId)    .actions.invoke("sentry-assign-issue", {      organization: "acme",      issue_id: "4509877862",      assignee_email: "dana@example.com"    });  return { status: "done", grade: data.grade };} catch (error) {  if (error instanceof EndUserNotConnectedError) {    // The user connects their own Sentry, then you call again.    return { status: "connect_required", url: error.connectUrl };  }  throw error;}

Questions. Sentry and AI agents.

Anything still unanswered is worth an email.

support@anlyon.com

Email us

Connect a Sentry account in Anlyon, switch on the operations the agent may use, and call them from the TypeScript or Python SDK or over MCP. Each of your users connects their own account through a connect link, where they paste a key they create in Sentry. Your agent sees the operations by name and never sees the credential.

Through Anlyon it can read issues and their events, and assign, prioritise, resolve and archive them. Reads change nothing. Writes are off until you switch them on, and every write leaves a receipt.

Yes. Every Sentry action you enable is also an MCP tool on Anlyon's hosted MCP server, at https://api.anlyon.com/mcp. Add that address to Claude Code, Cursor or Codex and sign in. This is Anlyon's integration, not Sentry's own MCP server, which has its own page here: Sentry MCP server.

No. The key stays with Anlyon and is sent only in the request to Sentry's API. No API returns it, to you, to the console or to an agent.

Let your agent act for your users, safely.

A few lines of server code, then send a user a connect link. Nothing to host.

$ claude mcp add --transport http anlyon https://api.anlyon.com/mcp