Run agent browser sessions on Libretto Cloud.
libretto-browser-tools/libretto-cloud. This is the SDK provider for hosted browsers — not the Libretto CLI --provider flag. For CLI hosting, see Libretto Cloud Hosting.1234LIBRETTO_API_KEY=<libretto-api-key> # optional # LIBRETTO_API_URL=https://api.libretto.sh # LIBRETTO_TIMEOUT_SECONDS=3600
| Option | Env | Default | Description |
apiKey | LIBRETTO_API_KEY | (required) | API key |
apiUrl | LIBRETTO_API_URL | https://api.libretto.sh | API base URL |
timeoutSeconds | LIBRETTO_TIMEOUT_SECONDS | 3600 | Browser session TTL at create time |
headless | — | true | Request a headless session |
liveViewUrl. Closing a session may return replayUrl when a recording is available.123456789101112import { createAiSdkBrowserTools } from "libretto-browser-tools/ai-sdk"; import { LibrettoCloudBrowserProvider } from "libretto-browser-tools/libretto-cloud"; const { tools, dispose } = createAiSdkBrowserTools( new LibrettoCloudBrowserProvider(), ); try { // agent loop using tools… } finally { await dispose(); }