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

# Subtext Quickstart: Set Up Session Replay for AI Agents

> Install Subtext, add the capture snippet to your app, and connect your AI coding agent to real production session replay in under 5 minutes.

Subtext gives your AI coding agent — Claude Code, Cursor, Codex, or any agent you already use — direct access to real production session replay. Instead of describing bugs from memory or pasting screenshots, you point your agent at an actual session and let it open the recording, step through events, inspect the UI at any moment, and compare states until it understands what broke and why. Getting to that point takes about five minutes.

## The fast path: setup wizard

The quickest way to install Subtext is the setup wizard. Run it from your project root, answer a few prompts, and it handles everything automatically.

<Steps>
  <Step title="Run the wizard">
    Open a terminal in your project directory and run:

    ```bash theme={null}
    npx @subtextdev/subtext-wizard
    ```

    The wizard detects which AI coding agent you are using — Claude Code, Cursor, Codex, or a custom harness — and tailors the setup to match.
  </Step>

  <Step title="Let the wizard wire up capture">
    The wizard inspects your project, identifies your framework (Next.js, React, Vite, Remix, or plain HTML), and injects the Subtext capture snippet into the right place. The snippet loads `fs.js` from Fullstory's edge network and starts recording every production session. Form inputs are masked automatically from the very first session.
  </Step>

  <Step title="Connect your agent via MCP">
    The wizard configures the Subtext MCP server for your agent and registers the session review skills and slash commands. After this step your agent knows how to call tools like `review-open`, `review-zoom`, `review-snapshot`, and `review-close`.
  </Step>

  <Step title="Verify the connection">
    Once the wizard completes, ask your agent to list recent sessions:

    ```
    /subtext:review
    ```

    Your agent reads the app map, opens a session, and returns a digest of what happened. If sessions appear, setup is complete.
  </Step>
</Steps>

<Tip>
  You do not need to restart your development server to apply the snippet. The wizard confirms the insertion location and exits cleanly — deploy your app as normal and sessions will start appearing within seconds of the first page load.
</Tip>

## What you get after setup

Once the wizard finishes, your agent can:

* **List sessions** with `review-list-sessions` — returns numbered session URLs and timestamps so your agent can pick where to start
* **Open any session** with `review-open` — returns a session handle, the semantic app map, and a digest rollup of what happened
* **Get a static summary** with `review-summary` — returns a frozen "what happened" summary at the default zoom level
* **Zoom into moments** with `review-zoom` — adjusts resolution and time window over the event stream to focus on exactly when something went wrong
* **Capture UI snapshots** with `review-snapshot` — returns a screenshot, component tree, and bounding boxes at any point in the session
* **Close the session** with `review-close` — closes the session handle and records feedback
* **Run privacy governance** — scan sessions for leaking PII, propose masking rules, and promote approved rules to every future session

Your agent also has access to three skills (slash commands) that encode structured workflows: `/subtext:review` for end-to-end session diagnosis, `/subtext:session` for a catalog of session replay tool usage patterns, and `/subtext:shared` for MCP conventions and security rules.

## Prefer to wire things up yourself?

The wizard covers the most common setups. If you use a framework the wizard does not yet support, want precise control over where the snippet is inserted, or need to configure the MCP connection manually, follow the [manual install path](/docs/install/overview).
