Create Browser Session
session_createCreate isolated browser sessions with distinct cookies and storage to prevent data leakage between parallel automation tasks. Configure custom proxies, viewports, and authentication profiles per session.
Instructions
Create a new isolated browser session with its own cookies and state. Returns a short session ID (e.g. s_k3m7x1) to pass to all other tools. Each session is a separate BrowserContext — no cookie leakage between sessions. Pool limit: 15 concurrent sessions. Sessions auto-expire after 30 minutes of inactivity. Use keep-alive pattern (periodic navigate or snapshot) for long-running sessions.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| profilePath | No | Path to a Playwright storageState JSON file for pre-authenticated sessions. | |
| viewport | No | Custom viewport. Default: 1280x720. | |
| userAgent | No | Custom user agent string. | |
| locale | No | Browser locale (e.g. 'en-US', 'fr-FR'). | |
| timezoneId | No | Timezone ID (e.g. 'America/New_York', 'Europe/London'). | |
| geolocation | No | Geolocation to emulate. | |
| permissions | No | Permissions to grant (e.g. ['geolocation', 'notifications']). | |
| colorScheme | No | Preferred color scheme. | |
| acceptDownloads | No | Whether to accept downloads. Default: true. | |
| stealth | No | Enable/disable stealth mode for this session. Default: true (uses global setting). | |
| proxy | No | Per-session proxy configuration. Each session can use a different proxy. | |
| profile | No | Profile shorthand name (e.g. 'github', 'gmail'). Uses persistent Chrome profile at ~/.leapfrog/chrome-profiles/{name}/. | |
| headed | No | Run browser with visible UI for this session. Overrides LEAP_HEADED env var. | |
| extensions | No | Paths to unpacked Chrome extensions to load. | |
| cdp | No | CDP endpoint URL to connect to a running Chrome instance (e.g. 'http://localhost:9222'). | |
| clientId | No | Client identifier for per-client pool partitioning. Used with LEAP_MAX_SESSIONS_PER_CLIENT. | |
| pinned | No | Pin this session to prevent idle timeout cleanup. |