session_create
Create a persistent interactive browser session for multi-step interaction - clicking, typing, scrolling, reading state across page transitions. Use when the agent must INTERACT with a page (login flows, forms, pagination, click-through) rather than read it once. Returns session_id; persists 8 min idle. With persistent:true the login state survives idle eviction and server restarts - the same session_id revives logged-in.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| url | No | Initial URL to navigate to (optional) | |
| width | No | Initial viewport width in CSS pixels. Pinned for the session's life (survives navigation) so element rects and media queries anchor to the same layout across every page of the visit. | |
| height | No | Initial viewport height in CSS pixels. | |
| mobile | No | Mobile device emulation (coarse pointer, no hover) for the initial viewport. | |
| cookies | No | Cookies to inject before navigation: `"name=value"` strings or CDP-style objects `{"name","value","domain",...}`. Lets the session start already logged-in. Round-trips with session_cookies. | |
| storage | No | Web Storage to inject after the initial navigation lands: {"local_storage": {"k":"v"}, "session_storage": {"k":"v"}}. For login states that live in localStorage rather than the cookie jar. Round-trips with session_storage. | |
| ttl_secs | No | Idle time-to-live in seconds before the session is evicted (default: 480, clamped 60..3600). Raise it for long workflows. | |
| keepalive | No | Exempt the session from the idle reaper: it lives until session_close or server exit, so a workflow interrupted by long non-browser steps keeps its login state. | |
| use_proxy | No | Route through proxy (default: false) | |
| persistent | No | Persist the login state (cookies + localStorage/sessionStorage + viewport + dialog policy) to the server's local store after every action. If the session idles out — or the whole server restarts — the next call with the same session_id revives it logged-in (storageState-style recovery, no re-login). Explicit session_close drops the snapshot. |