Skip to main content
Val Town is a serverless platform to run Typescript automations. You can think of it like Zapier for software developers. Because Val Town can’t launch a local browser, Kernel lets you use tools like Puppeteer, Playwright, or Stagehand on Val Town by connecting to a remote browser session hosted on Kernel’s infrastructure.

Quick start with Puppeteer

  1. Create a free Kernel account and generate an API key from Settings → API Keys
  2. Remix the Kernel Puppeteer val
  3. Add your KERNEL_API_KEY to the val’s Environment Variables (left sidebar)
  4. Click Run
  5. View logs for output

Quick start with Playwright

  1. Remix the Kernel Playwright val
  2. Add your KERNEL_API_KEY to Environment Variables
  3. Set TMPDIR to /tmp to avoid Playwright file-system warnings
  4. Click Run
  5. Check the logs for output

Quick start with Stagehand + Gemini

Run an autonomous browser agent powered by Gemini 2.5’s computer use capabilities and Stagehand.
  1. Remix the Kernel Stagehand + Gemini val
  2. Add the following to Environment Variables:
  3. Import runAgent into your val and call it with a task, starting URL, and timeout:
  4. The agent returns an object with a success status and a message containing the results.

Quick start with a browser-loop agent

Run an autonomous Claude Sonnet 5 agent that switches between DOM tools (snapshot, find, click, fill, navigate, text) and computer-use tools (screenshot, pixel click, scroll, keyboard) in the same browser session.
  1. Remix the Kernel browser loop val
  2. Add the following to Environment Variables:
  3. Run check.ts to verify package compatibility and authenticate both APIs
  4. Run main.ts to execute the agent
  5. Watch the live-view URL logged at startup and review the tool trace in Logs