Execute JavaScript in the persistent Browser REPL
Execute JavaScript in a persistent Node.js runtime inside the browser VM.
Top-level bindings, closures, mutations, and dynamically imported modules persist
across calls until the REPL is reset or replaced. Start with repl.help() to list
available methods, or call repl.help("click") for detailed help.
Expression values are ignored. Emit ordered text or image output with
repl.write(...), console methods, or repl.emitImage(...). The runtime also
exposes browser-control helpers, WebMCP, Patchright, Playwright, and raw CDP.
Executions are serialized. A timeout, crash, OOM, or protocol failure terminates
the REPL and changes its repl_id. This is unrestricted code execution inside the
browser VM and is not sandboxed.
Authorizations
Headers
Makes retrying the call safe. A call with a key already used on this browser returns the first call's response instead of running the code again, waiting for it if it is still running. A call with a key keeps running for 10 seconds after its last caller disconnects, so a retry can collect its response; after that it is cancelled like a call without a key. A response is kept for 10 minutes once the call finishes, and only the most recent responses are kept. A call rejected before the code runs, such as with 400, 409 or 429, does not use up its key. The Kernel SDKs send a key automatically and reuse it when they retry.
1 - 255Body
Request to execute code in the persistent Browser REPL.
JavaScript evaluated in a persistent Node.js runtime. Top-level bindings
persist until the browser VM's API process exits, the REPL is reset, or
the REPL is terminated after a crash or timeout. Static top-level imports
are unsupported; use dynamic import(). Expression values are ignored;
emit output with repl.write(...), console methods, or
repl.emitImage(...). May be empty only when reset is true.
Response
Code executed with either a successful result or a structured JavaScript failure.
Result of Browser REPL code execution.