> ## 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 AI agent writes fixes and opens pull requests on GitHub

After identifying a root cause, the AI 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](/ai-agent/github-integration).

## How It Works

1. **Root cause analysis** — the agent identifies the bug (see [Root Cause Analysis](/ai-agent/root-cause-analysis))
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.
