---
title: "SRE Agent"
description: "Investigates production errors from Datadog, Sentry, Coralogix, and Splunk every day, finds the root cause in the code that is running, and opens fix pull requests and tickets."
canonical: "https://baz.ai/docs/agents/maintain/sre-agent"
---

# SRE Agent

Investigates production errors from Datadog, Sentry, Coralogix, and Splunk every day, finds the root cause in the code that is running, and opens fix pull requests and tickets.

The SRE Agent works through your production errors so your team does not have to triage them by hand. Once a day it pulls open issues from your observability tools and traces each new error to its root cause in the code that is deployed. Each issue ends with one recommendation: **Code fix**, **Suppress**, or **Escalate**. Code fixes become pull requests from Fixer.

## What it handles

Errors and exceptions reported by your observability integrations.

It works with [Datadog](/docs/integrations/observability/datadog), [Sentry](/docs/integrations/observability/sentry), [Coralogix](/docs/integrations/observability/coralogix), and [Splunk Observability](/docs/integrations/observability/splunk). From each one it reads the error along with whatever context the tool has, such as traces, logs, and release data, so it can see what really happened.

Each integration maps services or projects to repositories so the agent knows which code to read.

## Why you can trust it

The agent investigates on the exact commit that is running in production, using the stack trace, spans, and logs from your observability tool, so the root cause matches what actually broke. Issues it already investigated are skipped, and known noise is dropped. It proposes a code fix only when it finds a pattern already in your code to follow; otherwise it hands the issue to your team with questions.

### Recommendations

Each issue ends with one recommendation. **Code fix** means the cause is clear and a small fix exists, so you get a Fixer pull request (and a ticket, if you turned that on). **Suppress** means the error is already handled, temporary, or not worth acting on, and you get the reason. **Escalate** means it needs a person, so you get questions for your team.

Code fixes are capped by **Max open fix PRs**.

## What you see

- Fix pull requests that follow your PR conventions, such as `fix: Handle missing customer on invoice webhook` from a `baz/` branch, reviewed by your Build agents
- An **SRE session** in [Sessions](/docs/work/sessions) per run
- Optional tickets for fix pull requests in your ticketing system, and optional Slack posts
- **Insights → Evaluation → Maintain**: production issues discovered and their outcomes

## Prerequisites

- An observability integration ("Agent disabled. Observability platform integration is required." otherwise)
- Write access
- A [sandbox](/docs/integrations/sandbox)
- A payment method or credits

For Datadog, set up service mapping for source code integration so errors link to a repository and commit.

## Settings

Select **SRE Agent** on **Software Factory → Maintain**. The row reads "Trace issues from logs, metrics and alerts to their root cause, and fix them".

**Configure PR conventions for the SRE Agent** sets how its pull requests look.

**Max open fix PRs** caps how many pull requests it keeps open at once (default 3). **PR title prefix** and **PR branch prefix** default to `fix:` and `baz/`.

**Ticketing**: "Automatically create tickets for SRE fix PRs using your connected ticketing system." Choose a **Ticketing system**, then vendor-specific settings such as the Fibery **Project** and **Issue type**.

## Related

<CardGroup cols={2}>
  <Card title="Datadog" href="/docs/integrations/observability/datadog" icon="activity">
    Connect error tracking and map services.
  </Card>
  <Card title="Sentry" href="/docs/integrations/observability/sentry" icon="bug">
    Connect issues and code mappings.
  </Card>
  <Card title="Fixer" href="/docs/agents/build/fixer" icon="wrench">
    How fix PRs are built.
  </Card>
  <Card title="Security overview" href="/docs/security" icon="lock">
    Production is the last defense layer.
  </Card>
</CardGroup>
