Web Driver Plugin
The WebDriverPlugin gives Octopus agents the ability to interact with web browsers — navigating pages, extracting data, filling forms, clicking elements, and taking screenshots. Browser actions are exposed as standard MCP tools.
Available Browser Tools
| Tool | Description | Key Parameters |
|---|---|---|
browser_navigate | Navigate to a URL and wait for the page to load | url, waitUntil (load/networkidle) |
browser_extract | Extract text or structured data using a CSS or XPath selector | selector, format (text/html/json) |
browser_fill | Fill an input field with a value | selector, value |
browser_click | Click an element | selector, button (left/right/middle) |
browser_screenshot | Take a screenshot of the current page or a specific element | selector (optional, defaults to full page) |
browser_wait | Wait for a selector to appear or disappear | selector, state (visible/hidden/attached) |
Architecture
Playwright Foundation
All browser automation uses Microsoft Playwright — the same engine used by modern end-to-end testing. Chromium is the default browser; Firefox is supported with additional config.
MCP Tool Exposure
Each browser action is registered as an MCP tool in OnStartAsync. Agents call them using the standard tool call loop — no special browser-aware code needed in the agent.
Session-Scoped Browser
Each conversation session gets its own browser context. Cookies, localStorage, and authentication state persist within a session but not across sessions.
Network Allowlist
Only domains on the configured allowlist can be navigated. This prevents agents from being tricked into accessing internal services or malicious external sites.
Typical Agent Conversation
User: "Check the stock price of AAPL on finance.yahoo.com and tell me today's change."
Agent → browser_navigate: { "url": "https://finance.yahoo.com/quote/AAPL" }
✓ Page loaded
Agent → browser_extract: { "selector": "[data-field='regularMarketChange']", "format": "text" }
✓ "+2.34 (1.23%)"
Agent: "Apple (AAPL) is up $2.34 today, a gain of 1.23%."
Plugin Registration
builder.Services.AddOctopus(config =>
{
config.AddPlugin<SqlServerPlugin>();
config.AddPlugin<ChatbotUIPlugin>();
config.AddPlugin<WebDriverPlugin>(); // Optional — add when browser automation is needed
});