Skip to content

browser — drive a real browser session

browser is a single tool with 16 actions for end-to-end browser automation. It wraps Playwright; install with pip install chimera-run[browser].

ArgTypeDescription
actionstringOne of: navigate, click, type, screenshot, content, html, evaluate, wait, select, scroll, back, forward, tabs, new_tab, close_tab, switch_tab.
urlstringFor navigate / new_tab.
selectorstringCSS selector for click / type / wait / select.
textstringText to type.
jsstringJavaScript expression for evaluate.
pathstringOutput path for screenshot.
full_pagebooleanCapture the whole page (default false).
directionstringup / down for scroll.
amountnumberScroll pixels.
timeoutnumberAction timeout in ms.
valuestringValue for select.

action is required; the other fields are action-specific.

{"action": "navigate", "url": "https://example.com"}
{"action": "screenshot", "path": "/tmp/snap.png", "full_page": true}
{"action": "evaluate", "js": "document.title"}
from chimera.tools.browser import BrowserTool
browser = BrowserTool()
browser.execute({"action": "navigate", "url": "https://example.com"}, env=None)
browser.execute({"action": "click", "selector": "a.login"}, env=None)
browser.execute({"action": "type", "selector": "#user", "text": "alice"}, env=None)
Navigated to https://example.com (200, 1.4s).

The tool keeps a single browser context across calls in the same agent run. Closed automatically when the agent terminates. To force a fresh session, drop the tool from the agent’s tool list and re-instantiate.