OpenBot README

The project's README from github.com/CopilotKit/OpenBot. As one markdown file: README.md.

OpenBot

AI coworkers you can hand real work to, and actually trust with the access. Each gets a computer of its own: 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.

copilotkit.ai/openbot · Quick start · Features · Bring your own agent · Architecture · Docs

CI security License: MIT Alpha

Trendshift: #3 Repository Of The Day

https://github.com/user-attachments/assets/535ef7ee-1631-4a69-b839-564c56cf90b4

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. 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.

Alpha, and under active development. OpenBot is early. Expect rough edges and bugs, and expect things to move. Issues and pull requests are welcome.

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.

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.

Three coworkers ship in the example package, and they are configuration rather than code: General Assistant for everyday work, Knowledge for company questions, Risk Analyst for risk and compliance. Add your own by editing agents.yaml or from /agents 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.

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.

You talk to the server, which sends the turn to a Bot over AG-UI. Every tool call the Bot makes comes back through the gateway, which resolves the target, decides it against your policy, records an audit row, and only then acts, or refuses and names the rule. Allowed browser and file actions reach that Bot's own computer, one container each with its own Chromium, logins and workspace, built by the supervisor. Decisions land in PostgreSQL and threads in CopilotKit Intelligence.

Requirements

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 ten blank keys in .env.example are actually yours to fill (three), which the start script generates for you, and what each start-up refusal means. Every claim in it is checked against this repository.

  1. Create .env:

    cp .env.example .env
    
  2. Get CopilotKit Intelligence credentials:

    npx --yes copilotkit@latest login
    npx --yes copilotkit@latest project select
    

    Put the cpk-... runtime key from project select in .env as INTELLIGENCE_API_KEY. That is the only Intelligence credential you need: managed Intelligence derives entitlement from the project key, so there is no separate licence token to fetch.

  3. Fill the remaining required values:

    • OPENAI_API_KEY

    Keep the managed Intelligence URLs from .env.example unless you run Intelligence yourself. The example KEY_ENCRYPTION_KEY is public and fine locally; generate your own with:

    openssl rand -base64 32
    
  4. Install and run:

    bun install
    bash scripts/start.sh
    
  5. Open http://localhost:3010.

scripts/start.sh starts Docker services, applies migrations, starts the API server on port 3001, starts the app on port 3010, and checks that the services answer their own health routes before printing next steps.

scripts/stop.sh takes the same things down, including each Bot's computer, which compose does not own. Nothing is deleted: the database, the Bots' files and their browser profiles are volumes.

Deploy it

One image carries the app, the API, the browser the Bots drive, and optionally PostgreSQL. Same .env, no Kubernetes.

docker build -t openbot .
docker run -p 3001:3001 --env-file .env \
  -e EMBEDDED_POSTGRES=on -v openbot-data:/var/lib/postgresql openbot

Leave EMBEDDED_POSTGRES off and set DATABASE_URL to point at a database you already run. docs/deployment.md has the minimum sizes, the platform notes, and how it behaves behind more than one replica.

Try it

Main surfaces

Route Purpose
/ Start and browse channels.
/agents Create, edit, duplicate, hide, delete, and launch coworkers.
/channel/:id Converse with one coworker, watch its screen, and see what it ran.
/bot Direct chat with a Bot; ?agent=<id> selects one.
/skills Create and enable personal skills.
/settings User preferences.
/admin/credentials Store write-only encrypted credentials.
/admin/computers View, stop, and reset Bot computers.
/admin/boundaries Configure browser/file/MCP action policy.
/admin/components Publish components and govern which Bots may use them.
/admin/playground Draft and publish sandboxed components in the browser.
/admin/plugins Configure MCP servers, MCP grants, and deployment skills.
/admin/audit Review permitted, refused, and failed actions.

Features

Bring your own agent

Any AG-UI endpoint can be a Bot.

From /agents, create a coworker with:

The server validates agent endpoints with the same target checks used for browser navigation, at registration and again on every redirect the endpoint answers with. If no custom endpoint is set, product-created coworkers use MANAGED_AGENT_AG_UI_URL when it is configured, and are refused when it is not.

A private address is refused unless it is listed in AGENT_ENDPOINT_ALLOWED_HOSTS:

AGENT_ENDPOINT_ALLOWED_HOSTS=agents.internal,10.0.0.42:9000

A host on its own covers any port on that host; a host with a port pins that port. Matching is exact: no wildcards, no suffixes. An entry written as a URL, or containing *, stops startup and names that entry.

The list covers agent endpoints only. Browsing is unaffected, the addresses holding a deployment's own cloud credentials are refused whatever is listed, and listing an address permits registering an agent there rather than granting that agent anything.

Tenant package agents are declared in agents.yaml as either:

See docs/configuration.md and docs/coworkers.md.

Configuration

.env.example is the source template. The API server refuses to start without:

COPILOTKIT_LICENSE_TOKEN is optional. A self-hosted Intelligence with its own licence can still set it and it is forwarded to the runtime; managed Intelligence does not issue one and startup no longer asks for it.

Settings worth knowing:

