Next.jsReact启动器

vercel-example — Next.js 启动器模板

作者 kernel

Kernel 提供的 Vercel 示例模板,包含基于 Next.js 的聊天界面与部署在 Kernel 上的浏览器自动化 agent,用于构建可控制浏览器的 AI 聊天机器人。

看看你的网站会是什么样

浏览真实页面截图,比较内容排版与手机效果。点击下方缩略图切换,放大查看整页细节。

3 个预览视图
桌面端首页1 / 3
桌面端截图首屏预览

由服务器浏览器实际访问页面后截取。

全部页面与视图 3

截图用于了解视觉与布局,交互效果请以实际项目为准。

采集于 2026-10-14查看来源

值得关注的模板亮点

从已有项目资料中,快速了解它的特点。

01

包含 packages/agent 与 packages/web 两个包,分别负责浏览器 agent 与聊天界面

02

web 包使用 Next.js、Vercel AI SDK 和 Assistant-UI 构建聊天界面

03

agent 作为 Kernel 应用中的 action 部署,运行 Claude Computer Use Playwright SDK 控制浏览器

04

聊天机器人以路由形式部署在 web 应用中,并通过 browserAgentTool 控制浏览器

05

README 说明可将 web 应用部署到 Vercel,并提示 Vercel Functions 存在运行时长限制

模板详细介绍

该模板是一个具备浏览器自动化能力的聊天机器人示例,仓库分为 packages/agent 与 packages/web 两个包。web 包使用 Next.js、Vercel AI SDK 和 Assistant-UI 构建聊天界面,聊天机器人以路由形式部署在 web 应用中,并通过 browserAgentTool 控制浏览器;agent 包作为 Kernel 应用中的 action 部署,运行 Claude Computer Use Playwright SDK 来操作浏览器。README 提供了从注册 Kernel 账号、获取 API key、克隆仓库、安装 Kernel CLI、配置环境变量,到部署 agent 和启动 web 开发服务器的步骤,并说明可将 web 应用部署到 Vercel。README 未说明该模板的性能、生产就绪程度或除上述内容外的其他功能。

Next.js启动器

适合你的项目吗?

适用场景

  • 构建可控制浏览器的 AI 聊天机器人示例
  • 在 Kernel 上部署并运行浏览器自动化 agent
  • 将聊天界面部署到 Vercel 并连接 Kernel 上的 agent
  • 基于模板扩展自定义工具与聊天机器人

适合人群

  • 希望了解 Kernel 与 Vercel 结合方式的开发者
  • 需要浏览器自动化聊天机器人参考实现的开发者
  • 使用 Next.js 与 Vercel AI SDK 构建聊天界面的开发者

上手与定制指南

结合仓库当前版本的说明,按下面的资料检查内容、配置与运行要求。

  1. 1

    注册 Kernel 账号并创建 API key

  2. 2

    克隆仓库后,在 packages/agent 和 packages/web 目录中分别将 .env.example 复制为 .env,并填入 KERNEL_API_KEY 与 ANTHROPIC_API_KEY

  3. 3

    通过 brew install onkernel/tap/kernel 安装 Kernel CLI

  4. 4

    运行 pnpm run deploy:agent 将 agent 部署到 Kernel

  5. 5

    运行 pnpm run dev:web 启动 web 开发服务器,访问 http://localhost:3000

查看仓库使用说明

授权与来源资料

使用条件与限制

免费使用 · 保留许可声明

本次收录的是公开仓库中采用 MIT 许可的免费版本;免费范围为该版本代码,不代表外部服务或第三方素材免费。

使用时需要遵守

  • 允许免费使用、修改、商用和分发该版本代码。
  • 分发代码副本或实质性部分时,保留原作者版权声明和完整 MIT 许可声明。
  • 代码按现状提供;担保与责任限制以原许可证及适用法律为准。

