From 4d3c59f93b28f6b5997131f1a1376ff82ab02557 Mon Sep 17 00:00:00 2001 From: Rafael Garcia Date: Tue, 7 Oct 2025 11:08:31 -0400 Subject: [PATCH 1/4] extensions docs --- browsers/extensions.mdx | 94 +++++++++++++++++++++++++++++++++++++++++ docs.json | 1 + 2 files changed, 95 insertions(+) create mode 100644 browsers/extensions.mdx diff --git a/browsers/extensions.mdx b/browsers/extensions.mdx new file mode 100644 index 0000000..c6e5420 --- /dev/null +++ b/browsers/extensions.mdx @@ -0,0 +1,94 @@ +--- +title: "Extensions" +description: "Use browser extensions in Kernel browsers" +--- + +Kernel's browsers support running with custom Chrome extensions. +Chrome extensions must be unpacked and can be uploaded to Kernel via the CLI or API. + +## Uploading extensions + +Here is a simple example of an unpacked extension: + + +```js ./my-extension/content-script.js +document.body.innerHTML = document.body.innerHTML.replace(/AI/g, "A1"); +``` + +```json ./my-extension/manifest.json +{ + "manifest_version": 3, + "version": "1.0", + "name": "AI to A1", + "description": "Replace AI with A1", + "content_scripts": [ + { + "matches": [ + "https://*/*" + ], + "js": [ + "content-script.js" + ] + } + ] +} +``` + + +Once these files are in place, you can upload them to Kernel via the CLI (or [API](/api-reference/extensions/upload-a-browser-extension)): + +```bash +kernel extensions upload ./my-extension --name my-extension +``` + +Extensions uploaded to Kernel are assigned a random ID, but you can also give them a name for easier reference. +This name must be unique within your organization. + +## Using extensions in a browser + +Passing the extension name or ID to the `create` method will load it into the browser: + + +```typescript Typescript/Javascript +import { Kernel } from '@onkernel/sdk'; + +const kernel = new Kernel(); +const kernelBrowser = await kernel.browsers.create({ + extensions: [{ name: "my-extension" }], +}); +``` + +```python Python +import kernel + +client = kernel.Kernel() +kernel_browser = client.browsers.create(extensions=[{name: 'my-extension'}]) +``` + +```bash CLI +kernel browsers create --extension my-extension +``` + + + +## Using extensions directly from the Chrome Web Store + +Kernel's CLI offers a command for fetching and unpacking extensions directly from the Chrome Web Store. +Simply pass the URL of the extension you want to download and the CLI will download the extension and unpack it into the specified directory. + +```bash CLI +kernel extensions download-web-store https://chromewebstore.google.com/detail/shutterfly-address-book-e/lddlpciejomhjehckimopnomegilaocb --to ./downloaded-extension +``` + +From here you can upload the extension to Kernel as normal. + + +## Loading an extension into a running browser + +If you have a browser running and would like to load an extension into it after the browser session has started, Kernel also allows you to do that via the CLI (or [API](http://localhost:3000/api-reference/browsers/ad-hoc-upload-one-or-more-unpacked-extensions-to-a-running-browser-instance)): + +```bash CLI +kernel browsers extensions upload $session_id ./my-extension +``` + +Note that this will restart the browser process and break any connections to the browser CDP URL. diff --git a/docs.json b/docs.json index 06727fa..532b2ac 100644 --- a/docs.json +++ b/docs.json @@ -63,6 +63,7 @@ "browsers/file-io", "browsers/live-view", "browsers/replays", + "browsers/extensions", { "group": "Bot Anti-Detection", "pages": [ From 6307aa07b12c340d6fad608245390e5c6d1e530f Mon Sep 17 00:00:00 2001 From: Rafael Garcia Date: Mon, 13 Oct 2025 11:43:03 -0400 Subject: [PATCH 2/4] update pricing page --- info/pricing.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/info/pricing.mdx b/info/pricing.mdx index 9bf2f83..019f3e8 100644 --- a/info/pricing.mdx +++ b/info/pricing.mdx @@ -17,7 +17,7 @@ With Kernel, you only pay for what you use and nothing more. Our goal is to be c | Browser replays | ❌ | ✅ | ✅ | | Browser profiles | ❌ | ✅ | ✅ | | File uploads & downloads | ❌ | ✅ | ✅ | -| Configurable browser extensions | ❌ | Coming soon | Coming soon | +| Configurable browser extensions | ❌ | ✅ | ✅ | | BYO images & storage mounts | ❌ | ❌ | Coming soon | | SOC2 compliance | ✅ | ✅ | ✅ | | HIPAA compliance (BAA) | ❌ | ❌ | ✅ | From 2c3d6fac9cfbddd9f4be41cfb17f9092ebab8ec6 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Mon, 13 Oct 2025 15:43:21 +0000 Subject: [PATCH 3/4] docs: update code samples from OpenAPI --- snippets/openapi/post-browsers-id-extensions.mdx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/snippets/openapi/post-browsers-id-extensions.mdx b/snippets/openapi/post-browsers-id-extensions.mdx index 91b4802..8c11441 100644 --- a/snippets/openapi/post-browsers-id-extensions.mdx +++ b/snippets/openapi/post-browsers-id-extensions.mdx @@ -6,7 +6,7 @@ const client = new Kernel({ apiKey: 'My API Key', }); -await client.browsers.uploadExtensions('id', { +await client.browsers.loadExtensions('id', { extensions: [{ name: 'name', zip_file: fs.createReadStream('path/to/file') }], }); ``` @@ -18,7 +18,7 @@ from kernel import Kernel client = Kernel( api_key="My API Key", ) -client.browsers.upload_extensions( +client.browsers.load_extensions( id="id", extensions=[{ "name": "name", From f78fac8419f29b8158dd63ed77aec6f88543d941 Mon Sep 17 00:00:00 2001 From: Rafael Garcia Date: Tue, 14 Oct 2025 11:00:27 -0400 Subject: [PATCH 4/4] pr feedback --- browsers/extensions.mdx | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/browsers/extensions.mdx b/browsers/extensions.mdx index c6e5420..91d120e 100644 --- a/browsers/extensions.mdx +++ b/browsers/extensions.mdx @@ -82,13 +82,18 @@ kernel extensions download-web-store https://chromewebstore.google.com/detail/sh From here you can upload the extension to Kernel as normal. +```bash CLI +kernel extensions upload ./downloaded-extension --name my-extension +``` ## Loading an extension into a running browser If you have a browser running and would like to load an extension into it after the browser session has started, Kernel also allows you to do that via the CLI (or [API](http://localhost:3000/api-reference/browsers/ad-hoc-upload-one-or-more-unpacked-extensions-to-a-running-browser-instance)): ```bash CLI -kernel browsers extensions upload $session_id ./my-extension +kernel browsers extensions upload ./my-extension ``` + Note that this will restart the browser process and break any connections to the browser CDP URL. +