Skip to content
Fresh 🌱

Magnitude ​

Magnitude is an open source AI browser automation framework. It uses vision AI to enable you to control your browser with natural language. By integrating with Kernel, you can run Magnitude agents and automations with cloud-hosted browsers.

Adding Kernel to existing Magnitude implementations ​

If you already have a Magnitude implementation, you can easily switch to using Kernel's cloud browsers by updating your browser configuration.

1. Install the Kernel SDK ​

bash
npm install @onkernel/sdk

2. Initialize Kernel and create a browser ​

Import the libraries and create a cloud browser session:

typescript
import { startBrowserAgent } from "magnitude-core";
import Kernel from '@onkernel/sdk';
import z from 'zod';

const kernel = new Kernel();

const kernelBrowser = await kernel.browsers.create({
  stealth: true,
});

console.log(`Live view url: ${kernelBrowser.browser_live_view_url}`);

3. Update your browser configuration ​

Replace your existing browser setup to use Kernel's CDP URL and display settings:

typescript
const agent = await startBrowserAgent({
    url: 'https://magnitasks.com',
    narrate: true,
    browser: {
        cdp: kernelBrowser.cdp_ws_url,
    },
    llm: {
        provider: 'anthropic',
        options: {
            model: 'claude-sonnet-4-20250514'
        }
    }
});

4. Use your agent ​

Use Magnitude's agent methods with the Kernel-powered browser:

typescript
await agent.act([
    'click on "Tasks" in the sidebar',
    'click on the first item in the "In Progress" column'
]);

const assignee = await agent.extract('Extract the task Assignee', z.string());

await agent.stop();

// Clean up the Kernel Browser Session
await kernel.browsers.deleteByID(kernelBrowser.session_id);

Quick setup with our Magnitude example app ​

Alternatively, you can use our Kernel app template that includes a pre-configured Magnitude integration:

bash
kernel create --name my-magnitude-app --language typescript --template magnitude

Then follow the deploy and invoke guides to deploy and run your Magnitude automation on Kernel's infrastructure.

Benefits of using Kernel with Magnitude ​

  • No local browser management: Run automations without installing or maintaining browsers locally
  • Scalability: Launch multiple browser sessions in parallel
  • Stealth mode: Built-in anti-detection features for web scraping
  • Session state: Maintain browser state across runs via Profiles
  • Live view: Debug your automations with real-time browser viewing

Next steps ​