> ## Documentation Index
> Fetch the complete documentation index at: /docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Let AI Agents Triage Sentry Errors

> Let agents read Sentry error events, triage and resolve issues, and track releases. Connect with OAuth, and the gateway keeps tokens out of the agent.

## Overview

Buckle connects AI agents to Sentry through OAuth. Agents can read error events, manage issues, view project and team info, and work with releases. The gateway injects OAuth credentials into requests to the Sentry API automatically.

> [!NOTE]
>
> On self-hosted Buckle, Sentry needs your own Sentry app first. See [Self-hosted](#self-hosted).

## What you will set up

* A Sentry connection through OAuth
* Automatic token injection on Sentry API requests
* Per-agent, per-tool access to issues and releases

## Setup

**1. Open the app**

Open the Buckle dashboard and navigate to **Settings** > **Apps** > **Sentry**.

**2. Authorize**

Click **Connect Sentry**. You'll be redirected to Sentry to authorize Buckle. Review the requested permissions and click **Authorize**.

![Buckle connect window for Sentry on Cloud, showing the Connect to Sentry button.](https://mintcdn.com/onecli-17d3f772/h1DTAVlDkLshz4JZ/images/integrations/sentry/buckle-connect-sentry.png?fit=max\&auto=format\&n=h1DTAVlDkLshz4JZ\&q=85\&s=ece0751cce397658a8225eea6c3aecb6)

The Sentry connect window on Buckle Cloud.

**3. Verify**

After authorization, you'll be redirected back to the dashboard. The connection will show as **Connected** with your Sentry account email.

## Self-hosted: use your own Sentry app

> [!NOTE]
>
> **Skip this section on Buckle Cloud.** It's only for self-hosted Buckle without `SENTRY_CLIENT_ID` and `SENTRY_CLIENT_SECRET` set, or if you want your own company name on Sentry's consent screen.

> [accordion] 1. Create the Sentry integration
>
> In Sentry, open **Settings** > **Developer Settings** > **Custom Integrations** > **Create New Integration**, and choose **Public Integration**. Name it `Buckle`.
>
> ![Sentry Developer Settings on the Public Integration tab, with the Create New Integration button and a Buckle integration listed.](https://mintcdn.com/onecli-17d3f772/h1DTAVlDkLshz4JZ/images/integrations/sentry/01-provider-setup.png?fit=max\&auto=format\&n=h1DTAVlDkLshz4JZ\&q=85\&s=7a9e13f6ea894d44777ce36ccba90391)
>
> Sentry's Developer Settings: create the integration under Public Integration.

> [accordion] 2. Add the redirect URL
>
> In Buckle, open **Settings** > **Apps** > **Sentry** > **Custom credentials** and copy the **Redirect URI**. In Sentry, paste it into **Redirect URL**.
>
> ![Buckle Custom credentials card for Sentry with the setup guide link, the Redirect URI and its copy button, and the client ID and secret fields.](https://mintcdn.com/onecli-17d3f772/h1DTAVlDkLshz4JZ/images/integrations/sentry/buckle-custom-credentials-sentry.png?fit=max\&auto=format\&n=h1DTAVlDkLshz4JZ\&q=85\&s=d11ca975eb71874b3151f9cbcecda901)
>
> Copy the Redirect URI from Custom credentials in Buckle.

> [accordion] 3. Set the permissions
>
> Under **Permissions**, set these so they cover what Buckle requests (`org:read`, `project:read`, `project:releases`, `event:read`, `event:write`, `team:read`, `member:read`):
>
> | Resource | Level |
> | - | - |
> | **Project** | Read |
> | **Release** | Admin |
> | **Issue & Event** | Read & Write |
> | **Team**, **Member**, **Organization** | Read |
>
> Save the integration.

> [accordion] 4. Connect with your integration
>
> Copy the integration's **Client ID** and **Client Secret** under **Credentials**. Paste both into **Settings** > **Apps** > **Sentry** > **Custom credentials**, select **Save credentials**, then **Connect** and authorize in Sentry.

## What agents can do

| Area | Description |
| - | - |
| **Events & Issues (read)** | Read errors, exceptions, and performance events. View issue details, tags, and stack traces |
| **Manage Issues (write)** | Resolve, archive, and update issues. Assign issues to team members |
| **Projects** | View project info, settings, and configurations |
| **Releases** | Manage releases, source maps, and deploys |
| **Organization** | Read organization data and settings |
| **Teams & Members** | View team membership, settings, and organization member info |

## Use cases

* Coding agents that check for regressions after deploying
* On-call agents that triage and resolve Sentry issues
* Monitoring agents that track error rates and alert on spikes
* Release management agents that tag deploys and upload source maps

## Controlling access

Access is per agent: [grant](/docs/guides/agent-access.md) the connection to each agent that needs it, choosing per tool what runs freely, what needs human approval, and what stays blocked — a read-only agent is a single grant. Organization [rules](/docs/guides/rules.md) add guardrails on top, like rate limits and blanket blocks. Everything is checked before credential injection, so a blocked request never reaches Sentry.

## FAQ

> [accordion] Does the agent see my Sentry token?
>
> No. The token stays in Buckle, and the gateway adds it at the proxy. See [How it works](/docs/how-it-works.md).

> [accordion] Can an agent read errors without changing issues?
>
> Yes. A read-only agent is a single [grant](/docs/guides/agent-access.md).

> [accordion] How do I reconnect Sentry?
>
> Open **Settings** > **Apps** > **Sentry** and connect again. Agents with access use the new connection automatically.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.