Go to file
王性驊 2bdcfc4d36 接上 Claude Code(本機):Bot 的大腦可以用這台電腦上 claude 指令的訂閱,工具和審批仍走 AnyBot 自己的關卡
- src/claudecli.rs:每一步跑一次 claude(-p、stream-json、不給內建工具、不載入使用者的設定與 MCP、結構化回答);工具呼叫回到 AnyBot 執行,要問的照樣出卡片
- providers:新增 Claude Code(沒有金鑰、沒有服務網址;模型 opus、sonnet、haiku);沒裝時回覆說明怎麼裝
- ANYBOT_CLAUDE_CLI:只給驗證用;指到不存在的檔案就當作沒裝
- 功能地圖新增 claudecode 區;models、README、FEATURES 同步
- 手機:Claude Code 不顯示服務網址

已驗證: cargo test 全部 927 通過(含 claudecli::、featuremap::、tool_specs_are_locked、approval_decisions_are_characterized);verify-anybot scratch:沒裝時 Bot 回「找不到 Claude Code」、沒有 claude 程序、設定 › 模型的格子與選單只有預設模型和測試連線
未驗證: claude 已登入的真實路徑(要這台電腦和 Claude 額度,cargo test claudecli::real_cli -- --ignored 還沒跑);Windows;真的 claude 底下的審批卡片實際表現

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-11-26 11:58:50 +08:00
.claude/skills 接上 Claude Code(本機):Bot 的大腦可以用這台電腦上 claude 指令的訂閱,工具和審批仍走 AnyBot 自己的關卡 2026-11-26 11:58:50 +08:00
.gitea/workflows chore: clippy 全部清乾淨,CI 有新警告就失敗;make lint 2026-11-17 11:18:12 +08:00
bench/computer-use new flow 2026-11-20 21:54:48 +08:00
box design: Bot 的電腦的桌面也換成思源黑體(第 14 版),拿掉粉圓 2026-11-16 22:18:32 +08:00
deploy 手機「載入更早的對話」補上來的不會再不見:大腦每次送的只是它發布的那一段(最新 120 則、不含步驟結果,從手機那份的開頭起),往回補超過那一段的開頭之後,下一次更新(例如來一則新訊息)就整份換成那一段,剛補的又不見、按鈕跑回來;有工具步驟的聊天那一段很短,按一次就會。現在補上來的留在那一段前面(S.winAt),新訊息把舊的推出那一段時也接到前面,存起來的那份一起記著,切到別的 Bot 再回來、頁面重開也接得對(舊版頁面存的那份第一次只留大腦送來的那段,裡面可能有舊錯誤留下的缺口);等「載入更早」回來時聊天開頭移了就不接、從現在的開頭再問一次;對補上來的訊息按表情,向大腦拿那則現在的表情。回到最底下最多留 300 則,捲在上面讀時超過 600 則(背景 300、怎樣都超過 1200)從頂上收,正在讀的那則留在畫面同一個地方(切到背景那一刻記下,回到前景畫好再放回去)。順手修:點進聊天、按表情之後要等 20–40 秒才更新——11/20 起 loadChat 在大腦回「沒變」時直接 return,loading 一直卡在 true,之後只能等輪詢順便帶過來。手機的編號清單照 Markdown 的讀法:空一行隔開的還是同一個清單(以前每一點都是「1.」),編號從第一點寫的數字起,縮排在一點底下的子項目、續行在那一點裡(以前被攤平成同一層一起編號)。大腦管理員:核對 Docker 網路改不成寫進紀錄、還不知道擁有者時先不動;更新時 Caddyfile 用 relay 容器的 IP 或 .env 裡的 {$變數}/{$變數:預設} 轉到 relay 的也認得出來。功能地圖 chat 和 FEATURES 跟著改。 2026-11-23 11:15:51 +08:00
docs 接上 Claude Code(本機):Bot 的大腦可以用這台電腦上 claude 指令的訂閱,工具和審批仍走 AnyBot 自己的關卡 2026-11-26 11:58:50 +08:00
fonts 字體改成 Apple 的(SF Pro+蘋方,粗體用半粗),回答不再用宋體;設定左邊每頁加圖示;「模型」改成供應商圖塊(不再是設定旁邊再一排清單);「個人資料與用量」改成數字列+大數字+長條+彩色比例條,不再一整片字。 2026-11-22 08:35:28 +08:00
icons 修手機接管電腦後回不去;新增「風格」(8 套:紙、夜、墨、苔、海、糖、夕陽、終端機,一套顏色加聊天背景花紋,電腦和手機一起換,也能請 Bot 換);設定每一列都有圖示(電腦和手機)。 2026-11-22 09:38:00 +08:00
install One installer for every platform, first run included 2026-11-10 14:07:01 +08:00
mobile 接上 Claude Code(本機):Bot 的大腦可以用這台電腦上 claude 指令的訂閱,工具和審批仍走 AnyBot 自己的關卡 2026-11-26 11:58:50 +08:00
relay 裝置顯示離線時說得出原因,同名的電腦不再互踢、同一個登入的兩份不再假裝在線:帳號伺服器把每台電腦連上、斷線和原因(它那邊關掉了連線、超過 60 秒沒有訊號、連線被切斷…)寫進紀錄(deploy/server/setup.sh --logs relay;以前一整天只有一行啟動訊息),也記在記憶體裡:手機的電腦清單寫「離線(時間)· 原因」,大腦斷線時頂端寫「那台 AnyBot 目前離線:原因。連上後自動更新」(提示改成左右留邊、可以換行,以前一行放不下被切掉),anybot setup 的大腦清單也寫;斷線那一刻就記下最後在線的時間(以前每分鐘才記,不到一分鐘就斷的寫「從未連線」)。同一把金鑰的新連線取代舊的時,舊的那條在下一次十秒檢查時被告知並結束——以前它留著,讓這台一直顯示在線上,送過去的事卻 8 秒後都說離線;它等回應的那幾秒收到的回答照樣交出去。被取代的那份狀態寫原因,15 秒後、之後每 5 分鐘問帳號伺服器(/relay/host/peers 的 me_online),另一份還連著就繼續等,不搶回來輪流;接手的那條自己也斷了時,舊的那條被請去重新連上,不是叫它等。舊的那條被告知後沒回應關閉的(同一台換了網路、舊連線還沒被發現斷掉就重新連上),紀錄寫「由它重新連上的那條接手」,不說成兩份。登入時帳號裡另一台同名的正連著,新的在帳號裡叫「名字 (2)」(這台自己的名字不變,Bot 設定裡指到它的名字照舊有效),不再把它換掉掛斷——以前被踢的那台一直拿失效的金鑰重試,只看得到「離線」;在同一台帳號伺服器重新登入時帶著原本那一列的金鑰(只送給發它的那台),只換自己那一列:同名的別台睡著也不動,原本是「名字 (2)」就還是「名字 (2)」。帳號伺服器的紀錄:拿不認得的金鑰來連的位址十分鐘寫一次(沒帶金鑰的不寫,最多記一萬個位址)、被取代和兩份輪流連上同一台十分鐘寫一次,電腦名字裡的換行這類字元換掉,寫紀錄不在鎖裡。電腦這邊跟帳號伺服器的連線狀態變了就寫進紀錄(雲端大腦、沒有視窗的電腦也查得到;舊的連線程式不再蓋掉新的狀態);連線體檢多問帳號伺服器還認不認得這台的登入(不認得 ✗,說要重新登入,手腳電腦說要新的配對碼)。功能地圖 computers(新的 computers-online、它的驗證步驟和舊版兩份輪流的陷阱)、garden、server 和 FEATURES 跟著改。 2026-11-24 16:13:24 +08:00
shots/readme docs: README 重寫——跟上這一週的功能,圖從現在這版重拍 2026-11-18 08:10:55 +08:00
site AnyBot 的介紹網頁(site/):一頁靜態網頁(index.html 加 icon.jpg、cat.jpg),介紹跑在自己電腦上的 AI 助理——會聊天也會動手、動手之前先問你、開源免費自己架;配色用 App 預設的風格「紙」,版面留天地。沒有外部金鑰或帳號。 2026-11-25 14:11:54 +08:00
skills version_0_1_1-alpha 2026-11-11 16:19:06 +08:00
src 接上 Claude Code(本機):Bot 的大腦可以用這台電腦上 claude 指令的訂閱,工具和審批仍走 AnyBot 自己的關卡 2026-11-26 11:58:50 +08:00
.dockerignore 傻瓜安裝:伺服器 sh AnyBot/install.sh server 再 make update-server 就好(自動裝 Docker、自己選網址——Tailscale 用 http、區網用自己的憑證、有 Tailscale 憑證用它的名字——自己產生邀請碼和所有金鑰,中間不問問題,沒有終端機也跑得完);不用先開帳號:大腦管理員(compose 的 brains,anybot --brains)看到有人用邀請碼註冊,就替那個帳號開一個雲端大腦 anybot-brain-帳號(自己的資料卷、帳號伺服器發的登入,伺服器不存密碼),停了叫醒、重開機回來;第一個註冊的是擁有者,只有它的大腦有伺服器上的 Docker(Bot 的電腦),其他人的大腦拿掉 NET_RAW、限記憶體、CPU、程序數,最多 20 個;更新後換成新版時新的先在舊的旁邊建好,Docker 拒絕的話舊的照常在跑,舊的確定停了才換、換不成放回舊的,管理員中途被停掉下次接回來,一直失敗的帳號隔 1、2、4…分鐘最多半小時再試。電腦登入有雲端大腦的伺服器時,先等它上線(最多約一分半)再當它的螢幕和手腳,不把自己當大腦。帳號伺服器只相信 Caddy(帶暗號)說的請求來源,大腦自己寫 X-Forwarded-For 繞不過註冊、登入的次數限制;舊的 Caddyfile 更新時自動補上那一行(舊版 mawk 也行),Caddy 檢查過才換上。 2026-11-23 08:09:02 +08:00
.gitignore 人類助理合併+疑似卡住標記:tasks(可觀測)+ claims(可信任)併入 main(效能修復之上);進行中任務 15 分鐘無動靜在卡片標「疑似卡住」(狀態不變,純標記,規格 §可觀測 P0 驗收) 2026-11-20 16:20:58 +08:00
CLAUDE.md docs: anybot_guide 只給 Bot 行為那幾段;桌面截圖指令照真的旗標改;safety-always 有真的一步;拆出 sandbox 2026-11-18 16:29:19 +08:00
Cargo.lock fix: 網址照瀏覽器的讀法比對(web(domain:…)、內部網址卡);審核員只讀兩端時照樣問;上傳的開關卡不給審核省掉 2026-11-18 20:06:35 +08:00
Cargo.toml fix: 網址照瀏覽器的讀法比對(web(domain:…)、內部網址卡);審核員只讀兩端時照樣問;上傳的開關卡不給審核省掉 2026-11-18 20:06:35 +08:00
FEATURES.md 接上 Claude Code(本機):Bot 的大腦可以用這台電腦上 claude 指令的訂閱,工具和審批仍走 AnyBot 自己的關卡 2026-11-26 11:58:50 +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 傻瓜安裝:伺服器 sh AnyBot/install.sh server 再 make update-server 就好(自動裝 Docker、自己選網址——Tailscale 用 http、區網用自己的憑證、有 Tailscale 憑證用它的名字——自己產生邀請碼和所有金鑰,中間不問問題,沒有終端機也跑得完);不用先開帳號:大腦管理員(compose 的 brains,anybot --brains)看到有人用邀請碼註冊,就替那個帳號開一個雲端大腦 anybot-brain-帳號(自己的資料卷、帳號伺服器發的登入,伺服器不存密碼),停了叫醒、重開機回來;第一個註冊的是擁有者,只有它的大腦有伺服器上的 Docker(Bot 的電腦),其他人的大腦拿掉 NET_RAW、限記憶體、CPU、程序數,最多 20 個;更新後換成新版時新的先在舊的旁邊建好,Docker 拒絕的話舊的照常在跑,舊的確定停了才換、換不成放回舊的,管理員中途被停掉下次接回來,一直失敗的帳號隔 1、2、4…分鐘最多半小時再試。電腦登入有雲端大腦的伺服器時,先等它上線(最多約一分半)再當它的螢幕和手腳,不把自己當大腦。帳號伺服器只相信 Caddy(帶暗號)說的請求來源,大腦自己寫 X-Forwarded-For 繞不過註冊、登入的次數限制;舊的 Caddyfile 更新時自動補上那一行(舊版 mawk 也行),Caddy 檢查過才換上。 2026-11-23 08:09:02 +08:00
README.en.md docs: README 重寫——跟上這一週的功能,圖從現在這版重拍 2026-11-18 08:10:55 +08:00
README.md 傻瓜安裝:伺服器 sh AnyBot/install.sh server 再 make update-server 就好(自動裝 Docker、自己選網址——Tailscale 用 http、區網用自己的憑證、有 Tailscale 憑證用它的名字——自己產生邀請碼和所有金鑰,中間不問問題,沒有終端機也跑得完);不用先開帳號:大腦管理員(compose 的 brains,anybot --brains)看到有人用邀請碼註冊,就替那個帳號開一個雲端大腦 anybot-brain-帳號(自己的資料卷、帳號伺服器發的登入,伺服器不存密碼),停了叫醒、重開機回來;第一個註冊的是擁有者,只有它的大腦有伺服器上的 Docker(Bot 的電腦),其他人的大腦拿掉 NET_RAW、限記憶體、CPU、程序數,最多 20 個;更新後換成新版時新的先在舊的旁邊建好,Docker 拒絕的話舊的照常在跑,舊的確定停了才換、換不成放回舊的,管理員中途被停掉下次接回來,一直失敗的帳號隔 1、2、4…分鐘最多半小時再試。電腦登入有雲端大腦的伺服器時,先等它上線(最多約一分半)再當它的螢幕和手腳,不把自己當大腦。帳號伺服器只相信 Caddy(帶暗號)說的請求來源,大腦自己寫 X-Forwarded-For 繞不過註冊、登入的次數限制;舊的 Caddyfile 更新時自動補上那一行(舊版 mawk 也行),Caddy 檢查過才換上。 2026-11-23 08:09:02 +08:00
SECURITY.md 伺服器的 docker-socket-proxy 多開 GRPC、SESSION:Docker 23 以上的大腦主機預設用 BuildKit 建置,大腦裡的 docker 要經 session 建 Bot 的電腦的映像檔,少了這兩項會被擋(403),「更新/重建」建不出來。照 nobledesktop 上手改、已經實際建成功的設定合回來(正式和 CI 兩份 compose,SECURITY.md 一起改)。 2026-11-22 13:05:17 +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
cat-1.png new flow 2026-11-20 21:54:48 +08:00
cat-2.png new flow 2026-11-20 21:54:48 +08:00
cat-3.png new flow 2026-11-20 21:54:48 +08:00
cat-4.png new flow 2026-11-20 21:54:48 +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 傻瓜安裝:伺服器 sh AnyBot/install.sh server 再 make update-server 就好(自動裝 Docker、自己選網址——Tailscale 用 http、區網用自己的憑證、有 Tailscale 憑證用它的名字——自己產生邀請碼和所有金鑰,中間不問問題,沒有終端機也跑得完);不用先開帳號:大腦管理員(compose 的 brains,anybot --brains)看到有人用邀請碼註冊,就替那個帳號開一個雲端大腦 anybot-brain-帳號(自己的資料卷、帳號伺服器發的登入,伺服器不存密碼),停了叫醒、重開機回來;第一個註冊的是擁有者,只有它的大腦有伺服器上的 Docker(Bot 的電腦),其他人的大腦拿掉 NET_RAW、限記憶體、CPU、程序數,最多 20 個;更新後換成新版時新的先在舊的旁邊建好,Docker 拒絕的話舊的照常在跑,舊的確定停了才換、換不成放回舊的,管理員中途被停掉下次接回來,一直失敗的帳號隔 1、2、4…分鐘最多半小時再試。電腦登入有雲端大腦的伺服器時,先等它上線(最多約一分半)再當它的螢幕和手腳,不把自己當大腦。帳號伺服器只相信 Caddy(帶暗號)說的請求來源,大腦自己寫 X-Forwarded-For 繞不過註冊、登入的次數限制;舊的 Caddyfile 更新時自動補上那一行(舊版 mawk 也行),Caddy 檢查過才換上。 2026-11-23 08:09:02 +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 gets things done: files, commands, forms in a browser, the screen in front of you, jobs on a clock. It asks before it acts.

