# Fix errors with AI SRE

[video]
url = "https://www.youtube.com/watch?v=gVwUnqTUbfM"
[/video]

Hand any error to AI SRE and get a pull request back. It reads the stack trace, related logs and recent releases to find the root cause, then opens a fix on GitHub or GitLab for you to review.

[more]

Here's how to fix errors with AI SRE.

## Turn an error into a pull request

**See a new error?** Hand it to AI SRE. It analyses the stack trace, related logs, environment, and recent releases to find the root cause. Connect your GitHub or GitLab and get a pull request with the fix. Review, merge, done.

Hand your next error to [AI SRE](https://betterstack.com/ai-sre).

## Prefer to drive the fix locally?

![block2-ai-prompt.png](https://imagedelivery.net/xZXo0QFi-1_4Zimer-T0XQ/22c78850-c86b-4a6a-92ab-1fedf0c56700/lg2x =3014x1326)

**Use our MCP server or copy a ready-to-use prompt to investigate any error.** Better Stack MCP reads errors, stack traces, logs, releases, and all other data AI SRE can. Our pre-made prompts contain all the important details out-of-the-box and they are customizable. Once done with analysis, just ask your local agent to fix the error.

Install [Better Stack MCP server](https://betterstack.com/docs/getting-started/integrations/mcp/) or use our [AI prompts](https://betterstack.com/docs/errors/using-the-product/fix-with-ai/).

## Fix errors on the go

![block3-ios-aisre-pr.png](https://imagedelivery.net/xZXo0QFi-1_4Zimer-T0XQ/702cbbaa-1d21-4191-4a2d-12d6ac03ff00/lg2x =4978x2556)

**Got a notification for a critical error?** Start a new AI SRE chat from the Better Stack iOS and Android apps. Ask it to list recent errors, pick one, then tell it to investigate and ship a fix as a pull request.

Need to check back on AI SRE? Jump back into the same chat in the app or [on Better Stack](https://chat.betterstack.com/team/0/chats).

Download our [iOS](https://apps.apple.com/app/better-stack-on-call/id6739978181) and [Android](https://play.google.com/store/apps/details?id=com.betteruptime.BetterStack) apps.

## Not using Better Stack Error tracking yet?

**Start sending errors to Better Stack in 5 minutes.** Simply swap a token in your Sentry SDK and you're done. No re-integration needed. Each error costs a sixth of Sentry's price.

Start using [Sentry-compatible error tracking](https://betterstack.com/docs/errors/start/).