state
Persistent object for storing data between execute calls within your session. Each session has its own isolated state. Type:Record<string, any>
Availability: All sessions
Example:
state is session-isolated but pages are shared across all sessions. Multiple sessions can see the same browser tabs. To avoid interference, always use your own page.
page
Default page (may be shared with other agents). Prefer creating your own page and storing it instate.
Type: Page
Availability: All sessions (shared)
Example:
context
Browser context - access to all pages, create new pages, set default timeouts. Type:BrowserContext
Availability: All sessions
Example:
require
Load Node.js built-in modules. ESMimport is not available in the sandbox.
Type: NodeRequire
Availability: All sessions
Allowed modules:
- File system:
fs,node:fs - Path utilities:
path,node:path - URL parsing:
url,node:url,querystring,node:querystring - Crypto:
crypto,node:crypto - Data:
buffer,node:buffer,string_decoder,node:string_decoder - Utilities:
util,node:util,assert,node:assert - Events:
events,node:events,timers,node:timers - Streams:
stream,node:stream,zlib,node:zlib - HTTP:
http,node:http,https,node:https,http2,node:http2 - System:
os,node:os