中文 · English

Apache-2.0 macOS, Linux, Windows Rust 1.95 v0.1.0 self-hosted

A bot about to sort the photos in Downloads stops to ask first: allow, always allow, or deny; a note you typed while it worked waits under the input

Your pick of model. Bring your own API key: xAI, OpenAI, Claude, Gemini, OpenRouter, OpenCode Go, or anything that speaks the OpenAI API. With ChatGPT Plus or Pro, sign in with your ChatGPT account and use the plan instead of a key. With nothing at all, use Ollama at home. Each bot can use a different model.

Your data stays with you. Chats, memory, files, and the passwords in the vault live on your computer or on a server you run. The account server is yours too and only connects your devices; backups are encrypted on your computer before they are uploaded, and the server cannot open them.

A team of bots, not one. Each row on the left is its own bot, with its own personality, model, memory, skills, and the computers it may use. They ask each other questions, hand off work, and can answer you together in a group chat.

Every feature · Feature map · Computers and phone · Security


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.

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.

First run

  1. Open AnyBot. On a Mac, the first time: right-click the icon › Open (it has no Apple developer signature).
  2. On the welcome screen, press “Set up a model” and pick one: paste an API key; or choose “ChatGPT plan” and press “Continue with ChatGPT” to sign in with your ChatGPT account; or choose Ollama to run on your own machine.
  3. Make your first bot and give it a job, such as “sort the photos in my Downloads folder by month”. It tells you what it wants to run, and nothing happens until you press “Allow”.
  4. Type “/” in the input for commands, “@” to bring in another bot.

