CopilotKit / OpenBot

本文为原文前 6,000 字符的节选翻译,完整内容请查看原文。

OpenBot The AI assistant your company can actually own. Same shape as ChatGPT, Claude or Grok, with one difference that matters: it runs on your infrastructure and you can change anything about it. Any agent stack, through AG-UI. Each coworker gets a real browser with its own logins, its own files, and only the tools you grant. Every action decided before it happens and recorded after. Talk to an engineer · Have us build it with you · copilotkit.ai/openbot · Quick start · Docs demo-openbot.mp4

OpenBot 是你公司真正能够拥有的 AI 助手。它与 ChatGPT、Claude 或 Grok 外形相似,但有一个关键区别:它运行在你的基础设施上,你可以更改关于它的任何内容。通过 AG-UI,它支持任何智能体技术栈。每位“同事”(智能体)都拥有一个带有独立登录信息、独立文件以及仅限于你授予的工具的真实浏览器。每一个动作在执行前都会经过决策,并在执行后进行记录。

Bring any AG-UI agent, written on a framework or by hand, and it arrives as a coworker with a channel of its own. Watch it work on its own screen, take the wheel when it reaches something it should not do alone, then hand it back. It answers with components rather than only prose, and the whole thing runs on your own machine. A template, not a product. OpenBot is meant to be cloned and made your own.

引入任何基于 AG-UI 的智能体,无论是使用框架编写还是手动编写,它都会以拥有独立频道的“同事”身份出现。你可以观察它在自己的屏幕上工作,当它遇到不应独自处理的任务时接管控制权,然后再交还给它。它通过组件而非仅仅是文字来回答问题,且整个系统运行在你自己的机器上。这是一个模板,而非成品。OpenBot 的设计初衷是被克隆并定制为你自己的工具。

There is no hosted version to sign up for, and nothing here is published as a package to depend on: every workspace in this repository is private. You take the repository, replace the example tenant package under examples/ with your own coworkers, channels and skills, and run it. Everything below describes a starting point, not a finished thing somebody operates for you. Beta, and under active development. OpenBot is early. Expect rough edges and bugs, and expect things to move. Issues and pull requests are welcome.

这里没有可供注册的托管版本,也没有发布任何可供依赖的包:此仓库中的每个工作区都是私有的。你需要获取该仓库,将 examples/ 下的示例租户包替换为你自己的同事、频道和技能,然后运行它。以下所有内容描述的都是一个起点,而不是别人为你运营的成品。目前处于测试阶段,且在积极开发中。OpenBot 还处于早期阶段,请预料到会有粗糙之处和漏洞,并预期事物会发生变动。欢迎提交问题和拉取请求。

Runs on your machine. Everything below is written for a laptop. .env.example carries OPENBOT_SINGLE_USER=true, which admits every request as one administrator, so a fresh clone reaches the product without registering an OAuth client first. Sign-in turns that off, and is required before anybody else can reach the deployment. We can build this for you, or with you, at your company. Our engineers will stand OpenBot up inside your infrastructure, customize it into something that looks like your own product, and hand it back to you to keep changing. Start the conversation.

运行在你的机器上。以下所有内容均针对笔记本电脑编写。.env.example 包含 OPENBOT_SINGLE_USER=true,它将每个请求都视为管理员请求,因此新克隆的项目无需先注册 OAuth 客户端即可访问产品。登录操作会关闭此功能,并且在其他人访问部署之前必须进行登录。我们可以在你的公司为你或与你一起构建此系统。我们的工程师将在你的基础设施内搭建 OpenBot,将其定制为看起来像你自己的产品,并交还给你以便持续修改。开启对话吧。

In the meantime, run all of it on your laptop, Intelligence included: CopilotKit’s free Developer plan covers running Intelligence locally in Docker on a Mac. What it is An agent platform that runs inside your own infrastructure. Docker Compose brings up every part of it, the data sits in your PostgreSQL, and the model is yours to choose: no model ships in the box, and an administrator supplies the credential, which is encrypted at rest and never logged.

在此期间,你可以在笔记本电脑上运行所有内容,包括 Intelligence:CopilotKit 的免费开发者计划涵盖了在 Mac 上通过 Docker 本地运行 Intelligence。它是什么?这是一个运行在你自有基础设施内的智能体平台。Docker Compose 可以启动它的所有部分,数据存储在你的 PostgreSQL 中,模型由你选择:系统不内置任何模型,管理员需提供凭据,凭据在静态存储时会被加密且从不记录日志。

A deployment starts with two coworkers, and they are configuration rather than code: General Assistant for everyday work and Knowledge for company questions. A Risk Analyst joins them once its endpoint is configured, and ten more wait in examples/fintech/catalog/, each doing one job — reading an expense claim against the policy as written, turning a meeting note into the follow-ups actually in it, drafting release notes from what shipped, triaging a ticket, answering a new starter from the handbook, writing a brief that names what it could not find, writing up an interview, handing an on-call shift over, assembling what is known before a renewal, and grouping customer feedback into themes it can cite.

部署时默认包含两位“同事”,它们是配置而非代码:用于日常工作的“通用助手”和用于回答公司问题的“知识库”。一旦配置了端点,风险分析师也会加入,此外 examples/fintech/catalog/ 中还有十个智能体待命,每个都负责一项工作——根据既定政策审核费用报销单、将会议记录转化为后续行动、根据发布内容起草发行说明、分类工单、根据手册回答新员工问题、撰写说明缺失信息的简报、整理面试记录、交接值班任务、在续约前汇总已知信息,以及将客户反馈归类为可引用的主题。

