โ—† Oryn
Docs โ€บ User โ€บ Browser & Web Tools

๐ŸŒ Browser & Web Tools

Let the agent browse the web, automate your app, and run repeatable UI tests โ€” all from a plain-language prompt.

Overview

Browser & Web Tools give the Oryn agent a full set of capabilities for interacting with the internet and your running web app. The agent can fetch pages and search the web for reference material, drive a real headless Chromium browser to click, fill forms, and take screenshots, and record user-like interactions then replay them as automated Playwright tests. Together these tools let you ask the agent to do anything from "look up the latest API docs" to "fill out the signup form on my local dev server and tell me if it works".

How it works

Three MCP servers wire up the capabilities. The `web-mcp` server provides lightweight HTTP fetch and web search (via SerpAPI) without spinning up a browser. The `browser-mcp` server launches a headless Chromium instance through Playwright and exposes individual actions โ€” navigate, click, fill, screenshot, accessibility snapshot, console log capture โ€” as well as a batch `execute_steps` tool for multi-step flows. Site structure is pre-loaded by the `site-analyzer` MCP, which statically inspects your React/Next/Vite workspace and writes a `.oryn/site-knowledge` JSON file; the browser agent imports that file so it automatically receives route, form, modal, and component context alongside every page it visits. Recorded user interactions are handled by the `BrowserTestController` (.NET backend), which stores step sequences, generates Playwright TypeScript test scripts, and can replay them on demand via `npx playwright test`.

What you can do

Web FetchFetches any public HTTP/HTTPS URL and returns up to 100 KB of its text content for the agent to read or summarise.
Web SearchRuns a web search query and returns ranked result titles, links, and snippets (requires a SerpAPI key configured by your admin).
Headless Browser NavigationOpens URLs in a persistent headless Chromium session and reports the page title, URL, and HTTP status.
Click & Fill AutomationClicks elements by CSS selector (left, right, or middle button) and fills inputs or textareas with a given value, matching how a real user interacts.
ScreenshotsCaptures a PNG screenshot of the full page or a specific CSS selector region and returns the image inline so you can see what the agent sees.
Accessibility SnapshotDumps the page's accessibility tree (using Playwright ariaSnapshot or Chromium CDP) so the agent can reason about interactive elements without relying on visual layout.
Console & Network Log CaptureBuffers up to 500 browser console messages, page errors, and failed network requests that the agent can read to diagnose runtime problems.
Batch Step ExecutionRuns up to 50 ordered browser actions (navigate, click, fill, key press, wait) in a single call and returns combined results, logs, and page metadata.
Site Knowledge ImportLoads a pre-analysed site-knowledge JSON file so the agent automatically receives route, form, modal, and component context for every page it visits.
Site AnalyzerStatically analyses a React/Next/Vite workspace to discover routes, components, interactive elements, forms, modals, and TypeScript data types, and writes the result to .oryn/site-knowledge/.
Browser Test RecordingRecords a named sequence of user-like steps (click, fill, press, expect-text, screenshot, wait) tied to a starting URL.
Playwright Script GenerationAutomatically converts a finished recording into a runnable Playwright TypeScript test file (replay.spec.ts) stored as an audit artifact.
Test ReplayRe-runs a generated Playwright script via npx playwright test and returns exit code, stdout/stderr, and a persisted replay-output.log for CI or audit purposes.

How to use it

  1. Ask the agent to open a page or search the web
    Type a plain-language prompt such as 'Open https://example.com and tell me what is on the page' or 'Search the web for the latest release notes for Tailwind CSS v4'. The agent picks the right tool automatically โ€” web_fetch or web_search for read-only lookups, browser_navigate when it needs a real rendered page.
  2. Let the agent interact with the page
    For tasks that require interaction โ€” logging in, filling a form, clicking through a wizard โ€” just describe what you want: 'Go to http://localhost:3000/signup, fill in the email and password fields, and submit the form'. The agent will use browser_fill and browser_click in sequence, waiting for elements to appear before acting.
  3. Review screenshots or accessibility data
    After the agent acts it can take a screenshot so you can confirm what happened, or dump the accessibility tree so it can reason about the current state of the UI. Ask 'take a screenshot of the result' or the agent will do this automatically when it needs to verify the outcome.
  4. Check logs if something looks wrong
    Ask 'show me the browser console logs' to see any JavaScript errors, warnings, or failed network requests captured during the session. This is useful for debugging form submissions, API calls, or page-load problems in your app.
  5. Record and replay a user flow as a test
    Ask 'record a browser test called checkout-flow starting at http://localhost:3000/cart'. Describe the steps you want captured. When you are done, say 'stop the recording'. The agent stops the recording, generates a Playwright TypeScript spec, saves it as an artifact, and can immediately replay it to confirm it passes.
  6. Improve agent accuracy with site knowledge
    For your own app, ask 'analyse my site and import the knowledge'. The site-analyzer MCP scans your workspace, writes a site-knowledge JSON file to .oryn/site-knowledge/, and the browser agent imports it so subsequent interactions benefit from pre-loaded route, form, and component context.

Example

Prompt: "Go to http://localhost:5173/login, fill in email 'alice@example.com' and password 'hunter2', click the Sign In button, then take a screenshot and show me any console errors." What happens: The agent calls browser_navigate to open the login page, uses browser_fill twice to populate the email and password inputs by CSS selector, calls browser_click on the submit button, waits for navigation to complete, calls browser_screenshot to capture the resulting page as a PNG (shown inline in chat), and finally calls browser_console_logs to report any JavaScript errors or failed requests that occurred during the login attempt โ€” all without any manual steps from you.

Admin notes

Web search requires a SerpAPI key set as the SERPAPI_KEY environment variable on the machine running the web-mcp server; without it the tool returns an informative error and no search results are returned. The web_fetch tool blocks requests to loopback, private (RFC-1918), and link-local addresses (including cloud metadata endpoints such as 169.254.169.254) to prevent server-side request forgery; this is enforced in code and cannot be overridden at runtime. Browser test recording artifacts and generated Playwright scripts are stored under ORYN_STATE_DIR/browser-test-artifacts/ (defaults to the OS application-data folder); ensure this path has adequate disk space for larger projects. The npx executable used to replay tests can be overridden with the ORYN_NPX_EXECUTABLE environment variable if your Node installation is in a non-standard location. Screenshot and browser actions are confined to the ORYN_WORKSPACE directory when file paths are involved. Playwright/Chromium must be installed (run npm run install-browsers once inside mcp-servers/browser-mcp after npm install) before the headless browser tools are available.

Related