Used AnyBot on another computer? Press “Sign in” on the welcome screen and your bots and chats come along.


What it does

Hands-on, but it asks first

  • Files and commands — read, edit, search, run; long jobs go to the background, interactive ones get a real terminal. On macOS and Linux (with Landlock in the kernel), commands run in a sandbox that cannot read or touch your private folders. Before a bot edits a file it keeps a copy; /rewind puts it back.
  • Its own computer — a Linux desktop (XFCE, Chromium) in Docker, where each bot has its own screen and browser, kept apart from yours. You can watch what it is doing at any time and take over when needed.
  • A browser — open pages, sign in, click, fill forms, upload and download. Passwords and card numbers sit in the vault and AnyBot types them into the page; the model never sees them. Before a post or comment is sent, repeats are blocked; after, the page is read again to confirm it is really there.
  • The screen you are using — it reads the numbered buttons in a screenshot, then clicks. When you need to sign in or type a code, it hands you the screen. Show it once, and it learns the steps.
  • Asks first — touching your computer, sending something out, or doing anything that cannot be undone shows a card first. Paying, sending, and deleting are asked every time. You can always-allow a kind of action, turn on direct mode, or type /always-approve to let everything through; what the safety rules block stays blocked whatever you set.

Hand it something big

  • /plan — it looks around first and hands you a plan card to approve; only then does it start, ticking off each step.
  • /goal — give it a condition (“all tests pass”). After each turn another model reads the evidence; if the goal is not met, the bot keeps going.
  • Routines — say “every weekday at 9, three AI news items” and it is scheduled; routines can also run when a PR merges, CI fails, or mail arrives. Every run is logged, and two failures in a row pause it.
  • Steer and branch — type while it works and it reads your note at the next step; /btw sends the same bot off to do a second thing.
  • Watch — a command can wake the bot on each new line it prints, for keeping an eye on a deploy or a log.

