Skip to main content

Overview

The @sandbox decorator makes production deployment effortless:
  • Zero infrastructure - No servers to manage
  • Automatic scaling - Handle millions of agents
  • Persistent auth - Cloud profile sync
  • Global proxies - Bypass captchas and geo-restrictions
  • Live monitoring - Watch agents in real-time
Sandboxes run your code right next to the browser for minimal latency and maximum performance.

Quick Start

1

Get API Key

Sign up at cloud.browser-use.com/new-api-key for $10 free credits.
2

Wrap Your Function

Add @sandbox() decorator to any function:
The function must have browser: Browser as first parameter. Do NOT pass browser when calling.
3

Watch Live

When your code runs, you’ll see:
Click the link to watch your agent work in real-time!

Authentication with Cloud Profiles

Sync Local Cookies to Cloud

Make your local browser sessions available in production:
1

Run Sync Script

This opens a browser where you login to your accounts. Takes 2 minutes.
2

Get Profile ID

After logging in, you’ll receive a profile_id like:
Or find it at cloud.browser-use.com/dashboard/settings?tab=profiles
3

Use in Production

Your cloud browser is already logged in to all synced accounts!

Global Proxies

Bypass captchas, Cloudflare, and geo-restrictions:
Supported Countries:
  • us - United States
  • uk - United Kingdom
  • fr - France
  • it - Italy
  • jp - Japan
  • au - Australia
  • de - Germany
  • fi - Finland
  • ca - Canada
  • in - India
Proxies are optimized for browser automation - they handle captchas, fingerprinting, and bot detection automatically.

Session Timeouts

Control how long browsers stay alive:
Timeout Limits:
  • Free users: Max 15 minutes
  • Paid users: Max 240 minutes (4 hours)
Longer timeouts consume more credits. Optimize your tasks to complete quickly.

Production Patterns

Basic Production Task

Parallel Execution

Error Handling

Scheduled Tasks

Monitoring and Callbacks

Live Browser Monitoring

Execution Callbacks

Quiet Mode

Disable console output:

Environment Variables

Pass secrets and config to sandbox:

Cost Optimization

Use Flash Mode

Minimize Browser Time

Batch Operations

Best Practices

1

Keep Sessions Short

2

Use Cloud Profiles for Auth

3

Handle Errors Gracefully

4

Monitor Credit Usage

Check dashboard at cloud.browser-use.com/dashboard

Deployment Platforms

AWS Lambda

Google Cloud Functions

Docker Container

Troubleshooting

API Key Issues

Timeout Errors

Profile Not Found

Next Steps

Get API Key

Start with $10 free credits

Cloud Dashboard

Monitor usage and profiles

Authentication

Sync cookies to cloud

Examples

See production examples