What are Cloud Browser Sessions?
Cloud Browser Sessions let you run Narada automation tasks in serverless, cloud-hosted browsers without a local Chrome installation or Narada extension. This is ideal for server-side automation, CI/CD pipelines, and running tasks at scale.No Local Chrome
Run tasks from any server or script without a desktop browser
Scalable
Spin up multiple cloud browsers in parallel for high-throughput automation
Persistent Sessions
Sessions stay alive after your script exits. Reconnect later to check results
Getting Started with the SDK
Opening a Cloud Browser
Useopen_and_initialize_cloud_browser_window() to create a cloud browser session:
The
agent() method works identically on cloud browser windows as on local browser windows. All SDK features (structured output, GIF recording, MCP servers, variables) work the same way.Session Lifecycle
Cloud browser sessions have a different lifecycle than local browser windows:Session persists
When your script exits the
async with Narada() context manager, the cloud session keeps running. It doesn’t shut down when your code exits.Reconnect (optional)
You can reconnect to a running session from another script using
RemoteBrowserWindow:Saving Session IDs for Later
After creating a cloud browser, save the session identifiers so you can reconnect later:Using Cloud Browsers via the REST API
You can also use cloud browsers through the Remote Dispatch API by settingexecutionMode to "cloud_browser":
When using
executionMode: "cloud_browser", you do not need to provide a browserWindowId. A fresh cloud browser session is created automatically.Execution Modes Compared
The Remote Dispatch API supports three execution modes:| Mode | Description | Requires Extension? | Requires browserWindowId? |
|---|---|---|---|
"client" | Runs in a local browser with the Narada extension | Yes | Yes |
"cloud" | Runs server-side without a browser (limited to non-browser tasks) | No | No |
"cloud_browser" | Creates a cloud-hosted browser session | No | No |
Managing Sessions in the Dashboard
You can view and manage your cloud browser sessions from the Narada web dashboard:
- View active sessions with their status, name, and creation time
- Watch live sessions via the session player
- Replay completed sessions to review what the agent did
- Download action traces as JSON for debugging
- Download files that were saved during the session
- Stop sessions that are no longer needed
Best Practices
Always Close Sessions
Call
await window.close() when done to stop billing. Don’t rely solely on timeout.Set Reasonable Timeouts
Use
session_timeout to auto-expire sessions you might forget to close manually.Name Your Sessions
Use
session_name to label sessions so you can identify them in the dashboard.Use for CI/CD
Cloud browsers are perfect for automated pipelines, no desktop or extension needed.
Troubleshooting
Session creation fails
Session creation fails
- Verify your API key is valid and has sufficient credits
- Check your internet connection
- Contact support if the issue persists
Session times out unexpectedly
Session times out unexpectedly
- Increase
session_timeoutwhen creating the session - Ensure your tasks complete within the timeout window
- For long-running tasks, consider breaking them into smaller steps
Cannot reconnect to a session
Cannot reconnect to a session
- Verify the session hasn’t been stopped or timed out
- Check that you’re using the correct
cloud_browser_session_idandbrowser_window_id - Sessions that have expired cannot be reconnected
Next Steps
Remote Dispatch API
Use cloud browsers via the REST API with
executionMode: "cloud_browser"Parallel Execution
Run multiple cloud browser sessions in parallel for high-throughput automation
Remote Browser Control
Control remote browsers on other machines using RemoteBrowserWindow