Variable Use
OPENBOT_SINGLE_USER Admits every request as one administrator. Required when no identity provider is configured; .env.example ships it on.
OPENAI_BASE_URL Answers the OpenAI-shaped calls from somewhere else: a gateway, a proxy.
ANTHROPIC_BASE_URL, GOOGLE_GENERATIVE_AI_BASE_URL The same, for those two APIs.
COMPUTER_TOKEN Secret every Bot computer request must present. start.sh sets one.
SUPERVISOR_TOKEN Secret the supervisor requires. start.sh sets one.
AGENT_TOOL_TOKEN Secret a Bot presents to call a granted tool back. start.sh sets one. Without it no Bot may call tools.
COMPUTER_SUPERVISOR_URL Gives each Bot a computer of its own instead of one shared computer.
COMPUTER_RUNTIME Set to runsc to run computers under gVisor, where the host has it.
COMPUTER_SANDBOX Set to on for Chromium's own sandbox, where the host permits it.
EMBEDDED_POSTGRES Set to on for a database inside the deployment container.
AGENT_COMPUTER_POLICY JSON action policy. Malformed JSON stops server startup.
AGENT_COMPUTER_ALLOW_PRIVATE_HOSTS Lets a Bot reach this machine's own services. Local only, and refused under NODE_ENV=production.
AGENT_ENDPOINT_ALLOWED_HOSTS Private addresses an agent may be registered at, comma separated. A host, optionally with a port.
TENANT_PACKAGE_DIR Directory containing tenant YAML. Defaults to ../examples/fintech.
DEPLOYMENT_ID Names this deployment when two share one Intelligence project.

Full reference: docs/configuration.md.

Architecture

Service Port Purpose
app 3010 React/Vite UI.
server 3001 Hono API, CopilotKit runtime, auth, policy, audit, plugins, components, coworkers, and channels.
agent-computer 4100 Chromium plus /workspace and browser profile.
agent-bot 4200 Proof-of-concept AG-UI Bot.
agent-langgraph 4201 LangGraph AG-UI Bot.
supervisor 4500 host / 4300 container Creates and manages one computer per Bot.
PostgreSQL with pgvector 5432 Product data, policy, audit, credentials, grants, channels, and component metadata.
CopilotKit Intelligence external Durable threads and memory.

The server gateway is the product/API path for Bot browser and file tool calls. It resolves the target, evaluates policy, writes an audit row, and then calls agent-computer. The computer also exposes lower-level token-protected service endpoints; keep them private and do not use them to bypass the gateway.

More detail: docs/architecture.md.

Sign in

.env.example ships OPENBOT_SINGLE_USER=true, which is one administrator and no sign-in: how a fresh clone reaches the product without registering an OAuth client first. Delete that line and configure any one of Google, Microsoft or Okta before anybody else can reach the deployment. With neither, it refuses to start rather than admitting e

OpenBot (CopilotKit/OpenBot)

Searching Database…

6.6K ·GitHub
这是什么?OpenBot 是一个可自托管的平台,用于运行 AI 同事。每个 AI 同事都有自己的一台电脑(包括浏览器、文件,以及你授权的工具),并配有策略网关:在每个操作发生之前做出决定,并在事后记录日志。
这是一个可以直接注册使用的成品,还是需要我基于它来搭建?它明确是一个用于克隆的模板:没有托管版本,也没有作为包发布,你需要用自己的 AI 同事替换示例中的同事。
我该怎么把它跑起来?克隆仓库,从 .env.example 创建 .env,获取 CopilotKit Intelligence API 密钥和 OpenAI 密钥,然后用 Bun 安装并运行整个技术栈,同时由 Docker Compose 启动 PostgreSQL 和 Bot 电脑。
试用前需要先安装什么?你需要 Docker(用于 PostgreSQL 和随附的 Bot)、Bun 1.3+(用于应用和 API 服务器)、一个 CopilotKit Intelligence 项目(有免费套餐,也可以自托管),以及一个模型密钥,例如 OpenAI 的密钥。
这个项目现在有多稳定?该项目明确处于 alpha 阶段,并在持续开发中,因此在它不断变化的过程中,可能会有粗糙之处和错误。
我的凭证和密钥是如何处理的?凭证会在静态存储时加密,只能通过管理员凭证面板保存,绝不会通过任何 API 返回,并且会从审计事件中脱敏;密钥永远不会被写入对话记录。
示例中预先配置了哪些 AI 同事?示例租户包附带三个:General Assistant 用于日常工作,Knowledge 用于回答公司相关问题,Risk Analyst 用于风险与合规。它们都是用来替换为你自己的同事的。
一个 Bot 自己的“电脑”究竟包含什么?每个 Bot 都有自己的容器,配有专用的 /workspace 卷和独立的浏览器配置文件,还可以选择通过 COMPUTER_RUNTIME=runsc 在 gVisor 沙箱中运行。
当 Bot 卡住时(比如遇到登录页面),人可以接手吗?可以。遇到登录墙或两步验证提示时,Bot 可以请求帮助;人可以在同一面板中接管控制,整个交接过程会被记录为 computer.help_requested、computer.control_taken 和 computer.control_released。
如果 Bot 尝试使用一个未被授予的工具,会怎样?它会报告自己尚未被授予该连接器,而不会跳转到供应商的网站,因为 Bot 只会被告知它实际持有的连接器。
Creator
CopilotKit
Size
18.8 MB
Stars
6.6K
Age
2mo
Commits · 90 Days