Repository navigation
refactor(agents): migrate analyst + browser to hub (#1102) - #1446
Conversation
AnalystAgent (id=data) and BrowserAgent (id=web) ship as standalone gaia-agent-analyst / gaia-agent-browser wheels under hub/agents/python/, discovered via the gaia.agent entry point instead of hardcoded builtins. The shared full+lite model-tier builder is promoted to module level (build_model_tiers / lite_models in registry) so hub packages reuse the exact preset. gaia browse / gaia analyze resolve their agents through the registry. Adds dedicated test_analyst_agent.yml / test_browser_agent.yml CI workflows.
SummaryClean, well-scoped refactor — Approve with suggestions. This moves the last two registry builtins ( The one thing worth acting on before merge: the analyst package lost test parity with browser — it has no discovery/registration test, so an entry-point or Issues🟢 Minor — Analyst package missing discovery + registration tests (
|
## Why this matters EmailTriageAgent was the last registry *builtin* still living in the core source tree. It now ships as the standalone `gaia-agent-email` wheel under `hub/agents/python/email/`, discovered via the `gaia.agent` entry point — so the core framework wheel no longer hardcodes it and it versions independently. This completes the chat-family/email wave of the amd#1102 framework-only-core restructure. Unlike the analyst/browser migration (amd#1446), email owned a core API/MCP surface (`email_routes.py`, `email_mcp.py`). Per the restructure spec these move **into the wheel** (`gaia_agent_email/api_routes.py`, `mcp_server.py`); `openai_server.py` mounts the email router conditionally and logs an actionable `pip install gaia-agent-email` hint when the wheel is absent (no silent fallback). `gaia email` resolves through the registry and fails loudly with the same hint. ## Test plan - [x] `python util/lint.py --black --isort` — clean - [x] email package parses; no residual `gaia.agents.email` / `gaia.api.email_routes` / `email_mcp` references in `src/` - [ ] CI: new `Email Agent Unit Tests` workflow installs the wheel and runs its suite - [ ] CI: core unit + API + CLI integration green without the wheel installed (guarded mount) - [ ] Reviewer: confirm Google-connector requirement, conversation starters, and local-inference (NPU/FLM) behavior preserved Note: API/MCP surface relocation is the highest-risk area — review the guarded import in `openai_server.py` and the test `importorskip` guards. Do not merge until CI is green and reviewed. --------- Co-authored-by: Ovtcharov <[email protected]> Co-authored-by: Tomasz Iniewicz <[email protected]>
ChatAgent — the flagship conversational agent backing the chat/doc/file profiles — was the last family of registry builtins still hardcoded in the core framework wheel. It now ships as the standalone gaia-agent-chat wheel under hub/agents/python/chat/, exposing chat/doc/file as three gaia.agent entry points discovered by the registry. The core wheel no longer hardcodes them and the agent versions independently. `gaia chat` (incl. --ui) resolves through the registry and fails loudly with an install hint when the wheel is absent. Full+lite model tiers and the per-profile prompt/tool wiring are preserved exactly via registry.build_model_tiers. Continues the #1102 hub restructure after analyst/browser (#1446).
ChatAgent — the flagship conversational agent backing the chat/doc/file profiles — was the last family of registry builtins still hardcoded in the core framework wheel. It now ships as the standalone gaia-agent-chat wheel under hub/agents/python/chat/, exposing chat/doc/file as three gaia.agent entry points discovered by the registry. The core wheel no longer hardcodes them and the agent versions independently. `gaia chat` (incl. --ui) resolves through the registry and fails loudly with an install hint when the wheel is absent. Full+lite model tiers and the per-profile prompt/tool wiring are preserved exactly via registry.build_model_tiers. Continues the #1102 hub restructure after analyst/browser (#1446).
ChatAgent — the flagship conversational agent backing the chat/doc/file profiles — was the last family of registry builtins still hardcoded in the core framework wheel. It now ships as the standalone gaia-agent-chat wheel under hub/agents/python/chat/, exposing chat/doc/file as three gaia.agent entry points discovered by the registry. The core wheel no longer hardcodes them and the agent versions independently. `gaia chat` (incl. --ui) resolves through the registry and fails loudly with an install hint when the wheel is absent. Full+lite model tiers and the per-profile prompt/tool wiring are preserved exactly via registry.build_model_tiers. Continues the #1102 hub restructure after analyst/browser (#1446).
## Why this matters ChatAgent — the flagship conversational agent powering `gaia chat` (and `gaia chat --ui`) under its `chat`, `doc`, and `file` profiles — was the last family of registry *builtins* still hardcoded inside the core framework wheel. It now ships as the standalone **`gaia-agent-chat`** wheel under `hub/agents/python/chat/`, with `chat`/`doc`/`file` registered as three `gaia.agent` entry points that the registry discovers automatically. The core wheel no longer hardcodes them, so the chat family versions independently like every other migrated agent. `gaia chat` resolves the agent through the registry and **fails loudly with an install hint** if the wheel is absent (mirroring how #1446 made `gaia browse`/`gaia analyze` resolve). All three profiles, their full+lite model tiers (via `registry.build_model_tiers`), and their per-profile prompt/tool wiring are preserved exactly. Continues the #1102 Agent Hub restructure after connectors-demo (#1442) and analyst/browser (#1446). The shared `FileToolsMixin` (directory monitoring) stays framework-side — promoted to `gaia.agents.tools.file_monitor_tools` — since tool mixins are framework code (#1396). ## Test plan - [x] `python util/lint.py --all` — black/isort clean (the only pylint hit, `os.geteuid` in `lemonade_installer.py`, is a pre-existing Windows-only false positive; mypy is warning-only) - [x] `pytest tests/unit/agents/test_registry.py tests/unit/test_agents_split.py tests/unit/cli/test_cli_smoke.py` — registry + split green; the 4 `cli_smoke` `gaia-code`/`gaia-emr` console-script hits are pre-existing shared-env pollution (verified passing on the base checkout), unrelated to chat - [x] `pip install -e hub/agents/python/chat && pytest hub/agents/python/chat/tests/` — 7 passed (registration shapes for chat/doc/file, lazy re-exports, discovery, `installed:` namespacing) - [x] `pytest` across the chat-touched framework suites (chat agent, integration, system-prompt budget, browser tools, multi-device, required-connectors, registry factory, chat-UI helpers) — 182 passed with the wheel installed; all skip cleanly via `importorskip` in a framework-only env - [x] Registry discovery lists `chat`/`doc`/`file` as `source=installed` with `installed:chat` namespace; `builder`/`email` remain the only resident builtins - [ ] CI: the `Chat Agent Tests` workflow installs the wheel and runs both the package smoke tests and the framework session/RAG/path-validation suites --------- Co-authored-by: Ovtcharov <[email protected]> Co-authored-by: Kalin Ovtcharov <[email protected]>
Why this matters
AnalystAgent (
data) and BrowserAgent (web) were the last two registry builtins backinggaia analyze/gaia browse. They now ship as standalonegaia-agent-analyst/gaia-agent-browserwheels underhub/agents/python/, discovered via thegaia.agententry point — so the core framework wheel no longer hardcodes them and they version independently. Their full+lite model tiers are preserved exactly; the shared tier builder is promoted toregistry.build_model_tiersso hub packages reuse the identical ~4B preset rather than re-deriving it.Continues the chat-family core wave for #1102 (after connectors-demo #1442).
gaia browse/gaia analyzenow resolve their agent through the registry and fail loudly with an install hint if the wheel is absent.Test plan
python util/lint.py --agents— clean (analyst/browser optional)pytest tests/unit/agents/test_registry.py tests/unit/test_agents_split.py tests/unit/cli/test_cli_smoke.py— green (framework-only tolerates the now-installed agents)pip install -e hub/agents/python/analyst hub/agents/python/browser && pytest hub/agents/python/{analyst,browser}/tests/— 8 passed (incl. discovery + tier shape)Analyst Agent Tests+Browser Agent Testsworkflows install the wheels and run their tests