Skip to content

Commit 54e5e2a

Browse files
rgarciadprevoznik
andauthored
Add Claude Agent SDK templates and update to kernel.sh domain (#63)
## Summary - Add new **Claude Agent SDK** templates for both TypeScript and Python that demonstrate browser automation using the Claude Agent SDK with Kernel's Playwright execution API - Update all documentation URLs from `onkernel.com` to `kernel.sh` (new domain) - Remove outdated `kernel logs -f` instructions since `kernel invoke` now streams logs automatically ## New Templates ### TypeScript (`pkg/templates/typescript/claude-agent-sdk/`) - Uses `@anthropic-ai/claude-agent-sdk` with `@onkernel/sdk` - Creates a Kernel browser session and exposes Playwright execution as an MCP tool - Supports both local execution (`pnpm exec tsx index.ts "task"`) and Kernel deployment ### Python (`pkg/templates/python/claude-agent-sdk/`) - Uses `claude-agent-sdk` with `kernel` Python SDK - Same functionality as TypeScript version - Supports both local execution (`uv run main.py "task"`) and Kernel deployment ## Other Changes - **Domain migration**: Updated all `onkernel.com`, `www.onkernel.com`, `dashboard.onkernel.com`, `docs.onkernel.com` references to use `kernel.sh` - **Email update**: Changed `[email protected]` to `[email protected]` - **Removed outdated instructions**: Removed `kernel logs <app> -f` comments from all templates since logs now stream automatically with `kernel invoke` ## Test Plan - [ ] Test TypeScript template locally: `pnpm exec tsx index.ts "Go to news.ycombinator.com and get top 3 stories"` - [ ] Test Python template locally: `uv run main.py "Go to news.ycombinator.com and get top 3 stories"` - [ ] Deploy and invoke TypeScript template via Kernel CLI - [ ] Deploy and invoke Python template via Kernel CLI - [ ] Verify all documentation links resolve correctly to kernel.sh <!-- CURSOR_SUMMARY --> --- > [!NOTE] > Introduces Claude Agent SDK samples and aligns repo/docs with the new Kernel domain. > > - Adds `claude-agent-sdk` templates for both TypeScript and Python, including MCP tool to execute Playwright against Kernel browsers, local run scripts, and Kernel deploy/invoke actions > - Updates `README.md`, template READMEs, and code comments to replace `onkernel.com` with `kernel.sh`; removes outdated `kernel logs -f` notes since `kernel invoke` streams logs > - Extends QA guide with new create/deploy/invoke steps for `ts-claude-agent-sdk` and `py-claude-agent-sdk`; increases app count in test matrix > - Updates Go module path and imports from `github.com/onkernel/cli` to `github.com/kernel/cli`; adjusts `goreleaser` org/URLs and author email > - Enhances template registry (`pkg/create/templates.go`) to include the new template, entry points, env requirements, and invoke commands > > <sup>Written by [Cursor Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit 67aed22. This will update automatically on new commits. Configure [here](https://cursor.com/dashboard?tab=bugbot).</sup> <!-- /CURSOR_SUMMARY --> --------- Co-authored-by: Daniel Prevoznik <[email protected]>
1 parent b1a3793 commit 54e5e2a

File tree

60 files changed

+2615
-78
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

60 files changed

+2615
-78
lines changed

.cursor/commands/qa.md

Lines changed: 30 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -57,12 +57,14 @@ Here are all valid language + template combinations:
5757
| typescript | magnitude | ts-magnitude | ts-magnitude | Yes | ANTHROPIC_API_KEY |
5858
| typescript | openai-computer-use | ts-openai-cua | ts-openai-cua | Yes | OPENAI_API_KEY |
5959
| typescript | gemini-computer-use | ts-gemini-cua | ts-gemini-cua | Yes | GOOGLE_API_KEY |
60+
| typescript | claude-agent-sdk | ts-claude-agent-sdk | ts-claude-agent-sdk | Yes | ANTHROPIC_API_KEY |
6061
| python | sample-app | py-sample-app | python-basic | No | - |
6162
| python | captcha-solver | py-captcha-solver | python-captcha-solver | No | - |
6263
| python | browser-use | py-browser-use | python-bu | Yes | OPENAI_API_KEY |
6364
| python | anthropic-computer-use | py-anthropic-cua | python-anthropic-cua | Yes | ANTHROPIC_API_KEY |
6465
| python | openai-computer-use | py-openai-cua | python-openai-cua | Yes | OPENAI_API_KEY |
6566
| python | openagi-computer-use | py-openagi-cua | python-openagi-cua | Yes | OAGI_API_KEY |
67+
| python | claude-agent-sdk | py-claude-agent-sdk | py-claude-agent-sdk | Yes | ANTHROPIC_API_KEY |
6668

6769
### Create Commands
6870

@@ -77,6 +79,7 @@ Run each of these (they are non-interactive when all flags are provided):
7779
../bin/kernel create -n ts-magnitude -l typescript -t magnitude
7880
../bin/kernel create -n ts-openai-cua -l typescript -t openai-computer-use
7981
../bin/kernel create -n ts-gemini-cua -l typescript -t gemini-computer-use
82+
../bin/kernel create -n ts-claude-agent-sdk -l typescript -t claude-agent-sdk
8083

8184
# Python templates
8285
../bin/kernel create -n py-sample-app -l python -t sample-app
@@ -85,6 +88,7 @@ Run each of these (they are non-interactive when all flags are provided):
8588
../bin/kernel create -n py-anthropic-cua -l python -t anthropic-computer-use
8689
../bin/kernel create -n py-openai-cua -l python -t openai-computer-use
8790
../bin/kernel create -n py-openagi-cua -l python -t openagi-computer-use
91+
../bin/kernel create -n py-claude-agent-sdk -l python -t claude-agent-sdk
8892
```
8993

9094
## Step 5: Deploy Each Template
@@ -163,6 +167,15 @@ echo "GOOGLE_API_KEY=<value from human>" > .env
163167
cd ..
164168
```
165169

170+
**ts-claude-agent-sdk** (needs ANTHROPIC_API_KEY):
171+
172+
```bash
173+
cd ts-claude-agent-sdk
174+
echo "ANTHROPIC_API_KEY=<value from human>" > .env
175+
../bin/kernel deploy index.ts --env-file .env
176+
cd ..
177+
```
178+
166179
**py-browser-use** (needs OPENAI_API_KEY):
167180

168181
```bash
@@ -199,6 +212,15 @@ echo "OAGI_API_KEY=<value from human>" > .env
199212
cd ..
200213
```
201214

215+
**py-claude-agent-sdk** (needs ANTHROPIC_API_KEY):
216+
217+
```bash
218+
cd py-claude-agent-sdk
219+
echo "ANTHROPIC_API_KEY=<value from human>" > .env
220+
../bin/kernel deploy main.py --env-file .env
221+
cd ..
222+
```
223+
202224
## Step 6: Provide Invoke Commands
203225

204226
Once all deployments are complete, present the human with these invoke commands to test manually:
@@ -212,6 +234,7 @@ kernel invoke ts-anthropic-cua cua-task --payload '{"query": "Return the first u
212234
kernel invoke ts-magnitude mag-url-extract --payload '{"url": "https://en.wikipedia.org/wiki/Special:Random"}'
213235
kernel invoke ts-openai-cua cua-task --payload '{"task": "Go to https://news.ycombinator.com and get the top 5 articles"}'
214236
kernel invoke ts-gemini-cua gemini-cua-task --payload '{"startingUrl": "https://www.magnitasks.com/", "instruction": "Click the Tasks option in the left-side bar, and move the 5 items in the To Do and In Progress items to the Done section of the Kanban board? You are done successfully when the items are moved."}'
237+
kernel invoke ts-claude-agent-sdk agent-task --payload '{"task": "Go to https://news.ycombinator.com and get the top 3 stories"}'
215238

216239
# Python apps
217240
kernel invoke python-basic get-page-title --payload '{"url": "https://www.google.com"}'
@@ -220,13 +243,14 @@ kernel invoke python-bu bu-task --payload '{"task": "Compare the price of gpt-4o
220243
kernel invoke python-anthropic-cua cua-task --payload '{"query": "Return the first url of a search result for NYC restaurant reviews Pete Wells"}'
221244
kernel invoke python-openai-cua cua-task --payload '{"task": "Go to https://news.ycombinator.com and get the top 5 articles"}'
222245
kernel invoke python-openagi-cua openagi-default-task -p '{"instruction": "Navigate to https://agiopen.org and click the What is Computer Use? button"}'
246+
kernel invoke py-claude-agent-sdk agent-task --payload '{"task": "Go to https://news.ycombinator.com and get the top 3 stories"}'
223247
```
224248

225249
## Step 7: Automated Runtime Testing (Optional)
226250

227-
**STOP and ask the human:** "Would you like me to automatically invoke all 13 templates and report back on their runtime status?"
251+
**STOP and ask the human:** "Would you like me to automatically invoke all 15 templates and report back on their runtime status?"
228252

229-
If the human agrees, invoke each template and collect results. Present findings in this format:
253+
If the human agrees, invoke each template use the Kernel CLI and collect results. Present findings in this format:
230254

231255
### Testing Guidelines
232256
- **Parallel execution:** You may run multiple invocations in parallel to speed up testing.
@@ -243,12 +267,14 @@ If the human agrees, invoke each template and collect results. Present findings
243267
| ts-magnitude | ts-magnitude | | |
244268
| ts-openai-cua | ts-openai-cua | | |
245269
| ts-gemini-cua | ts-gemini-cua | | |
270+
| ts-claude-agent-sdk | ts-claude-agent-sdk | | |
246271
| py-sample-app | python-basic | | |
247272
| py-captcha-solver | python-captcha-solver | | |
248273
| py-browser-use | python-bu | | |
249274
| py-anthropic-cua | python-anthropic-cua | | |
250275
| py-openai-cua | python-openai-cua | | |
251276
| py-openagi-cua | python-openagi-cua | | |
277+
| py-claude-agent-sdk | py-claude-agent-sdk | | |
252278

253279
Status values:
254280
- **SUCCESS**: App started and returned a result
@@ -261,9 +287,9 @@ Notes should include brief error messages for failures or confirmation of succes
261287
- [ ] Built CLI with `make build`
262288
- [ ] Created QA directory
263289
- [ ] Got KERNEL_API_KEY from human
264-
- [ ] Created all 13 template variations
290+
- [ ] Created all 15 template variations
265291
- [ ] Got required API keys from human (OPENAI_API_KEY, ANTHROPIC_API_KEY, GOOGLE_API_KEY, OAGI_API_KEY)
266-
- [ ] Deployed all 13 apps
292+
- [ ] Deployed all 15 apps
267293
- [ ] Provided invoke commands to human for manual testing
268294
- [ ] (Optional) Ran automated runtime testing and reviewed results
269295

.goreleaser.yaml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -29,23 +29,23 @@ archives:
2929
brews:
3030
- name: kernel
3131
repository:
32-
owner: onkernel
32+
owner: kernel
3333
name: homebrew-tap
3434
branch: main
3535
directory: Formula
3636
description: "Kernel CLI"
37-
homepage: "https://github.com/onkernel/cli"
37+
homepage: "https://github.com/kernel/cli"
3838
test: |
3939
system "#{bin}/kernel", "--version"
4040
4141
npms:
4242
- name: "@onkernel/cli"
43-
repository: "https://github.com/onkernel"
44-
bugs: https://github.com/onkernel/cli/issues
43+
repository: "https://github.com/kernel"
44+
bugs: https://github.com/kernel/cli/issues
4545
description: Kernel CLI
46-
homepage: https://onkernel.com/docs
46+
homepage: https://www.kernel.sh/docs
4747
license: MIT
48-
author: "Rafael Garcia <raf@onkernel.com>"
48+
author: "Rafael Garcia <raf@kernel.sh>"
4949
access: public
5050
keywords:
5151
- kernel
@@ -85,11 +85,11 @@ changelog:
8585
release:
8686
name_template: "Kernel CLI v{{ .Version }}"
8787
footer: |
88-
**Full Changelog**: https://github.com/onkernel/cli/compare/{{ .PreviousTag }}...{{ .Tag }}
88+
**Full Changelog**: https://github.com/kernel/cli/compare/{{ .PreviousTag }}...{{ .Tag }}
8989
9090
## What to do next?
9191
92-
- Read the [documentation](https://onkernel.com/docs)
92+
- Read the [documentation](https://www.kernel.sh/docs)
9393
- Join our [Discord server](https://discord.gg/FBrveQRcud)
9494
- Follow us on Twitter [here](https://twitter.com/rfgarcia) and [here](https://x.com/juecd__)
9595

README.md

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
</p>
44

55
<p align="center">
6-
<img alt="GitHub License" src="https://img.shields.io/github/license/onkernel/cli">
6+
<img alt="GitHub License" src="https://img.shields.io/github/license/kernel/cli">
77
<a href="https://discord.gg/FBrveQRcud"><img src="https://img.shields.io/discord/1342243238748225556?logo=discord&logoColor=white&color=7289DA" alt="Discord"></a>
88
<a href="https://x.com/juecd__"><img src="https://img.shields.io/twitter/follow/juecd__" alt="Follow @juecd__"></a>
99
<a href="https://x.com/rfgarcia"><img src="https://img.shields.io/twitter/follow/rfgarcia" alt="Follow @rfgarcia"></a>
@@ -13,7 +13,7 @@
1313

1414
The Kernel CLI is a fast, friendly command‑line interface for Kernel — the platform that provides sandboxed, ready‑to‑use Chrome browsers for browser automations and web agents.
1515

16-
Sign up at [onkernel.com](https://www.onkernel.com/) and read the [docs](https://onkernel.com/docs/introduction).
16+
Sign up at [kernel.sh](https://www.kernel.sh/) and read the [docs](https://www.kernel.sh/docs/introduction).
1717

1818
## What's Kernel?
1919

@@ -124,6 +124,7 @@ Create an API key from the [Kernel dashboard](https://dashboard.onkernel.com).
124124
- `gemini-computer-use` - Implements a Gemini computer use agent (TypeScript only)
125125
- `openagi-computer-use` - OpenAGI Lux computer-use models (Python only)
126126
- `magnitude` - Magnitude framework sample (TypeScript only)
127+
- `claude-agent-sdk` - Claude Agent SDK browser automation agent
127128

128129
### App Deployment
129130

@@ -395,6 +396,9 @@ kernel create --name my-agent --language ts --template stagehand
395396

396397
# Create a Python Computer Use app
397398
kernel create --name my-cu-app --language py --template anthropic-computer-use
399+
400+
# Create a Claude Agent SDK app (TypeScript or Python)
401+
kernel create --name my-claude-agent --language ts --template claude-agent-sdk
398402
```
399403

400404
### Deploy with environment variables
@@ -587,15 +591,15 @@ kernel proxies delete prx_123 --yes
587591

588592
For complete documentation, visit:
589593

590-
- [📖 Documentation](https://onkernel.com/docs)
591-
- [🚀 Quickstart Guide](https://onkernel.com/docs/quickstart)
592-
- [📋 CLI Reference](https://onkernel.com/docs/reference/cli)
594+
- [📖 Documentation](https://www.kernel.sh/docs)
595+
- [🚀 Quickstart Guide](https://www.kernel.sh/docs/quickstart)
596+
- [📋 CLI Reference](https://www.kernel.sh/docs/reference/cli)
593597

594598
## Support
595599

596600
- [Discord Community](https://discord.gg/kernel)
597601
- [GitHub Issues](https://github.com/onkernel/kernel/issues)
598-
- [Documentation](https://onkernel.com/docs)
602+
- [Documentation](https://www.kernel.sh/docs)
599603

600604
---
601605

cmd/app.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import (
44
"fmt"
55
"strings"
66

7-
"github.com/onkernel/cli/pkg/util"
7+
"github.com/kernel/cli/pkg/util"
88
"github.com/onkernel/kernel-go-sdk"
99
"github.com/pterm/pterm"
1010
"github.com/samber/lo"

cmd/auth.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import (
66
"time"
77

88
"github.com/golang-jwt/jwt/v5"
9-
"github.com/onkernel/cli/pkg/auth"
9+
"github.com/kernel/cli/pkg/auth"
1010
"github.com/pterm/pterm"
1111
"github.com/spf13/cobra"
1212
"github.com/zalando/go-keyring"

cmd/browser_pools.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import (
66
"fmt"
77
"strings"
88

9-
"github.com/onkernel/cli/pkg/util"
9+
"github.com/kernel/cli/pkg/util"
1010
"github.com/onkernel/kernel-go-sdk"
1111
"github.com/onkernel/kernel-go-sdk/option"
1212
"github.com/pterm/pterm"

cmd/browsers.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ import (
1515
"strconv"
1616
"strings"
1717

18-
"github.com/onkernel/cli/pkg/util"
18+
"github.com/kernel/cli/pkg/util"
1919
"github.com/onkernel/kernel-go-sdk"
2020
"github.com/onkernel/kernel-go-sdk/option"
2121
"github.com/onkernel/kernel-go-sdk/packages/pagination"

cmd/create.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import (
66
"os"
77
"path/filepath"
88

9-
"github.com/onkernel/cli/pkg/create"
9+
"github.com/kernel/cli/pkg/create"
1010
"github.com/pterm/pterm"
1111
"github.com/spf13/cobra"
1212
)

cmd/create_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import (
88
"path/filepath"
99
"testing"
1010

11-
"github.com/onkernel/cli/pkg/create"
11+
"github.com/kernel/cli/pkg/create"
1212
"github.com/pterm/pterm"
1313
"github.com/stretchr/testify/assert"
1414
"github.com/stretchr/testify/require"

cmd/deploy.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ import (
1515
"time"
1616

1717
"github.com/joho/godotenv"
18-
"github.com/onkernel/cli/pkg/util"
18+
"github.com/kernel/cli/pkg/util"
1919
kernel "github.com/onkernel/kernel-go-sdk"
2020
"github.com/onkernel/kernel-go-sdk/option"
2121
"github.com/pterm/pterm"

0 commit comments

Comments
 (0)