Go to file
王性驊 c3e615c83c fix: ChatGPT 方案第二輪審查的 P2
- 沒有正常結束的回答(response.incomplete)算失敗,那一步的工具不執行。
- 額度用完後,沒人在看的要求(例行任務、訊息管道、檢查)先不送,直到有一次成功。
- 提早更新 token 遇到網路問題時,手上還有幾分鐘的 token 照用(以前那幾分鐘每個要求都失敗)。
- 大腦的帳號狀態隨同步送到螢幕電腦(不含 token),模型選單、Bot 設定不再一律寫「未登入」。
- 螢幕電腦和手機只打開 https://auth.openai.com/ 的登入頁;手機擋彈出視窗時說明再按一次。
- 登出時憑證打不開、沒辦法撤銷,會告訴使用者去 ChatGPT 設定中斷;兩次撤銷之間隔一秒。
- 登入成功後自動抓一次模型清單。

已驗證: cargo test 全綠(chatgpt::、providers:: 新增用量上限暫停、incomplete、提早更新失敗、只開 OpenAI 登入頁)。
未驗證: 真的 ChatGPT 帳號登入與串流;螢幕電腦、手機實機(同上一個 commit)。審批路徑仍需人類簽名。

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Uirha3KhvSzysuKUobKUTR
2026-11-17 17:46:09 +08:00
.gitea/workflows chore: clippy 全部清乾淨,CI 有新警告就失敗;make lint 2026-11-17 11:18:12 +08:00
bench/computer-use feat: Bot 的電腦換成 LazyBoy2 的 XFCE 桌面,加上檔案管理員、文字編輯器、影像檢視器 2026-11-16 10:55:05 +08:00
box design: Bot 的電腦的桌面也換成思源黑體(第 14 版),拿掉粉圓 2026-11-16 22:18:32 +08:00
deploy design: 一套設計規格(電腦和手機同值)+讀的文字改成 Claude/Notion 的文件樣式 2026-11-16 21:51:30 +08:00
docs fix: ChatGPT 方案第二輪審查的 P2 2026-11-17 17:46:09 +08:00
fonts design: 一套設計規格(電腦和手機同值)+讀的文字改成 Claude/Notion 的文件樣式 2026-11-16 21:51:30 +08:00
icons 圖示: the cat — an ink engraving on yellow — is AnyBot's icon on the computer and the web 2026-11-11 23:24:05 +08:00
install One installer for every platform, first run included 2026-11-10 14:07:01 +08:00
mobile fix: ChatGPT 方案第二輪審查的 P2 2026-11-17 17:46:09 +08:00
relay 合併: 手機網頁的改良(web-pwa-polish):新訊息進場、iOS 鍵盤、觸感、主畫面捷徑、通知上直接允許/拒絕 2026-11-17 13:54:10 +08:00
shots/readme One computer-and-phone still, and the README stops advertising its style guide 2026-11-10 14:21:06 +08:00
skills version_0_1_1-alpha 2026-11-11 16:19:06 +08:00
src fix: ChatGPT 方案第二輪審查的 P2 2026-11-17 17:46:09 +08:00
.dockerignore AnyBot: first commit of the working desktop app 2026-11-04 16:51:51 +08:00
.gitignore Readmes: lead with the picture, and take the pictures fresh 2026-11-10 14:07:02 +08:00
CLAUDE.md 輪迴加固第一輪:工具腳本鎖、審批行為鎖、純函數性質測試 2026-11-16 16:21:55 +08:00
Cargo.lock feat: 紀錄檔、當掉報告、秘密遮罩 2026-11-17 11:09:13 +08:00
Cargo.toml feat: 紀錄檔、當掉報告、秘密遮罩 2026-11-17 11:09:13 +08:00
FEATURES.md fix: ChatGPT 方案第二輪審查的 P2 2026-11-17 17:46:09 +08:00
LICENSE Apache-2.0: license file, manifest fields, README section 2026-11-09 16:36:36 +08:00
MECHANICS.md AnyBot: first commit of the working desktop app 2026-11-04 16:51:51 +08:00
Makefile chore: clippy 全部清乾淨,CI 有新警告就失敗;make lint 2026-11-17 11:18:12 +08:00
README.en.md 記憶: a page to see it, a few lines picked while typing, a local model 2026-11-11 07:46:50 +08:00
README.md 記憶: a page to see it, a few lines picked while typing, a local model 2026-11-11 07:46:50 +08:00
SECURITY.md version_0_1_1-alpha 2026-11-11 16:19:06 +08:00
build.rs 版本: v<number>-<commit> with the build time, the same in the app, the phone, --version and the server log 2026-11-11 13:51:52 +08:00
clippy.toml feat: 所有 HTTP 用戶端信任同一份憑證;連接器連同它帶起來的程式一起關;按停止馬上結束連接器的呼叫 2026-11-17 11:13:59 +08:00
install.cmd One installer for every platform, first run included 2026-11-10 14:07:01 +08:00
install.ps1 公測前第二輪:區網直連改 HTTPS、手腳只聽大腦簽過的指令、更新驗簽章、聊天各存各的檔、視窗沒在前面也照常運作(提示音不再等你切回來) 2026-11-14 00:40:16 +08:00
install.sh 公測前第二輪:區網直連改 HTTPS、手腳只聽大腦簽過的指令、更新驗簽章、聊天各存各的檔、視窗沒在前面也照常運作(提示音不再等你切回來) 2026-11-14 00:40:16 +08:00
mechanics.json AnyBot: first commit of the working desktop app 2026-11-04 16:51:51 +08:00

README.en.md

AnyBot

AnyBot

An AI assistant that runs on your own computers.
It chats, and it does things: files, commands, web pages, the screen in front of you, and jobs on a clock.

