# Environment Inventory — 2026-09-19 (Owner setup: Hermes agent deployment + Wear OS client + multi-agent ledger) ## 1. Compute / hosting - Alibaba Cloud ECS (free-trial instance, South China 3 / Guangzhou). Ubuntu 22.04 x86_64. - 2 vCPU, **1.6 GB usable RAM** (measured: ~660-770 MB free after cleanup), 40 GB disk (~26 GB free), **no swap**, **no Docker/podman**. - Useless cloud services masked on 2026-09-19 (`fwupd`, `packagekit`, `multipathd`) → freed ~175 MB. Undo: `systemctl unmask fwupd.service fwupd-refresh.timer fwupd-refresh.service packagekit.service multipathd.service multipathd.socket` - Hermes runs as a user unit `hermes-gateway.service` (Restart=always + root linger) → survives reboots. Restart: `systemctl --user restart hermes-gateway` (cannot self-restart from inside the gateway process). - Home dir for everything Hermes: `/root/.hermes`. ## 2. Public entry / networking - Public proxy: `hermes-public-proxy.service` → forwards `0.0.0.0:18642` to `127.0.0.1:8642` (Hermes API), and serves the delivery directory from `/root/apks` under a token path. - Download page: `http://8.148.217.89:18642/apks/x7k2m9/` (custom HTML index + `list.json` for the watch app) - Only one port (18642) is opened in the cloud security group. - Tailnet (Tailscale, account GZWXM@): ECS `100.93.71.112`, phone `100.109.114.64`, home PC `100.112.133.110`. - Phone (Honor Magic7, Termux): sshd on port `8022`; helpers `/root/phone.sh` — run `phone.sh "cmd"`, push `phone.sh push `. Caveat: the phone can only run one proxy at a time → VPN up kills Tailscale (and must be restarted by hand). - Browser automation on the ECS: `agent-browser` CLI + Chrome 153 (`/root/.agent-browser/browsers/`). Headless is stable; headed needs Xvfb and the 1.6 GB box struggles → prefer headless. ## 3. Client devices - Watch: OPPO Watch X2 Mini (466x466 px, 233 dp, **armeabi-v7a only**, 32-bit). Runs the Wear OS app `hermes-wear` (package `com.hermes.wear`; test build uses `com.hermes.wear.newlayout`). Talks to the ECS through the public proxy. - QQ bot: two instances — cloud bot App ID `1905568406` (school / watch, markdown OFF), phone bot `1905486290` (home, markdown ON). - IM channels: **QQ = primary** (real delivery receipts). WeChat (iLink) = kept as backup only (platform silently drops chat text). - The user has no laptop at school; deliverables must be reachable from the watch or a school PC (i.e. the public page). ## 4. Models / LLM access - **Primary model**: DeepSeek official API — `deepseek-v4-flash-vision-exp` (= V4.1 Flash: 1M context, native vision). Price per M tokens: cache-hit ¥0.02 / miss ¥1 / output ¥4 (peak = weekday 09-12 & 14-18, x2). Cache-hit rate ~96%. - Auxiliary vision: same DeepSeek vision model; images capped at 1024 tokens (auto-resized: <544^2 upscaled, larger shrunk to ~1300^2). - Other configured providers: `bailian` (Alibaba; free quota = 1M tokens per model, 90 days, cn-beijing only — glm-5.3 / qwen3.8-flash / deepseek-v4.1-flash / qwen3.7-max); `openrouter` (paid calls work, few usable free endpoints); OpenCode Zen key = dead. - Sub-agents (`delegate_task`) use the **same model/provider as the parent**; up to 10 concurrent children. - Cron jobs (all deliver to QQ): hot-topic push (daily 19:20), meme catch-up (14d), session archiving (14d), weekly backup (14d), mail notification (every 10 min, script-only, zero LLM), multi-agent todo reminder (daily 09:00, script-only). ## 5. Repositories / code - `/root/hermes-wear` — Wear OS client (Kotlin + Compose). GitHub: `GZWXM/hermes-wear` (private). CI = GitHub Actions: `assembleRelease` + Roborazzi screenshot job. Versions: `versionName` from workflow env (6.12), `versionCode` = CI run number. Builds are **release** (never debug — ART skips AOT for debuggable apps). - `/root/.hermes/hermes-agent` — Hermes source tree carrying **17 files of local patches** (ledger: `~/.hermes/LOCAL_PATCHES.md`, diff snapshot `~/.hermes/local_patches_20260918.diff`). Re-apply after `hermes update`. - `/root/kazumi-watch` — Kazumi fork with a watch-layout rework branch. - `/root/docs` — multi-agent collaboration docs: handbook v0.3.0, process doc v2.4.4, mismatch list v1, status v3. - `/root/mas` — "youth version" multi-agent ledger (`mtask.py`): file-ownership claims, pre-dispatch precheck, human-decision todos. - `/root/apks` — delivery directory exposed by the public page (always use English file names). ## 6. Working conventions (the rules we actually follow) 1. **Deliver through the public page**, never as a chat attachment (the user cannot download chat files). English file names. 2. **Before dispatching sub-agents**: `python3 /root/mas/mtask.py precheck --repo `; each worker `claim`s its files; overlapping claims must be serialized (this exists because two agents once edited the same file undetected). 3. **No builds on the ECS**: no Android SDK, no JVM budget. Compile/test/pack in CI (GitHub Actions) — that is also the compile gate. 4. **Do not kill a long-running model task without evidence.** Stream it to keep progress observable; always give full `max_tokens`. 5. **Do not guess; verify.** Check real files, real API artifacts or official docs before answering. For images, inspect the original file (chat platforms recompress) and read pixels yourself instead of trusting a vision model's summary. 6. **Verify external state after every write** (push, upload, delivery) — read it back; never report success from a tool's own claim. 7. Scripts for cron stay zero-LLM (`--no-agent` script mode) and stay silent when there is nothing to report. 8. Local patches to Hermes must be re-applied after every `hermes update` (list them again from `git status` in the source tree). ## 7. Cost profile (for context) - ~96% cache-hit, ~110:1 input:output ratio for chat use → the bill is dominated by cache-hit pricing, not output tokens. - Chat via DeepSeek official: roughly ¥120-240 / month at the current volume (all-valley to all-peak).