Typing /plan to move a blog to a new server: the bot hands in a plan card with a summary, six steps, how to check it worked, and caveats, waiting for your decision

A team of bots

  • Each bot has its own soul and instructions, strengths, abilities, skills, memory, and computers it may use. Start from a template (research assistant, writing partner, computer helper…) or from scratch.
  • Ask a colleague and wait for the answer, hand off work without waiting, teach a colleague a skill you know; type “@” in any chat to bring one in.
  • Group chats: members answer in turn, each with its own model; questions go to whoever is good at them, and “@name” passes the turn.

A travel group chat: the research assistant adds a weather card for Tainan, then the writing partner suggests an angle for the travel post

Remembers, learns, writes it down

  • Memory — each bot keeps its own; “About you” is shared by all of them. As you type, the memories it plans to bring along show above the input, and you can drop or add any of them.
  • Skills — the Agent Skills format (SKILL.md), with 8 built in (pdf, xlsx, docx, pptx and more) and more installable from GitHub. After a long job it saves the way that worked as a skill; skills with saved steps replay next time without asking the model.
  • Pages — things to track or compare become a page (tables, charts, number cards) that it keeps updating, with older versions kept.

Connects to the outside

  • Connectors (MCP) — a local command or a remote URL; ones that need an account sign in with OAuth. The market lists 8 common ones and searches the official MCP Registry.
  • Channels — Slack, Discord, Telegram, Teams, the Mac's Messages and Mail, SMS, X: each message that comes in is answered by the bot you chose. Outside messages are not trusted: no memory of yours, no computer tools, and your earlier approvals do not count.
  • Mac apps and phone calls — Mail, Notes, Messages, Reminders, Calendar, Contacts; calls and texts from your Twilio number; posts on X. Sending, messaging, and posting are asked one at a time.
  • Hooks and scripts — run your own programs at fixed points while a bot works (Claude Code's format); anybot --ask "…" --json lets a script ask a bot directly.

Reach it from anywhere

  • Phone — open your URL in a browser and sign in: the same chat, with approvals, questions, the bot's computer, and notifications. No server? On the same Wi-Fi or Tailscale, connect straight to your computer with a phone password.
  • Voice — talk instead of typing, have a voice chat, or have answers read aloud.
  • Send — drop a file or a few words from any device of your account onto another.
Chat commands
  • /plan what to do — plan first; it starts once you approve.
  • /goal condition — keeps going until the condition holds; /goal clear cancels.
  • /btw what to do — the same bot does this on the side without stopping its current job.
  • /always-approve (or /yolo) — let everything through; add off to stop.
  • /rewind — put the bot's file edits and the chat back to an earlier message.
  • /fork — keep a copy of this chat as a branch that goes its own way.
  • /context, /compact — how much of the model's room this chat uses; summarize now.
  • /usage — tokens over the last day and week, per bot and per model.
  • /doctor — check the connections, model services, the bot's computer, connectors, and disk.

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. The hands only follow commands signed by the brain.

  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 method B in docs/en/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, its memory, 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 bot's own computer, 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/en/architecture.md.


Documents

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

Chinese is the source of truth; the docs/en/ files are English summaries of it.

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 lint runs the same clippy check as CI, make help lists everything.

Before changing a feature, read its part of the feature map; when behaviour changes, update that file in the same commit — cargo test featuremap:: catches what was left out. The full rules are in CLAUDE.md.

Security

Found a vulnerability? Please do not post it publicly; report it privately as described in SECURITY.md (English summary).

License

Apache-2.0, see LICENSE.