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

# Automated PR Creation

> The traceroot Agent writes fixes and opens pull requests on GitHub

After identifying a root cause, the traceroot Agent writes a fix and opens a pull request on GitHub — linked back to the trace that surfaced the issue. Requires setting up [GitHub Integration](https://traceroot.ai/docs/ai-agent/github-integration.md).

## How It Works

1. **Root cause analysis** — the agent identifies the bug (see [Root Cause Analysis](https://traceroot.ai/docs/ai-agent/root-cause-analysis.md))
2. **Write the fix** — modifies the source code in the sandbox
3. **Open the PR** — pushes a new branch and creates a PR on GitHub for you to review

The agent never pushes directly to main.


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