Skip to main content

Documentation Index

Fetch the complete documentation index at: https://tbd-6fc993ce-hypeship-docs-chrome-policy-on-demand.mintlify.app/llms.txt

Use this file to discover all available pages before exploring further.

Kernel browsers accept an optional chrome_policy object that lets you apply Chrome enterprise policies to the browser at launch. Use this to control startup behavior, default homepages, bookmarks, download UI, notifications, and other browser-level settings. chrome_policy is supported on: Keys are Chrome policy names and values are the corresponding settings.

On-demand browsers

Pass chrome_policy when creating an on-demand browser. The policy is applied at session creation time.
import Kernel from '@onkernel/sdk';

const kernel = new Kernel();

const kernelBrowser = await kernel.browsers.create({
  chrome_policy: {
    HomepageLocation: "https://kernel.sh",
    HomepageIsNewTabPage: false,
    ShowHomeButton: true,
    DownloadBubbleEnabled: false,
  },
});
The policy is echoed on GET /browsers/{id} and GET /browsers responses so you can verify what was applied.

Reserved browser pools

Pass chrome_policy when creating or updating a pool. Every browser in the pool launches with the policy applied. See Custom chrome policies on pools for the pool-specific update flow (including discard_all_idle).
import Kernel from '@onkernel/sdk';

const kernel = new Kernel();

const pool = await kernel.browserPools.create({
  name: "my-pool",
  size: 5,
  chrome_policy: {
    DownloadBubbleEnabled: false,
    HomepageLocation: "https://example.com",
  },
});

Example policies

PolicyTypeDescription
HomepageLocationstringURL loaded when clicking the home button
HomepageIsNewTabPagebooleanWhen false, the home button navigates to HomepageLocation instead of the new tab page
ShowHomeButtonbooleanShows the home button in the toolbar
NewTabPageLocationstringURL shown when opening a new tab
RestoreOnStartupintegerSet to 4 to open a specific list of URLs on browser startup
RestoreOnStartupURLsstring[]URLs to open when the browser starts. Requires RestoreOnStartup set to 4
BookmarkBarEnabledbooleanShows the bookmark bar
ManagedBookmarksarrayPre-configured bookmarks. Supports folders via nested children arrays
DownloadBubbleEnabledbooleanControls the download bubble UI. Set to false to fall back to the classic download shelf

Available policies

Any policy listed in the Chrome Enterprise policy documentation can be used in the chrome_policy object. Refer to the official docs for the full list of supported policy names, types, and values.