Runtime limits
Browserbase closes the browser session when the invocation reaches a terminal state. Functions don’t support
keepAlive.
Build limits
A build over 25 MB returns HTTP
413.
The Functions-per-build limit can vary by project. If a build needs more than its configured limit, contact Browserbase support.
Functions don’t support pnpm workspaces. Keep pnpm-lock.yaml or package-lock.json in the Function project directory.
Request limits
The invoke API returns
400 Bad Request when the serialized params object exceeds 64 KB.
Filesystem behavior
Don’t rely on files remaining available between invocations. Sandbox directories such as/tmp aren’t guaranteed to be empty or unique for each invocation. Don’t write credentials, tokens, or end-user data to shared temporary paths when your workload requires isolation.
Unsupported session settings
Functions accept most session creation options throughsessionConfig and sessionCreateParams.
Browserbase resolves the project from the API key. Don’t pass projectId.
You can’t set these fields:
keepAliveregionplaygroundscheduleModesolverServices
Write a Function
Configure defaults and validate Function parameters.
Invoke a Function
Override supported session settings for one invocation.