Skip to content
Fresh 🌱

Headless Mode ​

Kernel browsers ship in headful mode by default. In headful mode, the launched browser has a corresponding GUI. This enables features like live view and replays.

headless mode runs without a visual interface. They generally run faster and have a lighter footprint (1 GB rather than headful's 8 GB), resulting in significant cost savings. This is useful for short-lived or highly concurrent browser automations. Some bot detectors may detect headless mode.

To launch a Kernel browser in headless mode, set its config:

typescript
  import Kernel from '@onkernel/sdk';

  const kernel = new Kernel();

  const kernelBrowser = await kernel.browsers.create({
    headless: true,
  });
python
from kernel import Kernel

kernel = Kernel()

kernel_browser = kernel.browsers.create(headless=True)

INFO

Live View and Replays are not available in headless mode.