Copy one into examples/fintech/agents/ to add it, write your own there or in agents.yaml, or make one from /bots in the UI. Anything a Bot does to a computer, a file, an MCP server or a component goes through one gateway that decides and records it. That is the difference between an agent that can use your tools and an agent you can let near them. More at copilotkit.ai/openbot.

将其中一个复制到 examples/fintech/agents/ 即可添加,你也可以在那里或在 agents.yaml 中编写自己的智能体,或者通过 UI 中的 /bots 创建一个。机器人对计算机、文件、MCP 服务器或组件执行的任何操作都会通过一个网关,该网关负责决策并记录这些操作。这就是“可以使用你工具的智能体”与“你可以放心让其接触工具的智能体”之间的区别。更多信息请访问 copilotkit.ai/openbot。

Built on AG-UI A Bot is any endpoint speaking AG-UI, the open protocol for agent-to-user interaction, so OpenBot is not tied to a framework and neither are you. Agents built with LangGraph, Mastra, CrewAI, Pydantic AI, Google ADK or written by hand all arrive the same way, and the governance rides the protocol rather than the framework.

基于 AG-UI 构建:机器人是任何使用 AG-UI(一种用于智能体与用户交互的开放协议)的端点,因此 OpenBot 不受限于任何框架,你也不受限制。使用 LangGraph、Mastra、CrewAI、Pydantic AI、Google ADK 构建或手动编写的智能体都以相同方式接入,治理机制基于协议而非框架。

Requirements Docker, for PostgreSQL and the shipped Bots. Bun 1.4+, for the app, the API server and the tests (some tests fail on 1.3). A CopilotKit Intelligence project and license. A free plan is available, and Intelligence can be self-hosted. A model key. The proof-of-concept Bot uses OpenAI; the LangGraph Bot can use OpenAI, Anthropic, or Google.

要求:Docker(用于 PostgreSQL 和内置机器人)。Bun 1.4+(用于应用程序、API 服务器和测试,1.3 版本会导致部分测试失败)。CopilotKit Intelligence 项目和许可证(提供免费计划,Intelligence 可自托管)。模型密钥(概念验证机器人使用 OpenAI;LangGraph 机器人可使用 OpenAI、Anthropic 或 Google)。

Quick start Setting up with an AI assistant? Paste prompt.txt into it first. It carries the same steps as below plus the things that are easy to get wrong: which of the blank keys in .env.example are actually yours to fill (the CopilotKit key and a model key), which the start script fills for you, and what each start-up refusal means. Every claim in it is checked against this repository.

快速入门:正在使用 AI 助手进行设置?请先将 prompt.txt 粘贴进去。它包含了与下文相同的步骤,以及容易出错的地方:.env.example 中哪些空白密钥确实需要你填写(CopilotKit 密钥和模型密钥),哪些由启动脚本为你填写,以及每次启动拒绝意味着什么。其中的每一项声明都已根据此仓库进行了核对。

Create .env: cp .env.example .env bun install Connect a fresh managed Intelligence project: npx —yes copilotkit@latest login npx —yes copilotkit@latest project select bun scripts/setup-learning.ts The helper provisions the selected project’s runtime key, creates or reuses its openbot Learning container, then writes both settings to .env. It preserves custom container assignments and never replaces an existing OpenBot key; with one set, it only creates openbot in that key’s project if it is missing.

创建 .env:cp .env.example .env bun install 连接一个新的托管 Intelligence 项目:npx —yes copilotkit@latest login npx —yes copilotkit@latest project select bun scripts/setup-learning.ts 辅助脚本会配置所选项目的运行时密钥,创建或重用其 openbot Learning 容器,然后将这两项设置写入 .env。它会保留自定义容器分配,从不替换现有的 OpenBot 密钥;如果已设置,它仅在密钥对应的项目中创建 openbot(如果缺失的话)。

For fresh self-hosted setup, set INTELLIGENCE_API_URL to that deployment’s HTTPS API origin (or http://localhost for a local one) and run the helper without the two npx commands. It opens an isolated Chrome or Edge window for your usual sign-in and project choice; install either browser first. For CLI-managed local evaluation installs, it discovers the matching dashboard with the newest installed or cached CopilotKit CLI and uses that dashboard for login and session requests.

对于全新的自托管设置,请将 INTELLIGENCE_API_URL 设置为该部署的 HTTPS API 源(或本地部署的 http://localhost),并在不使用两个 npx 命令的情况下运行辅助脚本。它会打开一个独立的 Chrome 或 Edge 窗口供你进行常规登录和项目选择;请先安装其中一种浏览器。对于 CLI 管理的本地评估安装,它会通过最新安装或缓存的 CopilotKit CLI 发现匹配的仪表板,并使用该仪表板进行登录和会话请求。

Discovery runs offline with Bun, without downloading the CLI or requiring npx on your PATH. If no CLI is available, manually hosted deployments use their API origin for sign-in. Complete the local auth approval shown in the browser when prompted. The runtime API URL stays unchanged. It writes the API URL, the key and the container, not INTELLIGENCE_GATEWAY_WS_URL, so set that.

发现过程通过 Bun 离线运行,无需下载 CLI 或要求 PATH 中存在 npx。如果没有 CLI,手动托管的部署将使用其 API 源进行登录。在浏览器提示时完成本地身份验证批准。运行时 API URL 保持不变。它会写入 API URL、密钥和容器,但不会写入 INTELLIGENCE_GATEWAY_WS_URL,因此请自行设置该项。