Skip to main content

Browser Listener

With Autodock, you can feed logs from any browser session into your agent. Ask your agent to compare db, server and browser logs to get a full picture of how your app is running.
Mike’s notes: At Veeton, I would regularly ask people on the sales and marketing team to check out my work, and I needed a way to debug their sessions remotely. This feature allowed me to get a complete picture of what’s going on end-to-end.

How It Works

The browser listener lets your AI agent capture real-time data from any browser session:
  • Console logs - All console.log, console.error, console.warn, etc.
  • Network requests - Every fetch/XHR request with method, URL, status, timing, and request/response bodies
  • JavaScript errors - Uncaught exceptions and unhandled promise rejections
  • Screenshots - On-demand page captures

Quick Start

  1. Ask your agent to start a browser listener:
"Start a browser listener so I can debug my webapp"
  1. Your agent will call browser.listen and give you a command to paste in your browser console:
fetch('https://autodock.io/b/xK9mZ2')
  .then((r) => r.text())
  .then(eval);
  1. Paste the command in your browser’s developer console (F12 or Cmd+Option+I)
  2. You’ll see [autodock] Listening... in your console - the listener is now active
  3. Your agent can now poll for events and request screenshots

MCP Tools

browser.listen

Creates a new browser listener session. Parameters:
  • ttlMinutes (optional): Session timeout in minutes (5-60, default: 30)
Returns:
  • token: 6-character session token
  • consoleCommand: The command to paste in browser console
  • expiresAt: When the session expires

browser.poll

Retrieves captured browser events. Parameters:
  • token: The 6-character session token
  • limit (optional): Maximum events to retrieve (1-100, default: 50)
  • sinceMinutes (optional): Only return events from the last N minutes (1-60, default: 5)
Returns:
  • Console logs, network requests, and errors with timestamps
  • Screenshot URL if one was captured
  • Session status

browser.shot

Requests a screenshot from the browser. Parameters:
  • token: The 6-character session token
Note: Screenshots take 10-15 seconds to capture. Call browser.poll after waiting to retrieve the screenshot URL.

browser.stop

Stops a listener session and cleans up resources. Parameters:
  • token: The 6-character session token

Example Session

User: There's a bug on my checkout page. Can you help debug?

Agent: I'll start a browser listener to capture what's happening.
       [calls browser.listen]

       Paste this in your browser console:
       fetch('https://autodock.io/b/xK9mZ2').then(r=>r.text()).then(eval)

       Let me know when you've done that and triggered the bug.

User: Done! I clicked "Place Order" and it failed.

Agent: [calls browser.poll]

       I can see the issue:
       [12:34:56] ERROR Cannot read property 'id' of undefined
       [12:34:56] NET POST /api/orders -> 500 (142ms)
                  REQ: {"items":[]}
                  RES: {"error":"Cart is empty"}

       The order is failing because the cart items array is empty when
       you click Place Order. Let me check your cart state management...

Stopping the Listener

From the browser console:
autodock.stop();
Or ask your agent to stop it, which will call browser.stop.

Privacy & Security

  • Sessions expire after 30 minutes by default (configurable up to 60 minutes)
  • Sensitive data like passwords, tokens, and auth headers are automatically redacted
  • Request/response bodies are truncated to 2000 characters
  • Screenshots are stored temporarily (5 minutes) and then deleted
  • Each session is isolated to the user who created it