> ## Documentation Index
> Fetch the complete documentation index at: https://www.kernel.sh/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Quickstart

> Hand setup to your coding agent, or create your first cloud browser yourself

Pick the way in that matches how you work. The first two are walked through on this page; the rest open their own guides.

> [card] [Hand it to your coding agent](#path-1-hand-it-to-your-coding-agent)
>
> Copy one prompt into Cursor, Claude Code, or Codex and let it set up KERNEL.

> [card] [Write it with an SDK](#path-2-write-it-yourself-with-an-sdk)
>
> Create and drive your first browser in TypeScript, Python, or Go.

> [card] [Call the REST API](https://www.kernel.sh/docs/api-reference/browsers/create-a-browser-session.md)
>
> Call KERNEL over HTTP from any language, starting with creating a browser.

> [card] [Use the CLI](https://www.kernel.sh/docs/reference/cli.md)
>
> Create, drive, and debug browsers from a terminal.

> [card] [Connect over MCP](https://www.kernel.sh/docs/reference/mcp-server.md)
>
> Give any MCP client, like Claude or Cursor, a cloud browser as a set of tools.

> [card] [Add Agent Skills](https://www.kernel.sh/docs/skills/overview.md)
>
> Teach your coding agent the KERNEL CLI, SDKs, and auth with one install.

> [card] [Use your framework](https://www.kernel.sh/docs/integrations/overview.md)
>
> Guides for the agent frameworks, models, and platforms you already use.

> [card] [Follow a cookbook](https://www.kernel.sh/docs/cookbooks.md)
>
> Clone an end-to-end recipe and adapt it to your task.

## Path 1: hand it to your coding agent

Copy this prompt into Claude Code, Codex, Cursor, or any agent that can run terminal commands. It installs the KERNEL CLI, signs you in, and opens a live view of a KERNEL browser that you or your agent can drive. From there, ask your agent to do a task on a site you care about.

> [accordion] See what this prompt does
>
> 1. Checks for the KERNEL CLI and installs or upgrades it with Homebrew.
> 2. Checks whether you're signed in, and if not, runs `kernel login` and waits for you to finish signing in.
> 3. Creates a browser and opens its live view so you can watch it.
>
> It stops and asks you for help if any step fails.

> [accordion] Agent-readable surfaces
>
> | Surface | What it's for |
> | - | - |
> | [`kernel.sh/llms.txt`](https://www.kernel.sh/llms.txt) | Hand-written. What KERNEL is, when to use it, every machine endpoint. Start here. |
> | [`kernel.sh/docs/llms.txt`](https://www.kernel.sh/docs/llms.txt) | Index of every docs page, for fetching the ones a task needs. |
> | [`kernel.sh/docs/llms-full.txt`](https://www.kernel.sh/docs/llms-full.txt) | The whole docs corpus in one file, for agents with room for it. |
> | [Agent Skills](https://www.kernel.sh/docs/skills/overview.md) | KERNEL know-how installed into the agent, so it doesn't re-read docs every session. |
> | [MCP server](https://www.kernel.sh/docs/reference/mcp-server.md) | KERNEL's API as tools, for agents that call tools instead of writing code. |
> | [OpenAPI 3.1](https://www.kernel.sh/openapi.json) | For generating a client or calling the REST API directly. |

## Path 2: write it yourself with an SDK

**1. Set your API key**

Create an API key in the [dashboard](https://dashboard.onkernel.com) and set it as `KERNEL_API_KEY`. Every SDK, the CLI, and the MCP server read it from the environment.

```bash theme={null}
export KERNEL_API_KEY=<your-api-key>
```

**2. Install an SDK**

```bash TypeScript theme={null}
npm install @onkernel/sdk
```

```bash Python theme={null}
pip install kernel
```

```bash Go theme={null}
go get github.com/kernel/kernel-go-sdk
```

**3. Create a browser and drive it**

This creates a browser, runs Playwright code inside the browser's VM, returns the result, and cleans up. No local Chromium, no CDP connection to manage.

```typescript TypeScript theme={null}
import Kernel from '@onkernel/sdk';

const kernel = new Kernel();

const browser = await kernel.browsers.create({ timeout_seconds: 300 });
console.log('live view:', browser.browser_live_view_url);

try {
  const { result } = await kernel.browsers.playwright.execute(browser.session_id, {
    code: `
      await page.goto('https://news.ycombinator.com');
      return await page.$$eval('.titleline > a', (as) => as.slice(0, 5).map((a) => a.textContent));
    `,
  });
  console.log(result);
} finally {
  await kernel.browsers.deleteByID(browser.session_id);
}
```

```python Python theme={null}
from kernel import Kernel

kernel = Kernel()

browser = kernel.browsers.create(timeout_seconds=300)
print("live view:", browser.browser_live_view_url)

try:
    response = kernel.browsers.playwright.execute(
        browser.session_id,
        code="""
          await page.goto('https://news.ycombinator.com');
          return await page.$$eval('.titleline > a', (as) => as.slice(0, 5).map((a) => a.textContent));
        """,
    )
    print(response.result)
finally:
    kernel.browsers.delete_by_id(browser.session_id)
```

```go Go theme={null}
package main

import (
	"context"
	"fmt"

	"github.com/kernel/kernel-go-sdk"
)

func main() {
	ctx := context.Background()
	client := kernel.NewClient()

	browser, err := client.Browsers.New(ctx, kernel.BrowserNewParams{
		TimeoutSeconds: kernel.Int(300),
	})
	if err != nil {
		panic(err)
	}
	defer client.Browsers.DeleteByID(ctx, browser.SessionID)
	fmt.Println("live view:", browser.BrowserLiveViewURL)

	res, err := client.Browsers.Playwright.Execute(ctx, browser.SessionID, kernel.BrowserPlaywrightExecuteParams{
		Code: `
			await page.goto('https://news.ycombinator.com');
			return await page.$$eval('.titleline > a', (as) => as.slice(0, 5).map((a) => a.textContent));
		`,
	})
	if err != nil {
		panic(err)
	}
	fmt.Println(res.Result)
}
```

Open `browser_live_view_url` while it runs and you'll watch the page load.

## Next steps

Two things determine the shape of everything after this: which control surface you use, and where your loop runs. [How you drive the browser](https://www.kernel.sh/docs/introduction/control.md) covers both.

> [card] [Getting blocked?](https://www.kernel.sh/docs/browsers/bot-detection/overview.md)
>
> Stealth and proxies to get past bot detection.

> [card] [Behind a login?](https://www.kernel.sh/docs/auth/overview.md)
>
> Fill credentials from a vault, or let managed auth log in.

> [card] [Need to pay?](https://www.kernel.sh/docs/browsers/payments.md)
>
> Complete checkouts without exposing card data to your agent.

> [card] [Want a worked example?](https://www.kernel.sh/docs/cookbooks.md)
>
> End-to-end recipes you can clone and run.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.