• RECONSTRUCTION
  • TRIAGE
  • ANALYSIS
  • HUMAN

How to debug user sessions with your AI agent

Connect Raygun to your agent to turn vague error reports into detailed session reconstructions. You'll move from knowing an error happened to seeing exactly what the user did.

Ask AI about this page

Short answer

How do I debug user sessions with my AI?

Your AI uses Raygun to find specific session IDs and pull the exact metadata associated with them. This lets you reconstruct the user's path and the state of the application at the moment of failure. You get a clear picture of the error context without manual searching.

Where every session lands.

The outcomes of session debugging

Once connected, your AI handles the heavy lifting of data retrieval so you can focus on the fix.

RECONSTRUCTION

Full session playback

The AI pulls the specific metadata needed to rebuild the user's journey. You see the exact sequence of events leading to the crash.

TRIAGE

Error context retrieval

Your agent identifies the specific error details and user environment. It separates noise from the actual root cause.

ANALYSIS

Pattern recognition

The AI compares multiple sessions to see if a specific browser or device is causing the issue. You get a summary of commonalities.

HUMAN

Final code fix

The AI provides the data, but you decide on the patch. You use the session details to write and test the actual code change.

The workflow

What your AI does when a failure occurs.

The AI acts as a bridge between your error reports and the raw RUM data in Raygun.

  1. Establish connection

    The agent secures access to your Raygun account to begin querying session data.

    rum_authenticate
  2. Locate the failure

    Your AI searches through your RUM data to find the specific sessions that match your error criteria.

    rum_search_sessions
  3. Extract session details

    The agent pulls the granular metadata for a single session to see the exact state of the user's environment.

    rum_get_session
  4. Synthesize findings

    The AI combines the retrieved metadata into a coherent explanation of why the session failed.

    rum_get_session

Try it

Copy these to start.

Use these prompts to kick off a debugging session with your agent.

Starting points

These are starting points. Replace the specific session IDs or error types with your own data.

Raygun Connector

You're all set. Choose your MCP client and follow the setup instructions.

Connector linkhttps://edge.vinkius.com/vk_preview_QpfOtHUiSame8oggeIDGUEXJk4SI9HG2gUoF0CTJ/mcp

Claude Desktop

Follow the steps below to connect in seconds.

  1. 1In Claude Desktop, open Settings → Connectors.
  2. 2Click “Add custom connector” and paste the connector link above as the remote MCP server URL.
  3. 3Click Add and start a new chat — Raygun capabilities are ready to use.
Configuration · claude_desktop_config.jsonCopy
{
  "mcpServers": {
    "raygun-mcp": {
      "url": "https://edge.vinkius.com/vk_preview_QpfOtHUiSame8oggeIDGUEXJk4SI9HG2gUoF0CTJ/mcp"
    }
  }
}
Copy into chat04
  • Find the session metadata for session ID 12345 in Raygun.

  • Search for all sessions in Raygun that experienced a JavaScript error in the last hour.

  • Get the details for the most recent failed session so I can see the user's browser info.

  • Look through Raygun sessions to find patterns in users hitting the checkout error.

  • Claude
  • ChatGPT
  • Cursor
  • VS Code
  • Windsurf
  • Claude Code
  • JetBrains
  • Cline

Start here

Connect Raygun once, then ask.

You only need to link your account once. Your credentials stay encrypted, and you can immediately start asking your AI about your RUM data.

Connect Raygun to your AI

FAQ

How the debugging task behaves

  • 01

    Can the AI fix the code for me?

    No. The AI retrieves the session data and explains the error, but you must write and deploy the actual code fix.

  • 02

    Can the AI delete sessions in Raygun?

    No. The tools only allow for authentication, searching, and retrieving session data. The AI cannot modify or delete your Raygun data.

  • 03

    Does the AI see my Raygun password?

    No. Your login credentials are encrypted and handled securely by Vinkius.

  • 04

    Can I use this to find errors in real-time?

    Yes. You can ask the AI to search for recent sessions that match specific error criteria as they happen.

  • 05

    How does the AI know which session to look at?

    You provide the session ID or the error criteria in your prompt, and the AI uses the search tools to find the right data.

  • More questions about Raygun? See everything the Raygun Connector can do

Connect Raygun to Claude, Cursor, ChatGPT & more