refactor(agents): migrate chat to hub (#1102)#1456
Conversation
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).
Code Review —
|
# Conflicts: # src/gaia/agents/docqa/agent.py
# Conflicts: # setup.py # src/gaia/agents/registry.py
|
🟡 Every other file changed in this PR wraps # verify_path_validator.py line 16
from gaia_agent_chat.agent import ChatAgent, ChatAgentConfigRunning either script in a framework-only environment now throws a bare Same fix applies to |
Why this matters
ChatAgent — the flagship conversational agent powering
gaia chat(andgaia chat --ui) under itschat,doc, andfileprofiles — was the last family of registry builtins still hardcoded inside the core framework wheel. It now ships as the standalonegaia-agent-chatwheel underhub/agents/python/chat/, withchat/doc/fileregistered as threegaia.agententry 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 chatresolves the agent through the registry and fails loudly with an install hint if the wheel is absent (mirroring how #1446 madegaia browse/gaia analyzeresolve). All three profiles, their full+lite model tiers (viaregistry.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 togaia.agents.tools.file_monitor_tools— since tool mixins are framework code (#1396).Test plan
python util/lint.py --all— black/isort clean (the only pylint hit,os.geteuidinlemonade_installer.py, is a pre-existing Windows-only false positive; mypy is warning-only)pytest tests/unit/agents/test_registry.py tests/unit/test_agents_split.py tests/unit/cli/test_cli_smoke.py— registry + split green; the 4cli_smokegaia-code/gaia-emrconsole-script hits are pre-existing shared-env pollution (verified passing on the base checkout), unrelated to chatpip 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)pytestacross 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 viaimportorskipin a framework-only envchat/doc/fileassource=installedwithinstalled:chatnamespace;builder/emailremain the only resident builtinsChat Agent Testsworkflow installs the wheel and runs both the package smoke tests and the framework session/RAG/path-validation suites