Generated banner for Functions
Generated logo for Functions

Functions

BrowserbaseOfficialPublished by Browserbase

  • Skill
  • Tool integration
  • Automation and integrations
  • MIT
  • Low risk

From the author

Deploy serverless browser automation as cloud functions using Browserbase. Use when the user wants to deploy browser automation to run on a schedule or cron, create a webhook endpoint for browser tasks, run automation in the cloud instead of locally, or asks about Browserbase Functions.
— the description by Browserbase

AutoGineer summary

Written by AutoGineer from the skill’s own files, not by the author

This skill provides a structured approach to creating, testing, and deploying serverless browser automation functions. By leveraging the Browserbase platform, users can move local automation scripts into a cloud environment, enabling execution on schedules or via webhooks. The process involves initializing a project, writing automation logic using Playwright, testing locally with a development server, and publishing the final function to the cloud.

What it does

  • Initializes new browser automation projects with necessary boilerplate code
  • Provides a local development environment for testing browser tasks
  • Facilitates the deployment of browser automation scripts to the cloud
  • Supports the use of Playwright for browser interaction within serverless functions
  • Enables the management of browser automation tasks via a command line interface

When to use it

  • When you need to run browser automation tasks on a recurring schedule
  • When you want to trigger browser tasks via webhooks
  • When you need to move local browser automation scripts to a cloud-based execution environment
  • When you are working with Browserbase Functions

Advantages

  • Allows for serverless execution of browser tasks
  • Simplifies the transition from local development to cloud deployment
  • Supports local testing and iteration before publishing
  • Integrates directly with the Browserbase platform

Usage examples

“How do I start a new Browserbase function project?”
The agent will guide you to use the browse functions init command to create a new project structure with the required configuration files.
“How can I test my automation locally before deploying?”
The agent will instruct you to use the browse functions dev command to start a local server, allowing you to invoke and test your function locally.
“How do I deploy my finished browser automation to the cloud?”
The agent will explain how to use the browse functions publish command to upload your function code to the Browserbase platform.

Install

  1. Download the skill as a ZIP:

    https://autogineer.com/agent-skills/browserbase/functions/download
  2. Unzip it into the cross-client skills folder of your project:

    mkdir -p .agents/skills && unzip functions.zip -d .agents/skills

Documentation by Browserbase

Browserbase Functions

Deploy serverless browser automation using the official browse CLI.

Prerequisites

Get an API key from: https://browserbase.com/settings

export BROWSERBASE_API_KEY="your_api_key"

Creating a Function Project

1. Initialize
browse functions init my-function
cd my-function

This creates:

my-function/
├── package.json
├── index.ts        # Your function code
└── .env            # Add credentials here
2. Add Credentials to .env
echo "BROWSERBASE_API_KEY=$BROWSERBASE_API_KEY" >> .env
3. Install Dependencies
pnpm install

Function Structure

import { defineFn } from "@browserbasehq/sdk-functions";
import { chromium } from "playwright-core";

defineFn("my-function", async (context) => {
  const { session, params } = context;

  // Connect to browser
  const browser = await chromium.connectOverCDP(session.connectUrl);
  const page = browser.contexts()[0]!.pages()[0]!;

  // Your automation
  await page.goto(params.url || "https://example.com");
  const title = await page.title();

  // Return JSON-serializable result
  return { success: true, title };
});

Key objects:

  • context.session.connectUrl - CDP endpoint to connect Playwright

  • context.params - Input parameters from invocation

Development Workflow

1. Start Dev Server
browse functions dev index.ts

Server runs at http://127.0.0.1:14113

2. Test Locally
curl -X POST http://127.0.0.1:14113/v1/functions/my-function/invoke \
  -H "Content-Type: application/json" \
  -d '{"params": {"url": "https://news.ycombinator.com"}}'
3. Iterate

The dev server auto-reloads on file changes. Use console.log() for debugging - output appears in the terminal.

Deploying

browse functions publish index.ts

Output:

Function published successfully
Build ID: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
Function ID: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx

Save the Function ID - you need it to invoke.

Quick Reference

CommandDescription
browse functions init <name>Create new project
browse functions dev <file>Start local dev server
browse functions publish <file>Deploy to Browserbase

For invocation examples, common patterns, and troubleshooting, see REFERENCE.md.

Files

Requirements and compatibility

Works with: Claude Code, Claude apps, OpenAI Codex, GitHub Copilot, Cursor, Gemini CLI, Kiro, OpenCode, Goose, Amp, Roo Code, JetBrains Junie, Factory Droid, Devin (ex-Windsurf), Mistral Vibe, OpenHands, Letta

“Works with” means the tool reads the open Agent Skills format; a skill written for one tool may use features others lack.

Needs: Declares allowed tools, Needs network access, Needs an API key, Needs Node.js

The author says: Requires the browse CLI (`npm install -g browse`), Node.js 18+ with pnpm or npm, and BROWSERBASE_API_KEY.

Security

What our scanner noticed· Low risk

  • Instructions that use the network

A static scan is not a guarantee. Skills are third-party content: review a skill before you let an agent use it.

Attribution and licence

Published by
Browserbase
Publisher
Browserbase (Official)
Source
browserbase/skills · skills/functions · commit 6811ca3
Licence
MIT License (redistribution allowed)
  • ATTRIBUTION.md (written by AutoGineer)
Synced

AutoGineer is not affiliated with or endorsed by Browserbase or Browserbase.

Download ZIP

The ZIP holds the skill’s files, its licence files and an ATTRIBUTION.md. Download functions.zip