Repository navigation
refactor(agents): retire chat/doc/file as selectable agents - #4108
kovtcharov-amd wants to merge 11 commits into
Conversation
Picking an agent used to mean choosing between four overlapping options — the flagship plus three chat profiles it already supersedes. The three profiles are now hidden: absent from the Agent UI picker and the Hub browse listing, but still resolvable by id, so stored sessions, the *-lite aliases, and the eval scenarios keep working unchanged. The gaia-agent-chat package itself is untouched. GaiaAgent subclasses ChatAgent, so it remains a hard dependency of gaia-agent and a fully supported library — only its existence as a separate product goes. merge_with_registry now honours hidden in its registry-only pass, for the same reason GET /api/agents does. A published hidden agent still reads as installed in the catalog pass. release_agent_chat.yml published the chat wheel to the R2 Agent Hub catalog. It has never run (0 runs) and the catalog no longer lists chat, so it goes. The PyPI wheel lane (publish_agents.yml, driven by AGENT_WHEEL_PACKAGES in setup.py) is a different lane and is untouched — the flagship installs gaia-agent-chat from PyPI.
…ering A user who last chatted with the chat agent has 'chat' in localStorage. Now that the id is hidden, the picker would highlight nothing and the first message would go to whatever the backend defaults to. The store falls back to the flagship (or the first available agent) whenever the stored id is missing from the agent list. An empty list means discovery is still in flight, so the selection is left alone rather than reset on every reload.
Retiring the three profiles rests on one filter in GET /api/agents and one in merge_with_registry. Both are now covered, along with the registration flag itself, so re-exposing an agent takes a deliberate test change rather than an accidental one. Each test also asserts the id still resolves — the point is to remove the choice, not the route.
…choice Five docs still presented chat/doc/file as agents a user picks, which is no longer true anywhere in the product. They now say what the package actually is: the class GaiaAgent subclasses, hidden from selection but resolvable by id. The chat README also claimed `gaia chat` resolves the agent through the registry. It imports ChatAgent directly — corrected, since the claim was what made the registration look load-bearing for the CLI. The Agent Hub worker README used chat as its R2 layout example and linked a CHANGELOG.md that does not exist; both now use the flagship and a generic <id> placeholder.
…ther The non-streaming chat path imported ChatAgent directly, so the registry had no say in whether `chat` was reachable — a hardcoded bypass that would have kept answering even after the registration was gone. It now resolves through the registry, which is what makes hiding the id a routing decision instead of a cosmetic one. `chat` also stops being exempt from the unknown-agent pre-check: a missing registration is now a loud unavailable-agent error rather than a silent direct import. Sidecar types keep their exemption — they are out-of-process and legitimately absent from the registry. The registry branch gained the `_register_agent_memory_ops` call the deleted branch made, so the memory dashboard keeps working. The streaming branch is deliberately untouched: it carries a library-doc pre-index step that rebuilds the system prompt, so hoisting it into the shared path is LLM-affecting and needs an eval run behind it.
|
Verdict: Request changes This retires On a machine without the chat wheel, old sessions now give an unhelpful error. Anyone opening a pre-existing conversation used to get "the chat agent is not installed — install it like this." They now get "I couldn't load the agent 'chat'… pick another agent from the selector" — and chat is no longer in the selector. That's a dead end, and it's a common state because Deleting the chat release workflow strands two setup profiles. The "create chat through the registry like every other" refactor only landed on half the paths. The streaming path — the one the UI actually uses on every message — still constructs ChatAgent directly, and a few nearby comments and a hardcoded id list now describe the old behaviour. Worth finishing or explicitly scoping in the commit message. Smaller: new sessions created outside the UI (API clients, scheduled tasks) still default to the retired chat agent, and the sidebar now labels historical sessions with a raw id instead of "Chat". Real-world evidenceThe evidence harness failed to run ( 🔍 Technical details🟡 Important1. The actionable "chat agent is not installed" error is now unreachable (
Why it fires in normal use:
…with chat absent from the selector. Per CLAUDE.md's actionable-error rule, this should still name the package and the fix. Simplest option: have 2. Both profiles declare Since 3. The registry refactor is half-applied ( The non-streaming branch was converted; the streaming branch still imports and constructs Stale comments left by the change:
🟢 Minor4. New sessions still default to the retired agent ( The UI passes 5. Historical sessions lose their label in the sidebar (
6. Vestigial
7. README overstates the
True for the CLI; for 8. Stale references to the deleted workflow — Also worth a look: Strengths
|
amd#4120) Five open PRs (amd#4096, amd#4108, amd#3937, amd#3122, amd#3072) are showing a red agent-eval lane for a scorecard that was never produced. The Anthropic account is over its weekly spend cap, and the rejection text changed to a wording the preflight classifier does not recognise, so instead of "quota exhausted, this says nothing about your PR" the job dies in ~37 seconds with "could not be classified" and looks like a measured quality regression. After this change the same outage is named as a quota outage and points at billing rather than at the PR or the repository secrets. The pattern matches on `weekly limit`, not on the reset date the message quotes — that date moves every reset. ## Test plan - [ ] `python -m pytest tests/unit/test_classify_claude_probe.py -q` — 30 passed - [ ] `test_real_weekly_limit_rejection_is_a_quota_problem` feeds the verbatim text from run 35681533582 (job 106629918099), BOM and U+00B7 included, and asserts `quota`; it fails on `main` - [ ] `test_the_weekly_limit_pattern_does_not_depend_on_the_reset_date` pins that a different reset date still classifies - [ ] `python util/lint.py --black --isort --flake8` passes - [ ] The classifier stays pure ASCII (`test_the_classifier_module_is_pure_ascii`), which the PowerShell eval step depends on Co-authored-by: Kalin Ovtcharov <[email protected]>
…md#4328) CLAUDE.md's agent table and CLI command list described EmailTriageAgent as Gmail-only, but it triages Gmail or Outlook (personal or Microsoft 365) per its manifest (`hub/agents/email/python/gaia-agent.yaml`) and README, and a Microsoft connector ships alongside the Google one. The email tool mixin row on the same page already said "Gmail / Outlook" — these were the only two stale lines. Two-line wording fix, no behavior change. Note: open issue amd#3329 plans to fold inbox triage into the flagship agent and retire the email agent as a separate agent — this PR intentionally doesn't touch anything beyond the two stale lines named in amd#4251. Checked amd#4176 and amd#4108 (both open PRs touching CLAUDE.md's agent table) — neither modifies the EmailTriageAgent row, though amd#4108 edits the adjacent ChatAgent row in the same hunk, so there's a small merge-order risk worth flagging to a reviewer. ## Test plan - [x] `grep -n "Email triage for Gmail" CLAUDE.md` — both lines now say "Gmail or Outlook" - [x] Verified against `hub/agents/email/python/gaia-agent.yaml` and `hub/agents/email/npm/README.md` Fixes amd#4251 Co-authored-by: Kalin Ovtcharov <[email protected]>
Opening any pre-existing conversation on a box without the chat wheel gave a dead end: "I couldn't load the agent 'chat' ... pick another agent from the selector" — and chat is no longer in the selector. `gaia init` never installs that wheel, so this is the common state, not an edge case. Hiding the chat ids meant `_agent_type_unknown` stopped exempting them, and the unavailable-agent guard now fires before the branch that raised the good "install gaia-agent-chat like this" error. The guard itself now recognises a missing chat wheel and names the package and the command. Also drops the `agent_type != "chat"` model-resolution exemption on both dispatch paths — chat's registration carries no model preference, so it was a no-op — and re-points the non-streaming test that still pinned the old direct-import bypass.
`gaia init --profile chat` and `--profile npu` both asked the Agent Hub to install `chat`, but chat is not a catalog agent and the workflow that would have published it is gone — so that step could only ever wait on a publish that will never land. Both profiles drop out of the hub-install path. Their completion message is unchanged: it still gates the "initialization complete" headline on the chat wheel and still prints the source-install command, which is the path that actually works (#2240). That gate moves to its own constant, since "an agent init can fetch" and "an agent this profile's quick-start needs" stopped being the same list.
…lled Sessions created outside the Agent UI — API clients, every scheduled task — landed on `chat`, an agent the picker no longer offers. They now open on the flagship like the UI's own sessions do. Historical `chat`/`doc`/`file` sessions also lost their sidebar label: the names come from `GET /api/agents`, which excludes hidden ids, so years of history rendered as a raw string with a fallback icon. A small display map restores "Chat" / "Doc Agent" / "File Agent" and stops the sidebar flagging them unknown — they still resolve by id and still answer.
Skill audit
✅ All audited skills cleared the tier they claim. Per-finding detail is withheld here on purpose. Read it in the Security > Code scanning tab, or download the |
session_to_response()'s fallback and SessionResponse's own field default still read "chat" for a session with no stored agent_type, alongside the database default already fixed. Since chat is no longer a selectable agent, both now match: gaia. Updates the two eval-provenance tests that pinned the old default.
|
Folded into #4407 with #3721 and #4114, so the three can be tested as one story Closing rather than re-basing: GitHub refuses to repoint the base because there are 🔍 What changed on the way inThe three PRs each moved the flagship's tool count, which is pinned in six files, and Several numbers were re-measured on the combined tree because the merge invalidated |
…ip's tool surface (#4407) Three open PRs that change what the flagship agent offers a new user, folded into one branch so the story can be tested end-to-end instead of a PR at a time. Separately, each was unmergeable: the flagship's tool count is a single integer pinned in six files, and all three moved around it while `main` moved underneath them. Together they answer one question — **what is a new user offered, and how fast does it answer** — with the browser reaching pages that were invisible, the picker no longer showing four agents where one is the product, and a fast path so "hi" costs a fifth of a repo search. Supersedes #3721, #4108 and #4114. Closes #4103. ## What a reviewer should check - **The agent can drive a real browser.** Eight tools open a real Chromium, read it, click and type, and sign in — the password goes to the human, never the model, and the session is stored encrypted. Acting inside a session you signed in to asks first. Optional `[browser]` extra; without it none of the eight register. - **`chat`, `doc` and `file` are no longer selectable.** Hidden, not deleted — every id still resolves, so stored sessions, `*-lite` aliases and eval scenarios are unaffected, and `ChatAgent` remains the flagship's base class. - **Fast mode.** `GAIA_FAST=1` drops the flagship to a plain conversational surface for a whole session: 2,860 tokens of fixed prompt instead of 17,652, measured. ## The number that forced the grouping `main` had moved the tool count to 86 and #3721 was still moving 81 → 89. Neither is right: the merged registry is **94**. It is set here in all six places that state it, and `CAPABILITY_MATRIX.md` is regenerated from the code rather than hand-edited. <details> <summary>🔍 Technical details — conflict resolutions and what was re-measured</summary> **Merge order** `main` → #3721 (184 commits stale) → #4108 (76) → #4114 (73), one merge commit each, so all three branches are ancestors and the member PRs show an empty diff. **Tool count.** 94 = CORE 16 + 24 bundles, confirmed by executing `hub/agents/gaia/python/packaging/capability_matrix.py` against the merged tree, not by arithmetic. Pinned in `gaia-agent.yaml`, `gaia_agent/__init__.py`, `test_capability_matrix.py`, `CAPABILITY_MATRIX.md`, `npm/SKILL.md` and `docs/guides/gaia.mdx`. **`readiness.pull_model`** — both sides were right and neither was complete. `main`'s `is_cloud_model` early raise now runs first (a gateway model must never reach payload construction), then #3721's `user.`-prefix checkpoint/recipe branch. `provision_progress` also catches `RuntimeError`, which `main`'s guard raises and #3721's widened `except` did not cover — it would have escaped a generator that contracts to yield a failure line. **`chatStore.ts`** — kept `main`'s `readPref`/`writePref` helpers and expressed #4108's two semantic changes through them. Also consolidated `FLAGSHIP_AGENT_ID`: `main` added `utils/newTask.ts` exporting it after #4108's base, so the naive merge left two exported constants that must change in lockstep. **Re-measured rather than merged.** Fast mode registers **8** tools, not the 4 #4114 pinned — #3335 put the three `cli_setup` tools inside ChatAgent's chat-profile early return. `FAST_PREFILL_CEILING` 2800 → 3100 (measured 2,860; the cli_setup schemas are 497 of it). The pin is now a subset plus a size bound, because `search_documentation` (needs `npx`) and `search_web` register conditionally and an exact list flaps between CI and a dev box. **Three CI lanes the PRs left asymmetric.** `release_agent_gaia.yml` froze the binary without the `browser` extra while its test step claimed to use "the same extras" — a released artifact would have registered 86 tools against a manifest claiming 94. `test_unit.yml`'s Windows lane and `claude.yml`'s auto-fix lane both run the full `tests/unit/` suite but lacked `playwright`. **`docs/guides/terminal-hub.mdx`** — dropped #3721's "Choosing where inference runs" section; `main` now ships `guides/ai-providers.mdx` covering the same panel, so it would have said it twice and frozen a second copy of the Lemonade-11.8.1 claim. Cross-reference added instead. **Known scope boundaries**, deliberately not fixed here: - The streaming chat path still special-cases `chat` with a direct `ChatAgent` construction where the non-streaming path now goes through the registry (`_chat_helpers.py`), and `agent_loop.py`'s autonomous tick keeps the same carve-out. Making them symmetric is a change to the UI's hot path that needs its own live-stream evidence. - `read_tool_output` is 69 chars over the tool-description budget. That docstring is byte-identical to `origin/main`'s (same SHA) and main's lint lane is already red at `6494a1ce` for it. It is a description the model reads, so changing it is an LLM-affecting edit that needs its own eval run. </details> ## Test plan - [ ] `pytest hub/agents/gaia/python/tests/ hub/agents/chat/python/tests/` — the tool-count gates (94 / CORE 16 / 24 bundles), fast-mode pins, and `hidden=True` registration - [ ] `pytest tests/unit` — full unit suite - [ ] `python hub/agents/gaia/python/packaging/capability_matrix.py --check` — the generated matrix matches the code - [ ] `python util/lint.py --all` - [ ] `pytest tests/integration/test_browser_use_live.py` — real Chromium, newly wired into the offline-integration lane rather than allowlisted out of CI - [ ] Real-world: Agent UI shows only the flagship in the picker; a session created with no `agent_type` lands on `gaia`; a historical `chat` session still reads "Chat" in the sidebar - [ ] Real-world: `GAIA_FAST=1` answers a greeting, with `query_documents` / `index_codebase` / `list_inbox` absent from the surface --------- Co-authored-by: Kalin Ovtcharov <[email protected]> Co-authored-by: Claude Opus 5 <[email protected]> Co-authored-by: Ovtcharov <[email protected]> Co-authored-by: Kalin Ovtcharov <[email protected]> Co-authored-by: Kalin Ovtcharov <[email protected]>
The Agent UI still offered
chat,doc, andfilealongside the flagship, sonew users had to guess between four agents that the flagship already supersedes.
All three are gone from the picker and the Hub catalog. The
gaia-agent-chatpackage itself is untouched and fully supported —
GaiaAgentsubclassesChatAgent, so it stays a hard dependency ofgaia-agent, and every id stillresolves: stored sessions, the
*-litealiases, and the eval scenarios thataddress
docby name keep working exactly as before.This hides the ids rather than deleting them, because #4103 measured that
retiring
chatoutright costs 12-41s of extra TTFT per call — callers fallthrough to the flagship's larger prompt (#254 measured it at ~1.4x the
chatprofile). A hard delete is a separate PR once #4103 is resolved, and doing it
here would block #3923.
The second half is the seam: the non-streaming chat path imported
ChatAgentdirectly, bypassing the registry entirely. Hiding a registration means nothing
if dispatch never consults it, so that path now goes through the registry like
every other in-process agent, and a missing registration produces the
unavailable-agent error instead of a silent direct import.
Threads a reviewer should check independently
hidden=Trueon all three registrations — mirrors how BuilderAgent isalready kept out of the picker. Hub browse now skips hidden registry-only
agents too, or
chatwould vanish from the UI but linger in the catalog.'chat'inlocalStorage; without this they'd open to a blank agent the backend no longer
offers. An empty agent list means discovery is still in flight, so the
selection is kept rather than reset.
release_agent_chat.ymldeleted — the R2 Hub catalog lane for an agentthat is no longer in the catalog. It had 0 runs. The PyPI wheel lane
(
publish_agents.yml) is untouched; the flagship depends on that wheel.test_chat_agent.ymlkept, not deleted — it is the only lane that runstests/unit/agents/test_registry.pywith the chat wheel installed, which iswhat makes the
importorskip("gaia_agent_chat")cases in that file actuallyexecute instead of skip ([Bug] Unable to install chat agent: gaia-agent-chat missing from registry and amd-gaia[agents] extra triggers downgrade #2240). It installs the wheel manually at line 92
(
uv pip install --system -e hub/agents/chat/python), not via aninstall-package:argument — the two eval lanes that do pass the chat wheelthrough
install-package:(test_eval_rag.yml, the Gemma consolidation lane)run no unit tests at all. CUA: Voice Integration with Talk Mode #238 edits this workflow's
paths:; nothing heretouches that block.
Two deliberate gaps
chat. It carries alibrary-doc pre-index step that calls
rebuild_system_prompt(), which theshared registry branch does not have. Hoisting it changes the system prompt
for every registered agent, making it LLM-affecting and eval-gated — ci(eval): every eval gate dies in preflight — the judge org is out of monthly spend #4080
blocks the CI judge. The UI sends
stream=true, so this is the path usersactually hit; the seam fix is real but not yet complete, and the follow-up
needs an eval run behind it.
gaia-agent.yamlkept despite being on the removal list. It is themin_gaia_versionsource for the chat wheel andtests/unit/test_agent_pypi_publish.pyreads it for every package inAGENT_WHEEL_PACKAGES. Deleting it breaks the publish lane the flagshipdepends on.
Test plan
pytest tests/unit/agents/test_registry.py tests/unit/test_hub_catalog.py tests/unit/test_chat_agent_type_guard.py hub/agents/chat/python/tests/test_chat_agent.py— 118 passedchat/doc/fileare absent from theselectable listing and
registry.get(id)still returns a constructibleregistration. A test checking only the first half would also pass against a
hard delete, which is the regression being guarded.
tests/unit/chat/ui/failure set is byte-identical tomain's (280pre-existing Windows-only failures — the socket guard in
tests/unit/conftest.pyvs. asyncio's local socketpair; green on Linux CI)python util/lint.py --black --isortclean;npx tsc --noEmitcleangaia chat --helpandgaia -hexit 0chat/doc/file,and an existing session stored against
chatstill opens and answersgaia eval agent— no Lemonade on this machine and ci(eval): every eval gate dies in preflight — the judge org is out of monthly spend #4080 blocksthe CI judge. The repoint is not LLM-affecting: the registry resolves the
same model (
SESSION_DEFAULT_MODEL==DEFAULT_MODEL_NAME) and sets thesame
namespaced_agent_idthe old hardcoded path stamped by hand.