Repository navigation
docs(plans): audit and plan for binaries-only Agent UI and TUI - #6495
kovtcharov wants to merge 5 commits into
Conversation
Every desktop install still builds ~/.gaia/venv from PyPI, and gaia -p, background goals and skill preferences still look for the agent's Python package, which a packaged install never has. This audits each PyPI install, in-process agent path, pip-remedy string and interpreter assumption in both apps, and orders the fix into reviewable PRs ending in a frozen gaia core shipped inside the installers.
The point of going binaries-only is speed, so every conversion PR needs a before/after against numbers taken first. This commits the clean-runner half (raw phase times for v0.25.4-rc3 from 7 installer-journey runs), defines the six metrics and how each is measured, marks the hardware metrics as not yet measured, and states that PyPI is only for third-party developers building on GAIA.
…file The binaries-only work is judged on speed, and the hardware half of its baseline (backend install per stage, gaia init per step and model, backend and agent cold start, first-chat latency) can't come from CI runners. This script measures it on a real PC from a throwaway profile with empty uv, Python, Hugging Face and Lemonade state, using the release's own backend installer. It refuses to run while anything else is loading a model, testing or eating CPU, and keeps the profile path short enough that Windows' path limit can't fail the backend.
GAIA no longer installs Python or a PyPI package on a user's PC. The desktop app built `~/.gaia/venv` from PyPI on first launch. The terminal UI's installers shipped no `gaia`, so setup and the daemon failed until the user also ran the one-line installer, which built the same venv. Now one frozen `gaia`, built from the same commit, ships everywhere: inside the desktop app, beside `gaia-tui` in every terminal installer, and as a checksummed release file that `install.sh`/`install.ps1` download. On a clean profile on a Strix Halo PC, with no Python or uv on PATH, the desktop app's backend was healthy 6 s after launch, compared with a 44 s install plus 76 s to healthy on a CI runner before. This covers steps 1–10 of the binaries-only plan (amd#6495). Step 1 (no pip extras) holds for both apps: the frozen build skips pip extras, and both apps pass `--skip-pip-extras`. `pip install amd-gaia` users still get them. - **Desktop app.** The app runs `<resources>/core/gaia`. If that file is missing, it says to reinstall rather than fall back to PyPI. An AppImage runs a copy under `~/.gaia/core`, because its mount goes away while the daemon keeps running. The bundled uv is gone. - **Terminal installers.** The `.pkg`, `.deb`/`.rpm` and the Windows setup's terminal component carry the core and put `gaia` on PATH. The terminal UI runs the `gaia` beside itself before any other. - **One-line installers.** They download `gaia-core-<platform>.tar.gz`, check it against `gaia-core-SHA256SUMS.txt`, and use it to read the agent manifest, so they need no Python at all. `publish.yml` attaches the core to every release, and the release check refuses one without it. - **Updates and removal.** The daemon is stopped before an update or uninstall replaces its files. The NSIS installers, the `.deb`/`.rpm` pre-remove hooks and the desktop app's update quit (the only hook macOS has) all do this. The frozen app also replaces a daemon still running an older release's venv. After an app update, the agent is refreshed once. - **The agent runs as its own binary everywhere.** Where it isn't importable, `gaia -p`, `gaia chat`, background goals (amd#5840) and skill-preference saves now run it through the daemon, as Agent UI chat does. Before, they failed or returned 503. A failed model call is a failed run (exit 1), and the apps' hints no longer tell users to pip-install. - **Frozen-build guards.** `gaia init` skips pip extras, a wheel-type hub agent is refused before download, and GAIA's own `-m`/`-c` relaunches run through `gaia.frozen`. Still source-only: `gaia eval agent`, which runs the flagship in-process. The npm `gaia-ui` package and running the app from source still use a venv, as developer routes. Closes amd#5840. ## Test plan - [x] `installer/core/smoke_test.py` passes on win32-x64, darwin-arm64, darwin-x64 and linux-x64 (Rocky 9) in CI, and on a local Windows build. It checks: `--version`; bundled modules import; `gaia_agent`, torch and PyInstaller are absent; the `-m`/`-c` relaunches; running as `gaia-mcp`; `gaia init --check --json`; daemon start, status and stop; `gaia chat --ui` answering `/api/health`. - [x] Packaged Windows app launched from an empty profile with a minimal PATH: healthy in 5.7–6.1 s, no `~/.gaia/venv`, and the setup screen shows "All 5 checks passed". Through the frozen core, `gaia init --agent-only` installed the flagship in 13 s and its sidecar started. - [x] Terminal `.deb` and `.rpm` built with the real Linux core in a container: both install, run `gaia --version` and remove cleanly (Debian bookworm, Fedora). - [x] Frozen `gaia -p` and `gaia chat` in a throwaway home: the daemon started the agent binary and relayed the turn. With the model server unreachable, both reported the agent's error and exited 1. - [x] `pytest`: installer, hub, daemon, relay, agent-loop, skills, release-asset and frozen-relaunch suites (Windows), plus the POSIX-shell installer tests in a Linux container. Electron Jest suite passes; Go `gaiainit` tests pass. - [x] CI: desktop AppImage/DMG structural smokes and the AppImage distro matrix reach the bundled core. - [x] CI: terminal package smokes on macOS and Linux, and the Windows setup smoke. - [ ] On the next RC: headless installer journeys show desktop install-to-healthy below the venv-build numbers in `installer/install_time_thresholds.json`, and `install.sh`/`install.ps1` pinned to that RC install with no Python on the PC. - [x] First local-model chat through the CI-built frozen Windows `gaia`, from an empty home with no Python or uv on PATH: `gaia init --agent-only` installed the flagship in 8.6 s, and `gaia -p --model Qwen3.5-4B-GGUF` answered and exited 0. - [ ] Clean-PC timing with a fresh model download (§5.3 baseline). Not run here: the PC's GPU was in use by other work. --------- Co-authored-by: Kalin Ovtcharov <[email protected]>
|
Verdict: Request changes The plan and the committed CI baseline read well and are scoped as docs and data. The later commit also adds a script that times setup and first chat on real hardware, plus its unit tests. One of those tests will fail on the Linux and macOS unit lanes. Make that check work on every platform and this can merge.
Real-world evidenceN/A: the change is docs, data and a Windows-only measurement script, and no evidence bundle was produced. This verdict rests on static review. I also ran the failing PATH assertion by hand on Linux, and it fails as described: the result is 🔍 Technical details🟡
🟢 Doc and description drift
🟢 Strengths
|
…a init Two of the script's unit tests failed on the Linux and macOS lanes: the clean-profile PATH test hard-coded the Windows separator, and the busy check read Windows paths with the host's path rules, so it missed a `gaia.exe eval` there. The busy check now always reads Windows paths. A hung `gaia init` (a stalled model pull) hung the whole run, so it now stops after two hours along with any children holding its output, and says so. The remaining subprocess calls get a timeout, and the plan names the script where it still called it future work.
|
The review's findings are fixed and the unit tests now pass off Windows, but the audit itself is out of date: at least three of its "fails on users' PCs" rows have been fixed on
🔍 Technical details
|
|
Closing: desktop installs no longer pull Python from PyPI (#6783), so this plan's premise is out of date. Reopen or refresh if the remaining items are still wanted. |
Every desktop install still downloads Python and
amd-gaia[ui]from PyPI on first run and on every update. Several features also still try to import the GAIA agent's Python package, which a packaged install never has. As a result,gaia -p, background goals and skill preferences fail on users' PCs, and some errors tell users topip installfrom git. This plan inventories every one of these with its location and orders the fix into reviewable PRs. The end state is a frozengaiacore shipped inside the Agent UI and TUI installers, with the agent always running as the hub binary. PyPI stays for third-party developers only.The goal is speed, so the plan also sets the baseline every conversion PR reports against. The clean-runner half is committed: raw phase times for v0.25.4-rc3 from 7 installer-journey runs. On those runners, the Windows desktop setup takes 124 s from install to a serving backend. The hardware half (
gaia initsteps, backend and agent cold start, first-chat latency) is marked not yet measured until it runs on a clean AMD PC.No runtime changes: docs, the CI baseline data, and
util/measure_app_speed.py(with unit tests), the script that takes the hardware half.Test plan
python util/check_doc_links.py --internal-only: 1006 links, 0 brokendocs/docs.jsonand the baseline JSON parse; the page is listed under Plans › Infrastructurepython installer/headless/propose_thresholds.py --runs 7 --release v0.25.4-rc3reproduces the committed medians