AnyBot: first commit of the working desktop app
Rust/egui rebuild of Grok Bot as of 2026-11-04: chat with streaming
providers (xAI, OpenAI, Claude, Gemini, OpenRouter, OpenCode Go, Ollama,
custom), tools and approvals, the bot's Docker computer, computer use on
macOS / Linux X11 / Wayland, AnyBot's browser with a full DevTools-based
toolset, the encrypted vault, pinned grid and sidebar sections, Markdown
with Mermaid diagrams, phone access through the relay, and the Linux
build and test scripts.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Uirha3oEtWeHh58zA7ErHa
2026-11-04 08:51:51 +00:00
|
|
|
|
# Everything on one small server: the account server (relay), HTTPS (Caddy), and AnyBot itself.
|
2026-11-11 03:26:35 +00:00
|
|
|
|
# Set up: make server (= ./setup.sh: asks for the address, account and keys, writes .env and
|
|
|
|
|
|
# Caddyfile, starts everything and checks it). Settings live only in .env; after changing it, or
|
|
|
|
|
|
# to update: make update-server. Logs: make server-logs.
|
|
|
|
|
|
# Don't start this with a bare `docker compose up`: on a host with both rootless and root Docker
|
|
|
|
|
|
# that can reach the daemon without this server's data and bring up a second, empty server; the
|
|
|
|
|
|
# make targets always use the one in .env (DOCKER_SOCKET) and the HTTPS port in its address.
|
AnyBot: first commit of the working desktop app
Rust/egui rebuild of Grok Bot as of 2026-11-04: chat with streaming
providers (xAI, OpenAI, Claude, Gemini, OpenRouter, OpenCode Go, Ollama,
custom), tools and approvals, the bot's Docker computer, computer use on
macOS / Linux X11 / Wayland, AnyBot's browser with a full DevTools-based
toolset, the encrypted vault, pinned grid and sidebar sections, Markdown
with Mermaid diagrams, phone access through the relay, and the Linux
build and test scripts.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Uirha3oEtWeHh58zA7ErHa
2026-11-04 08:51:51 +00:00
|
|
|
|
# AI keys: set them in .env, or set ANYBOT_RESTORE_FROM_ACCOUNT=1 to start from the newest backup
|
|
|
|
|
|
# your Mac made (bots, chats, routines and the keys you set there).
|
2026-11-04 11:30:32 +00:00
|
|
|
|
#
|
|
|
|
|
|
# 大腦: this AnyBot is the brain of the account. It keeps the bots, chats, memory and routines,
|
|
|
|
|
|
# and works even while your computers sleep. On each of your computers: 設定 › 手機與帳號 ›
|
|
|
|
|
|
# 大腦 › 「改用它當大腦」. Those computers then show these bots, and the bots can use them as hands
|
|
|
|
|
|
# (screen, files, browser), asking you first as usual. A Linux computer without a screen can be
|
2026-11-04 12:38:45 +00:00
|
|
|
|
# hands too: run `anybot setup` there and pick this brain.
|
AnyBot: first commit of the working desktop app
Rust/egui rebuild of Grok Bot as of 2026-11-04: chat with streaming
providers (xAI, OpenAI, Claude, Gemini, OpenRouter, OpenCode Go, Ollama,
custom), tools and approvals, the bot's Docker computer, computer use on
macOS / Linux X11 / Wayland, AnyBot's browser with a full DevTools-based
toolset, the encrypted vault, pinned grid and sidebar sections, Markdown
with Mermaid diagrams, phone access through the relay, and the Linux
build and test scripts.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Uirha3oEtWeHh58zA7ErHa
2026-11-04 08:51:51 +00:00
|
|
|
|
services:
|
|
|
|
|
|
relay:
|
|
|
|
|
|
build:
|
|
|
|
|
|
context: ../..
|
|
|
|
|
|
dockerfile: relay/Dockerfile
|
One-step install: install.sh, fixed Linux and server builds, clearer README
- install.sh (curl | sh): app, hands, server and deps modes; installs system packages
(right names per release, e.g. libasound2t64 on Ubuntu 24.04), Rust via rustup (1.95+),
Docker for the server; limits parallel compiles on small machines
- Server Docker image: add the ALSA build/runtime packages (the build failed), cache the
cargo registry and target between rebuilds, JOBS build arg
- 加一台電腦 now gives a line that installs AnyBot on a blank computer before joining it
- Makefile: make deps installs Rust too, make doctor, clear message when Rust is missing/old
- README rewritten: one line per use, getting started, update/remove, troubleshooting,
deployment options; docs/install.md and multi-device.md follow it
- Tested on fresh ubuntu:24.04 (app) and debian:12 (curl | sh hands) containers
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Uirha3oEtWeHh58zA7ErHa
2026-11-04 16:52:10 +00:00
|
|
|
|
args: { JOBS: "${ANYBOT_BUILD_JOBS:-}" }
|
AnyBot: first commit of the working desktop app
Rust/egui rebuild of Grok Bot as of 2026-11-04: chat with streaming
providers (xAI, OpenAI, Claude, Gemini, OpenRouter, OpenCode Go, Ollama,
custom), tools and approvals, the bot's Docker computer, computer use on
macOS / Linux X11 / Wayland, AnyBot's browser with a full DevTools-based
toolset, the encrypted vault, pinned grid and sidebar sections, Markdown
with Mermaid diagrams, phone access through the relay, and the Linux
build and test scripts.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Uirha3oEtWeHh58zA7ErHa
2026-11-04 08:51:51 +00:00
|
|
|
|
restart: unless-stopped
|
|
|
|
|
|
environment:
|
|
|
|
|
|
# Your public address (for the links of sites the bots publish), e.g. https://anybot.example.com
|
|
|
|
|
|
ANYBOT_RELAY_PUBLIC_URL: "${ANYBOT_RELAY_PUBLIC_URL:-}"
|
|
|
|
|
|
ANYBOT_RELAY_INVITE: "${ANYBOT_RELAY_INVITE:-}"
|
Bug sweep: gates, relay 2FA, Windows input, snapshots, encodings
Permissions and reach
- a file leaving a computer passes the same questions as reading it;
"looking" shell commands that do more than look ask first
- a symlink out of the work/sealed folder counts as outside it
(real paths, not just lexical ones); the search walk skips links
- web_fetch and skill_install read the public web only: localhost, the
LAN and cloud metadata are refused, at every redirect
- preview shows a file without running it; browser_upload may ask
- vault: logins no longer match across shared suffixes (pages.dev,
com.tw, ...); registrable_domain knows public suffixes
- axwrite: found elements are retained (use-after-free)
Relay
- replacing or turning off 2FA needs the current code (rate-limited);
new recovery codes only count once enrollment is verified
- a removed computer loses its socket and its `call` access
- a site name taken by another account answers 409
- RELAY_TRUST_PROXY: the login lock counts the caller's address, not
the proxy's (compose files and README)
- httpd: half a body is not a request
Desktop
- sign-in, join and restore work with 2FA on (code field; --serve reads
ANYBOT_ACCOUNT_CODE; the setup wizard points to a pairing code)
- Windows: text was typed twice; modifiers are held through click, drag
and scroll; horizontal scroll; screen control is no longer refused
- a recording that hits the limit is transcribed, not thrown away
- bot's computer: a new home volume restores the snapshot; a snapshot
is read through before the home is wiped; a failed volume removal
stops reset/restore
- events of a stopped turn no longer land in the next one; each channel
message gets a turn of its own
- saving a bot's settings keeps what it got meanwhile (three-way merge);
a save file that cannot be read is kept
- pages in Big5/GBK/Shift_JIS are read in their own encoding
(encoding_rs); osascript output past 64 KB no longer stalls
- pick_tab keeps a job's own non-http tab; pictures larger than the
texture limit are fitted; the auto-update time field takes typing
- skills live in <data>/skills; memories are unnumbered in the prompt;
the phone may skillify and skill_install
CI
- the test step fails when the tests fail (it piped into tail)
Tests: anybot 268 passed, 27 ignored; relay 16 passed; clippy unchanged.
Not run: Windows on a real machine (win.rs type-checked alone), the
Docker paths of the bot's computer, the live accessibility writes.
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-11-10 03:46:17 +00:00
|
|
|
|
# Caddy (or `tailscale serve`) is in front: the caller's address is the one it reports.
|
|
|
|
|
|
# Without this every login attempt counts as coming from the proxy, and a few wrong
|
|
|
|
|
|
# passwords from anyone lock that account for everyone.
|
|
|
|
|
|
RELAY_TRUST_PROXY: "1"
|
AnyBot: first commit of the working desktop app
Rust/egui rebuild of Grok Bot as of 2026-11-04: chat with streaming
providers (xAI, OpenAI, Claude, Gemini, OpenRouter, OpenCode Go, Ollama,
custom), tools and approvals, the bot's Docker computer, computer use on
macOS / Linux X11 / Wayland, AnyBot's browser with a full DevTools-based
toolset, the encrypted vault, pinned grid and sidebar sections, Markdown
with Mermaid diagrams, phone access through the relay, and the Linux
build and test scripts.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Uirha3oEtWeHh58zA7ErHa
2026-11-04 08:51:51 +00:00
|
|
|
|
volumes:
|
|
|
|
|
|
- relay-data:/data
|
|
|
|
|
|
caddy:
|
|
|
|
|
|
image: caddy:2
|
|
|
|
|
|
restart: unless-stopped
|
|
|
|
|
|
ports: ["80:80", "443:443"]
|
|
|
|
|
|
volumes:
|
2026-11-04 12:38:45 +00:00
|
|
|
|
# Written by setup.sh (your domain); ../../relay/Caddyfile is the template.
|
|
|
|
|
|
- ./Caddyfile:/etc/caddy/Caddyfile:ro
|
AnyBot: first commit of the working desktop app
Rust/egui rebuild of Grok Bot as of 2026-11-04: chat with streaming
providers (xAI, OpenAI, Claude, Gemini, OpenRouter, OpenCode Go, Ollama,
custom), tools and approvals, the bot's Docker computer, computer use on
macOS / Linux X11 / Wayland, AnyBot's browser with a full DevTools-based
toolset, the encrypted vault, pinned grid and sidebar sections, Markdown
with Mermaid diagrams, phone access through the relay, and the Linux
build and test scripts.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Uirha3oEtWeHh58zA7ErHa
2026-11-04 08:51:51 +00:00
|
|
|
|
- caddy-data:/data
|
|
|
|
|
|
depends_on: [relay]
|
|
|
|
|
|
anybot:
|
|
|
|
|
|
build:
|
|
|
|
|
|
context: ../..
|
|
|
|
|
|
dockerfile: deploy/server/Dockerfile
|
One-step install: install.sh, fixed Linux and server builds, clearer README
- install.sh (curl | sh): app, hands, server and deps modes; installs system packages
(right names per release, e.g. libasound2t64 on Ubuntu 24.04), Rust via rustup (1.95+),
Docker for the server; limits parallel compiles on small machines
- Server Docker image: add the ALSA build/runtime packages (the build failed), cache the
cargo registry and target between rebuilds, JOBS build arg
- 加一台電腦 now gives a line that installs AnyBot on a blank computer before joining it
- Makefile: make deps installs Rust too, make doctor, clear message when Rust is missing/old
- README rewritten: one line per use, getting started, update/remove, troubleshooting,
deployment options; docs/install.md and multi-device.md follow it
- Tested on fresh ubuntu:24.04 (app) and debian:12 (curl | sh hands) containers
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Uirha3oEtWeHh58zA7ErHa
2026-11-04 16:52:10 +00:00
|
|
|
|
args: { JOBS: "${ANYBOT_BUILD_JOBS:-}" }
|
AnyBot: first commit of the working desktop app
Rust/egui rebuild of Grok Bot as of 2026-11-04: chat with streaming
providers (xAI, OpenAI, Claude, Gemini, OpenRouter, OpenCode Go, Ollama,
custom), tools and approvals, the bot's Docker computer, computer use on
macOS / Linux X11 / Wayland, AnyBot's browser with a full DevTools-based
toolset, the encrypted vault, pinned grid and sidebar sections, Markdown
with Mermaid diagrams, phone access through the relay, and the Linux
build and test scripts.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Uirha3oEtWeHh58zA7ErHa
2026-11-04 08:51:51 +00:00
|
|
|
|
restart: unless-stopped
|
|
|
|
|
|
depends_on: [relay]
|
Bot 的電腦 can run under gVisor: its own kernel, Chromium's sandbox back on
容器隔離 in 設定 › 電腦: standard (runc, the container is the only wall, Chromium runs
--no-sandbox) or hardened (runsc: a virtualized kernel, all capabilities dropped but the few
the desktop needs, ANYBOT_BOX_SANDBOX=1 turns Chromium's own sandbox back on). Box image v7.
deploy/mac/gvisor-vm.sh makes a Lima VM with Docker + gVisor for a Mac (started at login),
gvisor-migrate.sh moves the box's files and logins there.
Checked and finished before committing:
- the hardened choice is offered only on a Docker host that has runsc; a box set to it on a
host without it opens the standard way and says so (it used to not start at all)
- the settings row shows what the box really runs on, and when 更新 is needed
- no swap only under gVisor (a standard box keeps Docker's default)
- the migrate script sees the running Mac app ("AnyBot", not "anybot")
- the VM script starts an existing VM by name, checks runsc and the kernel from the Mac
- the version test says 7
Real run in the Lima VM: desktop, VNC, numbered controls, xdotool and screenshots work; no
Chromium process has --no-sandbox, renderers run with seccomp and their own namespaces.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Uirha2RVfSYmrhqNnqx9Z4
2026-11-06 16:03:25 +00:00
|
|
|
|
# A second wall for the bots' computer (optional, Linux): install gVisor on this host
|
|
|
|
|
|
# (see gvisor.dev/docs "Installation" for the apt repository + `apt-get install runsc`,
|
|
|
|
|
|
# then register it in /etc/docker/daemon.json: {"runtimes": {"runsc": {"path": "runsc"}}}
|
|
|
|
|
|
# and `systemctl restart docker`). In AnyBot: 設定 › 電腦 › 在哪裡執行 › 容器隔離 →
|
|
|
|
|
|
# 「強隔離(gVisor)」, then rebuild the computer (更新). The box gets a virtualized
|
|
|
|
|
|
# kernel and Chromium's own sandbox comes back on. On a host without runsc the box won't
|
|
|
|
|
|
# start — switch 容器隔離 back to 標準.
|
AnyBot: first commit of the working desktop app
Rust/egui rebuild of Grok Bot as of 2026-11-04: chat with streaming
providers (xAI, OpenAI, Claude, Gemini, OpenRouter, OpenCode Go, Ollama,
custom), tools and approvals, the bot's Docker computer, computer use on
macOS / Linux X11 / Wayland, AnyBot's browser with a full DevTools-based
toolset, the encrypted vault, pinned grid and sidebar sections, Markdown
with Mermaid diagrams, phone access through the relay, and the Linux
build and test scripts.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Uirha3oEtWeHh58zA7ErHa
2026-11-04 08:51:51 +00:00
|
|
|
|
environment:
|
|
|
|
|
|
ANYBOT_ACCOUNT: "http://relay:8080|${ANYBOT_USER}"
|
|
|
|
|
|
ANYBOT_ACCOUNT_PASSWORD: "${ANYBOT_PASSWORD}"
|
|
|
|
|
|
ANYBOT_HOST_NAME: "${ANYBOT_HOST_NAME:-雲端 AnyBot}"
|
2026-11-04 12:38:45 +00:00
|
|
|
|
# First start on a new server: make the account (the first one needs no invite).
|
|
|
|
|
|
ANYBOT_ACCOUNT_CREATE: "1"
|
|
|
|
|
|
ANYBOT_RELAY_INVITE: "${ANYBOT_RELAY_INVITE:-}"
|
AnyBot: first commit of the working desktop app
Rust/egui rebuild of Grok Bot as of 2026-11-04: chat with streaming
providers (xAI, OpenAI, Claude, Gemini, OpenRouter, OpenCode Go, Ollama,
custom), tools and approvals, the bot's Docker computer, computer use on
macOS / Linux X11 / Wayland, AnyBot's browser with a full DevTools-based
toolset, the encrypted vault, pinned grid and sidebar sections, Markdown
with Mermaid diagrams, phone access through the relay, and the Linux
build and test scripts.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Uirha3oEtWeHh58zA7ErHa
2026-11-04 08:51:51 +00:00
|
|
|
|
XAI_API_KEY: "${XAI_API_KEY:-}"
|
|
|
|
|
|
ANTHROPIC_API_KEY: "${ANTHROPIC_API_KEY:-}"
|
|
|
|
|
|
OPENAI_API_KEY: "${OPENAI_API_KEY:-}"
|
|
|
|
|
|
GEMINI_API_KEY: "${GEMINI_API_KEY:-}"
|
|
|
|
|
|
ANYBOT_RESTORE_FROM_ACCOUNT: "${ANYBOT_RESTORE_FROM_ACCOUNT:-}"
|
2026-11-05 10:20:45 +00:00
|
|
|
|
# The bots' computer goes by its own name: a desktop AnyBot on this same machine keeps
|
|
|
|
|
|
# "anybot-box" for itself (and used to pause the brain's one as idle).
|
|
|
|
|
|
ANYBOT_BOX_NAME: "anybot-brain-box"
|
2026-11-09 08:36:51 +00:00
|
|
|
|
# The Docker socket is not mounted here any more (a mounted socket is full control of this
|
|
|
|
|
|
# host). The bots' computer is driven through the filtered proxy below, which only answers
|
|
|
|
|
|
# the calls cloudbox.rs makes: containers (run/start/stop/rm/inspect/ps), exec, volumes,
|
|
|
|
|
|
# images and the box image build. DOCKER_HOST is the plain `docker` CLI default, which is
|
|
|
|
|
|
# what src/cloudbox.rs uses when its own docker_host setting is empty.
|
|
|
|
|
|
DOCKER_HOST: "tcp://docker-socket-proxy:2375"
|
Server voice service: Whisper on the brain's own server, checked for real
`make server` now asks whether to run a voice service there (and the
kept-setup menu can add or remove it): speaches, Whisper
large-v3-turbo on the CPU, behind the brain only (no published port),
enabled with COMPOSE_PROFILES=voice so it composes with the Tailscale
and LAN files. The brain sees ANYBOT_VOICE_URL, fills 設定 › 語音 › 聽
with it once (what is changed later stays), and asks the service for
its model at each start: this build downloads only when asked (it has
no PRELOAD_MODELS, and the 0.8.2-cpu tag is older still, so the image
is pinned by the digest that was tested).
Tested end to end on 12 CPU cores with the compose file itself: first
start 404 s to download the model, later starts 1 s; 11 s of Mandarin
mixed with English (Chrome, Tesla FSD) in 3.4–3.6 s, every word right.
small is three times faster and slipped a character. Reading aloud
stays with another service: speaches can't say Chinese (its espeak has
no "zh"), English works.
From the same test: a service that answers 200 with no sound is now an
error said in words (it was played as silence), Whisper's ASCII
punctuation in Chinese becomes full-width (,?!), and speaches'
"not installed locally" says the model is still on its way.
2026-11-10 16:14:50 +00:00
|
|
|
|
# 語音 on this server (the voice service below, when it is on): 設定 › 語音 is filled in
|
|
|
|
|
|
# with it once; what you choose there afterwards stays.
|
|
|
|
|
|
ANYBOT_VOICE_URL: "${ANYBOT_VOICE_URL:-}"
|
|
|
|
|
|
ANYBOT_VOICE_LISTEN_MODEL: "${ANYBOT_VOICE_LISTEN_MODEL:-}"
|
|
|
|
|
|
ANYBOT_VOICE_SPEAK_MODEL: "${ANYBOT_VOICE_SPEAK_MODEL:-}"
|
|
|
|
|
|
ANYBOT_VOICE_VOICE: "${ANYBOT_VOICE_VOICE:-}"
|
記憶: a page to see it, a few lines picked while typing, a local model
The memory had grown into a list carried whole, a top-14 recalled by a
trigram index and pasted into the system prompt with the clock, and a
page that broke its own layout. Nobody could see what went to the
model, the prompt cache missed every message, and 「記住」 kept saying
the same thing twice. Rebuilt per the spec (docs/memory.md):
- Three kinds in memory.db: 記得的事 (fact), 做過的事 (event, a line per
finished turn), 整理過的 (rollup). Each keeps pinned, uses,
last_used, deleted, superseded_by, span. state.json keeps the facts
as the copy that syncs; the page reads SQLite.
- Search: jieba words ∪ CJK bigrams in an FTS5 unicode61 table
(Traditional text goes through Simplified first), weighted share of
query terms hit; plus local vectors, vec = clamp((cos−0.35)/0.35).
score = max + 0.15×min, events ×0.9. ≥0.15 suggested, ≥0.5 ticked,
≥0.55 carried when nobody chose (3 at most).
- What the model gets: the system prompt has the time zone and the
pinned memories only, the same every turn. Each person message gets
〔送出時間〕 and 〔相關記憶〕 from Message.memories, built in
group_history into a transient Message.context, so the beginning of
a chat reads the same next turn (cache hits) and the event log,
skills and audit see only what was typed. A memory already carried
in view isn't carried again; each carry counts a use.
- Picks travel with the message: Cmd::Send / POST send / sync act
"memories" (empty = none; absent = the brain chooses, once, saved).
- remember finds the like one (cos ≥ 0.85 or the same words) and asks
for `replaces`; the old one is superseded, never carried. A fact
forgotten and remembered again comes back. New search_memory
(query, kind), with dates; read-only.
- Nightly on the brain, no model: events past 30 days fold into a line
per week (「11/3–11/9 做過的事(14 件):整理照片 ×3…」, ≤400 chars,
like with like by words or vectors), weeks past 180 days into months;
the folded go to 最近刪除 for 30 days. Facts are never removed. The
page offers duplicates, facts unused for half a year, and what can
fold now.
- Local model: minishlab/potion-multilingual-128M through m2v.rs (same
token ids as model2vec-rs on 13/13 sentences, cos ≥ 0.9999, without
tokenizers' 1.1 GB). Converted while downloading: vocab.bin,
table.i8 (int8 + row scales), dims.json, 137 MB kept of 530 MB;
ANYBOT_HF_BASE picks a mirror (now passed into the server's brain
container too). Loaded when first needed (34 ms), let go after 10
idle minutes. The brain loads it; a screen only with a document
folder set; hands and phones never. 設定 › 一般 › 語意搜尋:
本機模型/Ollama/關閉; a new engine clears every vector.
- Three files, three connections: memory.db (backed up nightly, 7
kept), docs.db (a cache), oplog/audit.db (30 days). An old audit.db
hands its memories and documents over once and shrinks (a real one:
172 MB → 16 KB). docs_search scans every chunk now, vectors cached
in RAM (it stopped at 8000); FTS optimize + VACUUM daily (260 MB of
tombstones over 31 MB of text).
- API: POST /api/memory (owner) and /api/sync/memory (mirror). Reads
answer on the HTTP thread; writes go through phone_act("memory").
- Screens: a memory dialog (Bot menu 記憶…, Bot settings 打開記憶) with
counts, live search, filters, suggestions, per-item kind/date/uses
and pin/edit/forget/restore; chips above the composer 300 ms after
typing stops, with a token estimate; 「帶了 N 條記憶」 under person
messages. The phone has the same as a 記憶 tab, chips and tag.
Checked: make test passes (app 297, relay 16), with new tests for the
scores and thresholds, Traditional Chinese segmentation, remember's
dedupe and replaces, two turns sending the same beginning, no double
carry, weekly/monthly folding and the trash, and the audit.db move.
Brain idle 37 MB as before, ~230 MB with the model loaded; search on
the brain 0.2–0.5 ms, 7–44 ms from the phone page. A deadlock found on
the way (stats re-taking the lock) is fixed and tested.
Docs: docs/memory.md has the whole design; FEATURES.md, protocol,
architecture (zh/en), multi-device and install say what changed.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Uirha3SYw9JJ9dXwaNvYh4
2026-11-10 23:46:50 +00:00
|
|
|
|
# 記憶的本機語意模型 is fetched from Hugging Face on the first start (530 MB, kept as
|
|
|
|
|
|
# 130 MB under /data/models); a mirror when that can't be reached, e.g. https://hf-mirror.com.
|
|
|
|
|
|
ANYBOT_HF_BASE: "${ANYBOT_HF_BASE:-}"
|
2026-11-11 08:19:06 +00:00
|
|
|
|
networks: [default, docker-api]
|
AnyBot: first commit of the working desktop app
Rust/egui rebuild of Grok Bot as of 2026-11-04: chat with streaming
providers (xAI, OpenAI, Claude, Gemini, OpenRouter, OpenCode Go, Ollama,
custom), tools and approvals, the bot's Docker computer, computer use on
macOS / Linux X11 / Wayland, AnyBot's browser with a full DevTools-based
toolset, the encrypted vault, pinned grid and sidebar sections, Markdown
with Mermaid diagrams, phone access through the relay, and the Linux
build and test scripts.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Uirha3oEtWeHh58zA7ErHa
2026-11-04 08:51:51 +00:00
|
|
|
|
volumes:
|
|
|
|
|
|
- anybot-data:/data
|
Server voice service: Whisper on the brain's own server, checked for real
`make server` now asks whether to run a voice service there (and the
kept-setup menu can add or remove it): speaches, Whisper
large-v3-turbo on the CPU, behind the brain only (no published port),
enabled with COMPOSE_PROFILES=voice so it composes with the Tailscale
and LAN files. The brain sees ANYBOT_VOICE_URL, fills 設定 › 語音 › 聽
with it once (what is changed later stays), and asks the service for
its model at each start: this build downloads only when asked (it has
no PRELOAD_MODELS, and the 0.8.2-cpu tag is older still, so the image
is pinned by the digest that was tested).
Tested end to end on 12 CPU cores with the compose file itself: first
start 404 s to download the model, later starts 1 s; 11 s of Mandarin
mixed with English (Chrome, Tesla FSD) in 3.4–3.6 s, every word right.
small is three times faster and slipped a character. Reading aloud
stays with another service: speaches can't say Chinese (its espeak has
no "zh"), English works.
From the same test: a service that answers 200 with no sound is now an
error said in words (it was played as silence), Whisper's ASCII
punctuation in Chinese becomes full-width (,?!), and speaches'
"not installed locally" says the model is still on its way.
2026-11-10 16:14:50 +00:00
|
|
|
|
# 語音 (optional: ./setup.sh asks; COMPOSE_PROFILES=voice in .env turns it on): speech to text
|
|
|
|
|
|
# (Whisper) on this server's CPU for every screen and phone, with no key. speaches (MIT) speaks
|
|
|
|
|
|
# OpenAI's audio API. No port is published: only the brain reaches it, at http://voice:8000/v1.
|
|
|
|
|
|
# The model is downloaded once, into voice-models. (It reads English aloud but not Chinese:
|
|
|
|
|
|
# reading aloud is set in 設定 › 語音, e.g. xAI.)
|
|
|
|
|
|
voice:
|
|
|
|
|
|
# The build checked with AnyBot (latest-cpu of 2025-09-19; the 0.8.2-cpu tag is older).
|
|
|
|
|
|
image: ghcr.io/speaches-ai/speaches@sha256:21e3df06d842fb7802ab470dd77c25f0e8c0d22950e8d8c6ae886e851af53ef8
|
|
|
|
|
|
profiles: ["voice"]
|
|
|
|
|
|
restart: unless-stopped
|
|
|
|
|
|
# The brain asks it for ANYBOT_VOICE_LISTEN_MODEL at each start (this build has no
|
|
|
|
|
|
# PRELOAD_MODELS): downloaded the first time, found at once after that.
|
|
|
|
|
|
environment:
|
|
|
|
|
|
WHISPER__COMPUTE_TYPE: "int8"
|
|
|
|
|
|
# Stay loaded: the first sentence after a quiet hour shouldn't wait for a model to load.
|
|
|
|
|
|
WHISPER__TTL: "-1"
|
|
|
|
|
|
volumes:
|
|
|
|
|
|
- voice-models:/home/ubuntu/.cache/huggingface/hub
|
2026-11-09 08:36:51 +00:00
|
|
|
|
docker-socket-proxy:
|
|
|
|
|
|
# https://github.com/Tecnativa/docker-socket-proxy: a small nginx in front of the Docker
|
|
|
|
|
|
# socket with an endpoint allowlist. Keep this list minimal: adding an API here widens what
|
|
|
|
|
|
# a compromised brain can do on this host (no AUTH, no SECRETS, no SWARM, no plugins).
|
|
|
|
|
|
image: tecnativa/docker-socket-proxy:0.3.0
|
|
|
|
|
|
restart: unless-stopped
|
|
|
|
|
|
environment:
|
|
|
|
|
|
CONTAINERS: "1" # run, start, stop, rm, inspect, ps (the box's lifecycle)
|
|
|
|
|
|
EXEC: "1" # docker exec: every screen step, box_exec, snapshots
|
|
|
|
|
|
IMAGES: "1" # inspect/create the box image (build uploads it)
|
|
|
|
|
|
BUILD: "1" # 更新/重建 builds the box image
|
2026-11-22 05:05:17 +00:00
|
|
|
|
# A daemon of Docker 23 or newer says BuildKit is its builder (_ping: Builder-Version 2),
|
|
|
|
|
|
# and the brain's docker then builds through a session: without these two the proxy
|
|
|
|
|
|
# refuses it (403) and 更新/重建 can't make the box image. They reach only the builder.
|
|
|
|
|
|
GRPC: "1"
|
|
|
|
|
|
SESSION: "1"
|
2026-11-09 08:36:51 +00:00
|
|
|
|
VOLUMES: "1" # anybot-box-home: inspect, create, rm (Reset/Restore)
|
|
|
|
|
|
NETWORKS: "1" # inspect/attach (docker run needs the bridge network)
|
|
|
|
|
|
POST: "1"
|
|
|
|
|
|
GET: "1"
|
2026-11-11 03:26:35 +00:00
|
|
|
|
# DOCKER_SOCKET in .env: the Docker this server lives on (setup.sh writes it at the first setup,
|
|
|
|
|
|
# e.g. /run/user/<uid>/docker.sock for rootless Docker, and starts compose on that same one).
|
|
|
|
|
|
# The default /var/run/docker.sock is the root daemon; on a rootless host the proxy answers 503.
|
2026-11-11 08:19:06 +00:00
|
|
|
|
networks: [docker-api]
|
2026-11-09 08:36:51 +00:00
|
|
|
|
volumes:
|
|
|
|
|
|
- ${DOCKER_SOCKET:-/var/run/docker.sock}:/var/run/docker.sock:ro
|
2026-11-11 08:19:06 +00:00
|
|
|
|
networks:
|
|
|
|
|
|
# Only `anybot` shares this internal network with `docker-socket-proxy`; `relay`, `caddy` and
|
|
|
|
|
|
# `voice` cannot reach port 2375.
|
|
|
|
|
|
docker-api:
|
|
|
|
|
|
internal: true
|
AnyBot: first commit of the working desktop app
Rust/egui rebuild of Grok Bot as of 2026-11-04: chat with streaming
providers (xAI, OpenAI, Claude, Gemini, OpenRouter, OpenCode Go, Ollama,
custom), tools and approvals, the bot's Docker computer, computer use on
macOS / Linux X11 / Wayland, AnyBot's browser with a full DevTools-based
toolset, the encrypted vault, pinned grid and sidebar sections, Markdown
with Mermaid diagrams, phone access through the relay, and the Linux
build and test scripts.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Uirha3oEtWeHh58zA7ErHa
2026-11-04 08:51:51 +00:00
|
|
|
|
volumes:
|
|
|
|
|
|
relay-data:
|
|
|
|
|
|
caddy-data:
|
|
|
|
|
|
anybot-data:
|
Server voice service: Whisper on the brain's own server, checked for real
`make server` now asks whether to run a voice service there (and the
kept-setup menu can add or remove it): speaches, Whisper
large-v3-turbo on the CPU, behind the brain only (no published port),
enabled with COMPOSE_PROFILES=voice so it composes with the Tailscale
and LAN files. The brain sees ANYBOT_VOICE_URL, fills 設定 › 語音 › 聽
with it once (what is changed later stays), and asks the service for
its model at each start: this build downloads only when asked (it has
no PRELOAD_MODELS, and the 0.8.2-cpu tag is older still, so the image
is pinned by the digest that was tested).
Tested end to end on 12 CPU cores with the compose file itself: first
start 404 s to download the model, later starts 1 s; 11 s of Mandarin
mixed with English (Chrome, Tesla FSD) in 3.4–3.6 s, every word right.
small is three times faster and slipped a character. Reading aloud
stays with another service: speaches can't say Chinese (its espeak has
no "zh"), English works.
From the same test: a service that answers 200 with no sound is now an
error said in words (it was played as silence), Whisper's ASCII
punctuation in Chinese becomes full-width (,?!), and speaches'
"not installed locally" says the model is still on its way.
2026-11-10 16:14:50 +00:00
|
|
|
|
voice-models:
|