Skip to content
Browserbase
    • Primitives
      • BrowsersCloud browsers for your agent to use the web
      • AgentsScale fully managed browser agents with simple prompts
      • SearchFind relevant websites from a single query
      • FetchRetrieve web data as agent-ready HTML, JSON, or markdown
      • RuntimeScalable, sandboxed environments for agent deployments
      • IdentityAuthenticate your agent to navigate the web like a human
      • ModelsUse any model with a single API key
      • ObservabilityUnified debugging your agent across replays, logs, and prompts
    • Open Source
      • Browse CLIGive your agent browsing skills with a single command
      • StagehandThe most popular AI browser automation framework
    • Use Cases
      • Browser AgentsPower agents across logins, forms, and portals
      • Web Data ExtractionAutomate data extraction from sites with no APIs
      • Records VerificationCheck KYB, background, and title from official sources
      • Portal FilingsFile registrations, pay invoices, and submit appeals at scale
      • Document RetrievalCollect receipts, statements, and reports from vendor portals
      • Data MigrationImport a new customer's data from the system they're leaving
      • Permissioned data accessSecurely access payroll, HRIS, and patient portal accounts your users authorize
      All use cases
    • Industries
      • AI & Agent Platforms
      • Healthcare
      • Fintech
      • GTM
      • Legal
    • Resources
      • Blog
      • Customers
      • Enterprise
      • Templates
  • Pricing
  • Docs
  • Log in
Log in
Sign up
Get a demo

September 30, 2026

Secrets are now in Functions

Product Name
Browserbase
Category
Improvements

Browserbase Functions now support Secrets, so you can securely use credentials and API keys when connecting to external services.

Store a secret in Browserbase, then reference it at runtime from your Function’s ctx object without hardcoding sensitive values in your source code. This makes it safer to build Functions that authenticate with third-party APIs, databases, and other providers.

Secrets can be created and managed through the API and SDK, with CLI support for local workflows.

What you can do

  • Securely store credentials in Browserbase
  • Reference secrets at runtime in Functions
  • Build authenticated workflows with external providers
  • Keep sensitive values out of your code and logs

Learn more: ${ docs url }

defineFn("login-example", async (context) => {
  const { LOGIN_EMAIL, LOGIN_PASSWORD } = context.secrets;

  const browser = await chromium.connectOverCDP(
    context.session.connectUrl,
  );
  const browserContext = browser.contexts()[0]!;
  const page = browserContext.pages()[0] ?? await browserContext.newPage();

  await page.goto("https://your-app.example/login");
  await page.getByLabel("Email", { exact: true }).fill(LOGIN_EMAIL);
  await page.getByLabel("Password", { exact: true }).fill(LOGIN_PASSWORD);
  await page.getByRole("button", { name: "Sign in", exact: true }).click();

  return { loggedIn: true, heading, sessionId: context.session.id };
});
Browserbase

Primitives

  • Browsers
  • Web APIs
  • Runtime
  • Identity
  • Model Gateway
  • Observability
  • Stagehand
  • MCP

Industries

  • AI
  • Healthcare
  • GTM
  • Tax
  • Legal

Developers

  • Docs
  • Templates
  • APIs & SDKs
  • Changelog
  • Status
  • Github

Company

  • Careers
  • Customers
  • Partner with Us
  • Trust & Security

Community

TwitterLinkedinYoutube
  • Privacy Policy
  • Terms of Service

Community

TwitterLinkedinYoutube
  • Privacy Policy
  • Terms of Service