Repository navigation
refactor(agents): collapse per-task agents into flagship skills - #2995
Merged
kovtcharov-amd merged 9 commits intoAug 24, 2026
Merged
Conversation
Thirteen agent packages are gone: code, routing, blender, sd, emr, analyst, browser, docqa, doc-search, fileio, summarize, jira, docker. Their capability now comes from the flagship agent's tool surface driven by a SKILL.md, which is where new capability belongs — a skill is a markdown file, an agent was a wheel with a manifest, CI, docs, and a publish slot. Most of them were never reachable: only email and gaia have a daemon sidecar spec or a launchable TUI catalog row, so the rest showed as "not published on the Agent Hub yet" and could not be installed at all. Several defined zero tools of their own and consisted entirely of a system prompt already covered by the flagship's 66 registered tools. Two new skills carry forward the prose worth keeping: file-ops (from fileio) and summarize (the style tables and fold-forward chunking from summarize's prompts.py). data-explore, research-report and document-brief already existed and cover analyst, browser and docqa/doc-search. Also removed as dead weight: the jira/summarize/docker standalone apps, the Blender MCP client/server pair, the Docker MCP server, the MCP bridge's jira/blender/summarize surfaces and the multipart upload path that only the summarize endpoint used, the bpy extra, and the blender/jira/docker Claude specialist definitions. Behaviour changes a user can see: - `gaia analyze|browse|summarize|blender|sd|jira|docker` and `gaia mcp docker` are gone, as are the gaia-code and gaia-emr console scripts. - `gaia api` exposes no models: AGENT_MODELS held one entry, the routing agent, which routed to the code agent. - hello-world, word-count and connectors-demo stay as teaching templates and are no longer catalog agents. Jira and Docker return as connectors, scoped in amd#2989 and amd#2990.
added 2 commits
August 18, 2026 02:26
The starter-pack guard checks tools_required against the tools mixins register plus a short whitelist of the tools ChatAgent registers inline. The whitelist was missing request_user_input, so the new file-ops skill failed the guard for declaring a tool the flagship really does register — asking the user before a destructive write is the whole point of that skill. Verified the same way as the rest of the list: the `def` must exist in the chat agent's source, so a rename drops the name instead of silently passing.
`gaia api` started but served nothing: its model map held one entry, the routing agent, which routed to the code agent — both deleted. It now exposes the flagship as the model `gaia`, so any OpenAI-compatible client (VSCode, curl, an SDK) drives the agent that actually ships. Verified end to end: /v1/models lists it, the agent constructs with the SSE handler installed, and an unknown model still 404s with an actionable message. That needed one plumbing fix: ChatAgentConfig never forwarded `output_handler` to the base Agent, so there was no way to hand a ChatAgent the SSE handler the API server streams through. Also stopped three commands describing things that no longer exist: - `gaia download --list` advertised Code/Blender/Jira/Docker agent profiles. The SD entry stays but is relabelled — the SD tool mixin is still here, the standalone agent is not. - `gaia init --profile code` installed models for a deleted agent. - The MCP bridge advertised `gaia.eval`, which nothing has ever implemented — it was the last entry in the manifest with no handler behind it. Docs updated to match: the API reference, spec, SDK page and VSCode guide all said the model list was empty by default.
`execute_python_file` runs a .py file in a subprocess — arbitrary code execution — but it was the one dangerous tool missing from the confirmation gate. `run_shell_command` sits behind both the gate AND a read-only command allowlist; this had neither, so it was the weakest link in the set. It mattered little while the OpenAI-compatible server exposed nothing. Now that it serves the flagship, an unattended caller reaches a 61-tool agent, so the gap closes here. Verified: the tool is refused and the file does not run. Also from review of this branch: - Dropped `python-multipart` from core install_requires. It was there because the MCP bridge imported it at module load to parse multipart uploads for the summarize endpoint; that endpoint and the import are gone, and nothing else under src/ imports it. It stays in the `api` and `ui` extras, which do. - Removed `send_sse_headers` and `stream_sse` from the bridge — the deleted summarize endpoint was their only caller. - Corrected an ApiAgent docstring that claimed `GaiaAgent -> gaia`; the default it documents would produce `gaia-gaia`, and the flagship is served under the `gaia` key in AGENT_MODELS instead.
This was referenced Oct 19, 2026
Closed
Closed
Closed
This was referenced Oct 31, 2026
3 tasks done
huong8373tt-beep
pushed a commit
to huong8373tt-beep/gaia
that referenced
this pull request
Nov 9, 2026
…#7025) Memory discovery on Linux read `~/.local/share/recently-used.xbel`, a file another application writes, with a parser that expanded any entities it declared. A tampered file could inflate the parse or put entity text into the recent-files signal. Now a DOCTYPE that declares entities or points at an external DTD is refused before anything expands. The scan logs a warning and skips the file, and normal bookmark files parse as before. Part 1 of the issue, the `shell=True` Prisma calls, needs no change: the code agent that held them was deleted in amd#2995. <details> <summary>🔍 Technical details</summary> - **Why no `defusedxml`:** the repo doesn't depend on it. Stdlib expat isn't enough on its own. Billion-laughs protection arrived in expat 2.4, and Linux Pythons (`python_requires>=3.10`) often link an older system libexpat. Internal entities expand on every version, and amplification limits don't stop quadratic blowup. Refusing the declarations with expat's own `StartDoctypeDeclHandler` closes all of these with no new dependency. This is the same approach as `defusedxml`'s `forbid_dtd`. - A bare `<!DOCTYPE xbel>` declares nothing, so it is still accepted. Some writers emit one. - The old broad `except Exception` + `logger.debug` is narrowed to `(ExpatError, LookupError, OSError, ValueError)` and logged as a warning. `ValueError` covers the refusal and encodings expat cannot read, and `LookupError` covers unknown encoding names. </details> ## Test plan - [x] `python -m pytest tests/unit/test_memory_discovery.py`: 124 passed, 5 skipped - [x] 7 of the 9 new `TestLinuxRecentXbel` tests (internal entity, billion laughs, external entity, external DTD, malformed file, Shift-JIS and unknown encoding declarations) fail against `main`. The normal-file and bare-DOCTYPE tests pass on both. - [x] black, isort, flake8 (88 cols) clean on the changed lines Closes amd#2952
4 tasks done
kovtcharov-amd
added a commit
to kovtcharov/gaia
that referenced
this pull request
Nov 11, 2026
… agent framework (amd#7085) The agent framework's confirmation, risk and document-tool tables listed tools that don't exist, such as `run_cli_command` and `query_indexed_documents`. The tables looked complete while describing tools removed or renamed long ago, which hides real drift. A second, unused path-permission cache also wrote `path_permissions.json` on every session start, alongside the real tool grants. This removes the phantom names, corrects one to the tool it was meant to match, and deletes the dead cache and other uncalled code. Confirmation behaviour for real tools is unchanged, and old session files still load. Closes amd#7072 ## Test plan - [x] Tests touching the edited modules, the process-safety ratchet, import-every-module and registry tests: 7,275 passed, 67 skipped. - [x] Flagship package tests: 1,300 passed. 3 failed (`test_full_tool_bundles` ×2, `test_manifest_tools_count_matches_real_registry`); they fail identically without this change, because the browser tools aren't installed in the local environment. - [x] New tests: an old session file that still has `path_permissions` loads, and an existing `path_permissions.json` is left on disk. - [x] TUI: `go build`, `go vet` and the `components` tests pass. Agent UI: `tsc --noEmit` is clean and the permission-prompt tests pass (68). <details> <summary>🔍 Technical details</summary> | Name | Outcome | |---|---| | `run_cli_command` | Removed from the Python tables, the TUI mirror, `sse_translation.py` and `PermissionPrompt.tsx`. Its mixin went in amd#2995; `run_shell_command` and `wait_for_condition` were already in every table. | | `query_indexed_documents`, `index_documents`, `session_findings`, `read_document` | Removed. `index_document` already covers the prefix match. | | `index_dir` | Corrected to `index_directory`, the real tool it matched by prefix. | | `run_tests` | Removed from `chunk_index.py`. Kept in `verification.py`, where the docs list it as a recognised test-run name. | - `gaia_agent/session.py`: `validate_path`, `validate_directory`, `clear_path_permissions` and the `path_permissions.json` load/save are gone. - Also removed: unused audio refine helpers, `SkillDelta.is_overlaid`, `STATUS_ORPHANED`, two unused snapshot defaults, and the unreachable PyPDF2 fallback (`pypdf>=6.20` is pinned). - Kept: `registry.py`'s warning for YAML-only agents, which a user with an old agent folder still sees. - No tool docstring or prompt changed, so no eval category is affected. </details> Co-authored-by: Kalin Ovtcharov <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
GAIA shipped 19 agent packages and a user could reach two of them. Everything except
emailand thegaiaflagship showed in the TUI as "not published on the Agent Hub yet" — no daemon sidecar spec, no launchable catalog row, no install path. Meanwhile several of those packages defined zero tools of their own: they were a system prompt wrapped in a wheel, and the prompt described tools the flagship already registers.This deletes thirteen of them and moves the part worth keeping — the procedural knowledge — into
SKILL.mdfiles the flagship loads on demand. Adding a capability is now writing markdown, not shipping a package with a manifest, a CI workflow, a publish slot, and a docs page. Net: -98,000 lines.Deleted:
code,routing,blender,sd,emr,analyst,browser,docqa,doc-search,fileio,summarize,jira,docker. Kept:gaia(flagship),chat(its base class),email, plushello-world/word-count/connectors-demoas teaching templates that are no longer catalog agents.Two new skills carry the deleted prose forward —
file-opsandsummarize(its style tables and fold-forward chunking procedure).data-explore,research-reportanddocument-briefalready existed and cover analyst, browser and the two RAG duplicates.Jira and Docker come back as connectors — scoped in #2989 and #2990. Docker needs a security decision first:
docker buildexecutes arbitrary code, and GAIA only grants a skill shell access through a reviewed per-binary policy.What a user will notice
gaia analyze | browse | summarize | blender | sd | jira | dockerandgaia mcp dockerare gone, along with thegaia-codeandgaia-emrconsole scripts.gaia apinow exposes exactly one model,gaia— the flagship. Its map previously held one entry, the routing agent, which routed to the code agent; both are deleted, so the endpoint is now pointed at the agent that actually ships. Any OpenAI-compatible client (VSCode, curl, an SDK) works against it.gaia download --listandgaia init --profileno longer offer profiles for deleted agents, and the MCP bridge stopped advertisinggaia.eval, which nothing has ever implemented.🔍 Also removed, and why
Dead weight that only existed to serve a deleted agent:
src/gaia/apps/{jira,summarize,docker}— standalone apps importing deleted agent classes.src/gaia/mcp/blender_mcp_{client,server}.py— a Blender-addon socket protocol on port 9876, not MCP.src/gaia/mcp/servers/docker_mcp.py— a thin wrapper aroundDockerAgent.gaia.jira/gaia.blender.create/gaia.summarizetools and/jira/summarizeendpoints, plus the multipart-upload path only/summarizeused (mcp_bridge.py: 953 → 624 lines).blenderextra (bpy), thedata-lite/web-litelegacy registry aliases, staleFRAMEWORK_PATHSentries that would have filtered a user's own frames out of their traceback, and the blender/jira/docker Claude specialist definitions.src/gaia/sd/mixin.pyis kept — image generation stays available on ChatAgent behind the existingenable_sd_toolsflag; only the standalone agent is gone.Docs: 38 pages deleted, 39 edited,
docs/docs.jsonpruned. All 194 nav entries verified to resolve to a real file.Test plan
python util/lint.py --all— clean, exit 0All 13 skills parse via
parse_skill_file, and every tool each one declares intools_requiredexists in the flagship's live registry (66 tools, 0 gaps) — verified by instantiatingGaiaAgentand diffing, sincetools_requiredis advisory and a gap fails mid-run rather than at loadgaia --helplists no deleted command; each removed command is rejected;gaia mcp --helphas nodockergaia api:/v1/modelsreturns an empty list and a request for a deleted model 404s with an actionable messageMCP bridge boots with 2 agents / 3 tools; a deleted tool returns a clean "not implemented"
gaia apiend to end:/v1/modelslistsgaia,registry.get_agent("gaia")builds the flagship with the SSE handler installed and 61 tools registered, and an unknown model 404s with an actionable messagecd tui && go build ./... && go test ./...— all packages passdocs/docs.json: 194 nav pages, 0 missing filespytest tests/unitfull run, compared against the same run on unmodifiedmain:Those failures are pre-existing and environmental: the sandbox this ran in blocks the loopback socket
asyncio.new_event_loop()needs on Windows, tripping the repo's hermetic-network guard (tests/unit/conftest.py, untouched here). A set-diff of failing node ids found exactly one genuine regression — the starter-skill guard rejectingrequest_user_input— fixed in the second commit. Every other difference reproduces identically onmainwhen run in isolation. The 30 fewer passes are tests deleted along with their agents.Launch the flagship in the TUI and exercise a collapsed capability end to end — e.g. load
data-exploreand confirm it callscreate_table/query_datainstead of fabricating. Needs a machine with Lemonade running; not done yet.Review notes
The riskiest edits are not the deletions — they are the three files that had a deleted agent threaded through shared logic:
src/gaia/cli.py(dispatch + parsers),src/gaia/mcp/mcp_bridge.py(tool routing), andtests/test_api.py(every request now 404s atmodel_existsbefore reaching validation, so the live-server success-path tests were removed rather than left to rot).