额外费用与待核对事项

  • 演示图片、字体、图标及其他第三方素材需按各自许可核对,不能仅凭代码的 MIT 许可判断。
  • 域名、托管、数据库、支付或 AI 等外部服务可能另外收费。
  • 使用前必须注册 Kernel 账号并创建 API key,属于外部服务账号要求。
  • 需要在 packages/agent 和 packages/web 的 .env 中配置 Kernel API key 与 Anthropic API key,缺少密钥无法运行。
  • 必须先将 agent 部署到 Kernel 平台,web 应用才能正常工作。
  • 部署到 Vercel 前需确保已按 Getting Started 将 AI web agent 部署到 Kernel。
  • Vercel Functions 有运行时长限制,长任务可能因 Vercel 设置而超时。
查看原文依据

Permission is hereby granted, free of charge

许可证原文

1. Sign up for a [Kernel account](https://dashboard.onkernel.com/sign-up) and create an API key.

README 原文

4. Add your Kernel API key and Anthropic API key to the `.env` file in the `packages/agent` and `packages/web` directories.

README 原文

5. Deploy the agent to Kernel:

README 原文

You can deploy the web app on Vercel. Make sure you've also deployed the AI web agent on Kernel as described in the Getting Started section.

README 原文

Vercel Functions have [limits](https://vercel.com/docs/functions/configuring-functions/duration) on how long they can run. Configure the app's [here](https://github.com/onkernel/vercel-template/blob/56656ccd6f6d5de084f29974d03ea4f88c35cf84/packages/web/app/api/chat/route.ts#L11). Long-running tasks may time out depending on your Vercel settings.

README 原文
https://github.com/kernel/vercel-example/blob/main/LICENSEhttps://github.com/kernel/vercel-example/blob/main/README.md

DeepSeek 根据仓库许可证和 README 整理 ·2026-10-14。结果仅覆盖已读取资料,依赖、图片、字体及后续条款变更以各自原文为准。

项目核对记录与介绍依据

模板资料

来源平台
GitHub
资料与维护参考分
资料较完整 · 77 / 100
技术栈
Next.js · React
网站类型
启动器
这个分数如何计算

本站按许可资料(最高30分)、演示链接(12分)、预览图(10分)、Star数(15分)、记录的维护时间(15分)、描述完整度(8分)、功能记录(5分)和分类资料(5分)计算。它不是代码、安全或性能测试,也不是 Google 评分;有链接不代表已实测可用。

这个项目需要核对什么

记录的仓库更新时间
2025-10-16
截图检查日期
2026-10-14

已收录演示链接。请用你的内容与屏幕尺寸检查;有演示不代表表单、认证或支付已经可用。

目录记录的主要技术栈是 Next.js。请通过依赖清单和锁文件核对实际版本与托管要求。这些说明基于收录资料,不代表代码审计或部署实测。

查看具体选型方法 →

介绍的制作与核对状态

介绍由 AI 辅助整理目录与仓库资料。仓库作者不等于这篇介绍的审核者。

审核声明: codex-user-requested-batch-review-20261015 · 2026-10-15

查看当时使用的来源资料

SHA-256: 088c1672f310730ab4b1ccee2f5b6e24ffdd27e0a92f3ba0217cb6aa3077108a

2026-10-14T08:40:10.471Z

来源文件 / 仓库
<p align="center">
  <img src="static/images/kernel_wordmark.svg" alt="Kernel Logo" width="55%">
</p>

<p align="center">
  <img alt="GitHub License" src="https://img.shields.io/github/license/onkernel/vercel-template">
  <a href="https://discord.gg/FBrveQRcud"><img src="https://img.shields.io/discord/1342243238748225556?logo=discord&logoColor=white&color=7289DA" alt="Discord"></a>
  <a href="https://x.com/onkernel"><img src="https://img.shields.io/twitter/follow/onkernel" alt="Follow @onkernel"></a>
</p>

# Kernel Vercel Example

A chatbot template with browser automation capabilities. Uses [Next.js](https://nextjs.org/), [Vercel AI SDK](https://ai-sdk.dev), [Assistant-UI](https://github.com/assistant-ui/assistant-ui), and [Kernel](https://www.onkernel.com).

<p align="center">
  <img src="https://github.com/user-attachments/assets/c7b212a6-8872-4c82-8f1d-92c9021eb393" alt="kernel-vercel-template">
</p>

## Getting Started

1. Sign up for a [Kernel account](https://dashboard.onkernel.com/sign-up) and create an API key.

2. Clone the repository:
```bash
git clone https://github.com/onkernel/vercel-template.git
cd vercel-template
```

3. Download the Kernel CLI:
```bash
brew install onkernel/tap/kernel
```

4. Add your Kernel API key and Anthropic API key to the `.env` file in the `packages/agent` and `packages/web` directories.

```bash
cd packages/agent && cp .env.example .env
cd ../web && cp .env.example .env

# In .env
KERNEL_API_KEY=your-api-key
ANTHROPIC_API_KEY=your-api-key
```

5. Deploy the agent to Kernel:

```bash
pnpm run deploy:agent
```

6. Run the development server for the web app:

```bash
pnpm run dev:web
```

You can now access the web app at `http://localhost:3000`

## Deploying to Vercel

You can deploy the web app on Vercel. Make sure you've also deployed the AI web agent on Kernel as described in the Getting Started section.

[![Deploy with Vercel](https://vercel.com/button)](https://vercel.com/new/clone?repository-url=https%3A%2F%2Fgithub.com%2Fonkernel%2Fvercel-template%2Ftree%2Fmain%2Fpackages%2Fweb&env=KERNEL_API_KEY&env=ANTHROPIC_API_KEY&envDescription=API%20keys%20needed%20for%20the%20application.&envLink=https%3A%2F%2Fdashboard.onkernel.com%2Fsign-up&project-name=web-agent-app)

Vercel Functions have [limits](https://vercel.com/docs/functions/configuring-functions/duration) on how long they can run. Configure the app's [here](https://github.com/onkernel/vercel-template/blob/56656ccd6f6d5de084f29974d03ea4f88c35cf84/packages/web/app/api/chat/route.ts#L11). Long-running tasks may time out depending on your Vercel settings.

## Project Layout

```bash
kernel-vercel-template/
├── packages/
│   ├── agent/ # Kernel browser agent
│   ├── web/ # Next.js web app
```

### `packages/agent`

The agent is deployed as an [action](https://docs.onkernel.com/info/concepts#action) in your Kernel app. The action runs our [Claude Computer Use Playwright SDK](https://github.com/onkernel/cu-playwright-ts) to control the browser.

You can tail the logs of the action by running `pnpm run logs` in the `packages/agent` directory.

### `packages/web`

The web app is responsible for the UI. It uses [Next.js](https://nextjs.org/), Vercel [AI SDK](https://ai-sdk.dev), and [Assistant-UI](https://github.com/assistant-ui/assistant-ui) to build the chat interface. The chatbot is deployed as a [route](packages/web/app/api/chat/route.ts) in the web app and uses the `browserAgentTool` to control the browser. You can extend this to build a custom chatbot with your own tools.

## What's Kernel?

Kernel provides hosted browsers on-demand for browser automations and web agents. You can connect to the browser using Chrome DevTools-based browser frameworks (Playwright, Puppeteer).

### What You Can Do With Kernel

- Run automated browser-based workflows
- Develop and test AI agents that use browsers
- Build custom tools that require controlled browser environments

## Support

For issues, questions, or feedback, please [open an issue](https://github.com/onkernel/vercel-template/issues) on this repository. You can also join our [Discord](https://discord.gg/FBrveQRcud).

## License

See the [LICENSE](./LICENSE) file for details.

## Colophon

The background wallpaper was generated by AI.

Made with ❤️ by the [Kernel team](https://www.onkernel.com).
反馈内容错误

看看同类模板

对比同技术栈与用途的模板,找到更适合的视觉与内容结构。