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:
    const result = await runAgent(
      "Find the top Hacker News story and summarize it",
      "https://news.ycombinator.com",
      120,
    );
    
  4. The agent returns an object with a success status and a message containing the results.