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

# AI Agent

> Your research assistant for analyzing session data, finding patterns, and answering complex questions about user behavior

## Your AI Research Partner

The AI Agent is your dedicated research assistant, built directly into the Rehearsals dashboard. It doesn't just search your data—it actively **watches session replays**, **queries your database**, and **searches the web** to answer your questions with evidence.

> [!NOTE]
>
> The Agent has access to all your session data, including custom events, user paths, and technical logs. It respects your project's privacy settings and PII redaction rules.

## What the Agent Can Do

The Agent uses specialized tools to investigate your questions:

> **Watch Sessions**
>
> Watches hundreds of session replays at 100x speed to identify visual patterns—like users rage-clicking on a broken button or hesitating at a confusing form field.

> **Query Your Data**
>
> Writes and runs SQL queries to find statistical trends, such as drop-off rates by device type or conversion differences between user segments.

> **Search the Web**
>
> Searches external documentation and industry benchmarks to provide context—like whether a 2% conversion rate is typical for your industry.

## Research Modes

Toggle between two modes depending on your needs:

| Mode | Speed | Best For |
| :- | :- | :- |
| **Speed** | Under 1 min | Simple stats, single-session questions, or quick sanity checks |
| **Accuracy** | 5–10 mins | Complex, ambiguous questions requiring deep analysis across many sessions |

> [!TIP]
>
> Start with Speed mode for quick answers. If the Agent suggests it needs more context or the answer isn't definitive, switch to Accuracy mode for deeper investigation.

## Example: Debugging a Drop-Off

Here's how you might use the Agent to investigate a conversion problem.

**1. Ask an open-ended question**

Open the Agent panel and ask:

> "Why are users dropping off during the sign-up flow?"

The Agent identifies the sign-up pages, runs queries to pinpoint the highest drop-off step, and watches sessions comparing users who completed vs. abandoned the flow.

**2. Review the insight**

The Agent might respond:

> "40% of drop-offs happen on the 'Verify Email' step. In 8 out of 10 sessions I watched, users switched tabs to check their email but never came back."

**3. Dig deeper**

Ask a follow-up to validate a hypothesis:

> "Is this happening more on mobile or desktop?"

The Agent segments by device: "Mobile shows 60% drop-off compared to 15% on desktop."

**4. Get recommendations**

Finally, ask for actionable advice:

> "What are best practices to fix this?"

The Agent searches industry standards and suggests solutions like magic links or auto-filling OTP codes on mobile.

## Filtering and Interactions

The Agent can apply filters to narrow down exactly which sessions to analyze:

```text theme={null}
"Show me all sessions where a user on mobile in the US failed to checkout"
```

You can layer on interaction-based filters too:

```text theme={null}
"...and where they rage clicked on the payment form"
```

> [!NOTE]
>
> **Interactions** are AI-detected behaviors like rage clicks, dead clicks, and excessive scrolling. Use these to quickly surface sessions with user frustration.

## Sampling

When analyzing large volumes of sessions, the Agent uses intelligent sampling to provide answers quickly while maintaining statistical accuracy.

For definitive answers on edge cases or rare behaviors, switch to Accuracy mode—the Agent will analyze more sessions and cross-reference multiple data sources.

## Best Practices

Treat the Agent like a junior data analyst. Be clear about what you want to know.

> **Be Specific**
>
> Instead of "How's my site doing?" ask "How is checkout conversion trending this week compared to last?"

> **Ask Why**
>
> The Agent shines at qualitative analysis. Asking "Why did this user leave?" triggers it to watch the actual replay.

> **Iterate**
>
> Start broad, then narrow down based on findings. Let the Agent's initial response guide your follow-up questions.

> **Use Natural Language**
>
> You don't need SQL or technical terms. Ask questions as you would to a colleague.

## Next Steps

> **[Sessions & Replays](https://runrehearsals.com/docs/features/platform/sessions/overview)**
>
> Learn how to view, filter, and analyze your session data

> **[Daily Insights](https://runrehearsals.com/docs/features/platform/insights/overview)**
>
> Understand how automated insights surface patterns you might miss


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