Create a Browser Session
Learn how to create browser sessions using the AgentGo SDK
Creating a Browser Session with SDK
The AgentGo SDK provides a simple way to create and manage distributed browser sessions. This guide explains how to use the SDK to create sessions with various configuration options.
Prerequisites
Before creating a browser session, make sure you have:
- An AgentGo API key (obtain from Developer Settings)
- AgentGo SDK installed:
npm i @agentgo-dev/sdk
Basic Session Creation
Here’s how to create a browser session using the AgentGo SDK:
Session Configuration Parameters
The SDK supports the following parameters when creating sessions:
| Parameter | Type | Description | Default |
|---|---|---|---|
region | string | Geographic region code (see available regions below) | “US” |
Available Regions
AgentGo supports browser sessions in the following regions:
Session Management Operations
Create Session
List Sessions
Retrieve Session Details
Advanced Configuration Options
When connecting to sessions via Playwright, you can use additional options:
| Option | Description | Default |
|---|---|---|
_sessionId | Use specific session ID | Auto-generated |
_region | Geographic region | ”US” |
_disable_proxy | Disable proxy usage | false (proxy enabled) |
These options are used when connecting Playwright to your SDK-created session (covered in the next section).
Complete Example
Monitoring Sessions
You can monitor your sessions through the AgentGo dashboard at: https://app.agentgo.live/organization/dev/sessions
The dashboard shows:
- Session ID and status
- Creation time and duration
- Region and resource usage
- Connection details
Next, learn how to use your session with Playwright for browser automation.