中文 · English

Apache-2.0 macOS, Linux, Windows Rust 1.95 self-hosted

A list of bots on the left, a chat with one of them on the right

You bring the model key: xAI, OpenAI, Claude, Gemini, OpenRouter, OpenCode Go, Ollama at home, or anything that speaks the OpenAI API. Chats, files, and passwords stay on your machines instead of landing in someone else's account server. Each row on the left is a bot — research, writing, “touch the computer” — and each can use a different model.


Install in 30 seconds

Open a terminal and paste one line.

# macOS, Linux (not Ubuntu-only: apt, dnf, yum, pacman, zypper, apk, xbps)
curl -fsSL https://code.30cm.net/daniel.w/AnyBot/raw/branch/main/install.sh | sh
# Windows 10/11 (x64, arm64)
irm https://code.30cm.net/daniel.w/AnyBot/raw/branch/main/install.ps1 | iex

It installs what it needs, asks which piece you want, and walks through the first setup. The first build takes 5–15 minutes, later updates 1–2. It lives in your user folder and needs no administrator account.

Then open AnyBot (on a Mac, the first time: right-click the icon › Open), paste an API key under Settings › Models, make a bot, and talk to it. No key? Pick Ollama and it runs on your own machine.

Account server + brain (any Linux with Docker, 2 GB RAM or more; it asks for a domain, a user, a password, and handles HTTPS itself):

curl -fsSL https://code.30cm.net/daniel.w/AnyBot/raw/branch/main/install.sh | sh -s -- server

Headless hands (a computer for the bot to use; a screen is optional). The URL and the pairing code come from “Add a computer” in AnyBot:

curl -fsSL https://code.30cm.net/daniel.w/AnyBot/raw/branch/main/install.sh \
  | sh -s -- hands https://your-address 482913
# Hands on Windows
$env:ANYBOT_MODE='hands'
$env:ANYBOT_PAIR_URL='https://your-address'
$env:ANYBOT_PAIR_CODE='482913'
irm https://code.30cm.net/daniel.w/AnyBot/raw/branch/main/install.ps1 | iex

Running this from an agent, with no questions asked: sh install.sh --print reports what fits this machine, then use the environment variables — see install/AGENT.md.


It asks before it acts

Say “do this on my computer” and it does not just run it. You see the exact step and choose allow once, always, or no. Sending, paying, and deleting are asked every time, even when you turned the other prompts off.

Left: a card asking permission before a command runs on your computer. Right: the phone page, asking you to sign in

  • Files and commands — it asks first. Or it works only inside its own computer, a small desktop kept apart from yours.
  • Web pages and forms — its own browser. Passwords and card numbers are filled by the app, not read out to the model.
  • The screen you are using — it reads the buttons in the screenshot, then clicks. If it needs you to sign in, it hands you the screen.
  • A clock — “every weekday at 9, three news items” becomes a routine.
  • A phone, from anywhere — open your URL in a browser, sign in, and it is the same chat; watch it from outside.

A weekday 9:00 news routine created from the chat


One machine thinks, others get used

One machine remembers and thinks (the brain). Others are there to be used (the hands). The phone is only a window. They all meet on an account server you run, so the computers at home do not open a port or need a public address.

  you on the phone          you on a laptop         a computer with no screen
        \                      |                      /
         └───── account server (it only connects them) ─────┘
                               |
               brain: bots, chats, memory, routines live here
                               |
        hands: the brain asks this machine to see, click, read, browse
Role What you do
Brain Set up the server once, or use a Mac that stays awake
Screen Install the desktop app and sign in to the same account
Hands Press “Add a computer” and paste the line it shows
Phone Open your URL in a browser and add it to the Home screen

No server yet? Use one always-on Mac as the brain — see option B in docs/multi-device.md.


What happens to a sentence

flowchart TD
  you[You: desktop app or phone]
  relay[Account server<br/>relays only, stores no chats]
  brain[AnyBot on the brain]
  model[The model you picked]
  ask[Touch the computer? Ask first]
  box[The bot's own computer<br/>a small desktop in Docker]
  hands[One of the hands<br/>your Mac, Linux, or Windows]

  you --> relay --> brain
  brain --> model
  brain --> ask
  ask --> box
  ask --> hands
  1. You send a message on the desktop or the phone. The phone does not think for itself; it reads the same chat on the brain.
  2. The brain hands that sentence, the bot's instructions, and its tools to the model you picked.
  3. If the model only answers, it writes back. If it wants to read a file, open a page, or click something, it proposes an action.
  4. That action goes through AnyBot's own rules first — the model does not decide whether it is allowed.
  5. Once you allow it, the action runs on the computer you chose: the isolated desktop, the one you are using, or a paired hand.
  6. The result goes back into the chat. Phone and laptop show the same thing because both read the brain.

Three programs are enough, and there is no database server: anybot (the desktop, the background service anybot --serve, and the terminal setup anybot setup are this one file), anybot-relay (the account server; computers connect out to it), and the phone page (one file, built into the app). Details in docs/architecture.md.


Documents

You want… Read
Phone, brain, hands, “it will not connect” docs/multi-device.md
A platform failed, build it yourself docs/install.md
How the code is layered docs/architecture.md
What a bot remembers, and how much reaches the model (Chinese) docs/memory.md
The account server's API docs/protocol.md
Trust boundaries, where keys live SECURITY.md
Every feature, listed FEATURES.md
Packaging, CI docs/release.md

Chinese is the source of truth; docs/en/ is a summary for people who do not read Chinese.

Hack on it

git clone https://code.30cm.net/daniel.w/AnyBot.git
cd AnyBot
make deps && make && make install

make run opens it, make test runs the tests, make help lists everything.

License

Apache-2.0, see LICENSE.