Repository navigation
feat(email): flagship reads threads and finds mail waiting on you - #6124
Conversation
The flagship could list, search and open single messages but not read a whole conversation, say which mailbox it was on, or find the threads where the user owes a reply - three things the email agent does and the first gap to close before that agent can be retired. - get_thread, list_connected_mailboxes and list_waiting_on_you join the read-only mail tools (a new email_threads loader bundle), for Gmail and Outlook through the existing backends. The waiting-on-you detector is ported from the email agent (same predicates, same corpus precision gate) rather than imported. - A forwarded connection with no explicit required scopes now needs any one mail read scope instead of gmail.modify + gmail.send, which the read-only flagship never holds. - The retrieval and tool-cost eval harnesses measure GaiaAgent; the ChatAgent doc-profile report stays reachable with --agent chat. - inbox-triage skill, email/gaia guides, connectors SDK doc, flagship README/SPEC/SKILL/CHANGELOG and the capability matrix updated; the registered tool count is 101.
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 |
|
Verdict: Request changes (one small fix) The flagship can now read a whole email conversation, say which mailbox it is reading, and find threads where you owe a reply, for Gmail and Outlook, still read-only. Forwarded read-only Gmail connections are no longer rejected. The detector port is careful, the tests are thorough, and the evidence shows all three tools working. One thing needs fixing before merge:
Real-world evidenceThe evidence stage ran the three new tools against an offline mailbox and ran the
🔍 Technical details🟡
🟢 Gmail silently scans fewer messages than the tool advertises. 🟢 Strengths
|
The eval-harness change made three lanes import the flagship package they never install, so the email unit lane, the chat lane and the RAG retrieval gate went red. - tests/unit/eval/test_harness_flagship_target.py is allowlisted to skip outside test_gaia_agent.yml, which installs both wheels before its skip guard and now runs the file. - test_chat_agent.yml, test_rag.yml's retrieval gate and eval_retrieval.yml install hub/agents/gaia/python, and the chat lane triggers on it. - list_waiting_on_you's docstring and the email guide state Gmail's real scan cap (100), not 200.
…dget get_thread and list_waiting_on_you shipped 543- and 540-char descriptions, over the flagship's per-tool schema budget, so the code-quality lane failed. Trimmed to what the tool does, when to use it, and what it returns.
…dget get_thread gave every message at least 400 chars even when less budget was left, and only refused when the budget was already spent. On an NPU budget (30K chars) a ~75-message thread, or a short thread after a few read_email calls, overflowed the context window on the first read. It now refuses up front with turn_budget_exhausted when messages x 400 exceeds what is left, names the thread size and remaining budget, and points at read_email.
…#6158) The published `@amd-gaia/gaia` 0.3.3 changelog listed two changes that version does not ship: the mail thread tools and the read-only Gmail connection fix from amd#6124 merged after the 0.3.3 release (amd#6122) but were filed under `[0.3.3]`. They now sit under `[Unreleased]`, so the next release notes pick them up and the 0.3.3 notes match what was published. amd#6124's entries are the only ones added under `[0.3.3]` since the `agent-pkg-gaia-v0.3.3` tag; the other changelogs main has touched since are already under Unreleased. ## Test plan - [ ] `git diff agent-pkg-gaia-v0.3.3 HEAD -- hub/agents/gaia/npm/CHANGELOG.md` shows no change inside `## [0.3.3]` - [ ] Both amd#6124 bullets appear once, under `## [Unreleased]` → `### Added` - [ ] CI green
## Why this matters v0.25.4 is cut for Arabic support: the Agent UI runs right to left in Arabic, and people can ask about Arabic, English or mixed documents in either language (amd#6165). It also adds a local-only mode that keeps every AI request on the PC, image indexing, and email thread reading for the GAIA agent. Among the fixes, chats no longer get stuck on "Waiting for the GPU", and file paths resolve to the chat's folder and the real Documents folder. 59 commits since v0.25.3; the notes are in `docs/releases/v0.25.4.mdx` and credit 7 outside contributors. This is a patch carrying 8 `feat` commits, approved as v0.25.4 for the Arabic RC. ## Test plan - [x] `python util/validate_release_notes.py docs/releases/v0.25.4.mdx --tag v0.25.4` passes, and with `--tag v0.25.4-rc1` - [x] `mintlify validate` (from `docs/`) passes - [x] `python util/release_versions.py --check`, `python util/check_doc_links.py --internal-only` and `python util/check_doc_versions.py` pass - [x] `python util/check_component_core_api.py --release-version 0.25.4` passes - [x] `pytest tests/unit/test_docs_json_release.py tests/unit/test_check_component_core_api.py tests/unit/test_release_tag.py tests/unit/test_hub_core_version_gate.py tests/unit/test_release_versions.py hub/agents/gaia/python/tests/test_npm_doc_min_version.py`: 230 passed - [x] Re-run the above after amd#6165 merged and main was merged in - [ ] CI green on the merge commit - [ ] `release_train_dryrun.yml` passes on that commit before the RC tag ## Evals to re-run on the RC tag LLM-affecting PRs merged without per-PR evals; run these on `v0.25.4-rc1`: - `rag_quality` and `real_world` (amd#6165, amd#6057) - `gaia_rag` and `gaia_media` (amd#5651) - `gaia_email` (amd#6124) - `gaia_skills_tasks` and `gaia_skills_lifecycle` (amd#5450, amd#5454, amd#6080) - `gaia_files` and `gaia_shell` (amd#6069, amd#6074, amd#6120) - `gaia_code` (amd#6056) - `gaia_core` and `context_retention` (amd#6152) - `gaia_data` and `tool_selection` (amd#6053, amd#6130) - `memory` and `gaia_memory` (amd#6127, amd#6081) - `gaia_tool_selection` for tool confirmations (amd#5541) ## Release checklist - [ ] Keep amd#6114 unmerged until v0.25.4 is tagged, so main stays on 0.25.4 - [ ] Freeze main, wait for green CI on the exact commit, pass `release_train_dryrun.yml`, then push `v0.25.4-rc1` (the RC freezes its own flagship; no agent release needed) - [ ] Before the final: release the flagship from the release commit (`agent-pkg-gaia-v<next>`), merge its pin-lock PR, and pass `check_flagship_release.py` - [ ] Extend the changelog if main gains commits before the tag
The flagship could list, search and open single emails, but it could not read a whole conversation, say which mailbox it was reading, or find the threads where the user owes a reply. The email agent can do all three, and it can't be retired until the flagship can too. After this PR the flagship has all three for Gmail and Outlook, still read-only. A host app that forwards a read-only Gmail connection is also no longer rejected: GAIA used to require the email agent's modify and send scopes, which the flagship never holds.
This is stage 1 of mail parity. The email agent stays in place.
get_threadreturns a whole conversation, clipping long bodies so no message is dropped.list_waiting_on_youuses the email agent's detector, ported with its precision checks and passing the same 104-row promotional corpus with zero false positives.list_connected_mailboxesreports connection state without a network call.python -m gaia.eval.tool_costnow reports on the flagship. The old ChatAgent doc-profile numbers (Tool loader — Part 0: measure tool-prompt cost & TTFT baseline #1448) are still reproducible with--agent chat --profile doc. Neither harness needs a new baseline.Evals to run on the Strix Halo pool (LLM-affecting: three new tools, changed tool docstrings, updated skill):
gaia_email,gaia_tool_selection,tool_selection. The scenario baseline needs a new capture only if one of those categories changes on purpose. Thegaia_emailfixture mailbox has no sent mail, so no current scenario can produce a positive waiting-on-you result. Adding a scenario for it is a follow-up.Test plan
python -m pytest tests/unit/agents/tools/test_email_thread_tools.py tests/unit/agents/tools/test_email_waiting_on_you.py -q. Gmail and Graph request shapes (paths,$filterwith no$orderby, label ids), tool behaviour, the corpus precision checks, and the tests that try to fake reply historypython -m pytest tests/unit/connectors/test_forwarded_import.py tests/unit/connectors/test_formatting.py -q. A read-only forwarded connection is accepted, and the error never asks for more than read accesspython -m pytest tests/unit/eval/test_harness_flagship_target.py hub/agents/gaia/python/tests -qpython -m gaia.eval.tool_costreports "gaia agent, full", and--agent chat --profile docreproduces the old reporteval_flagship.ymlforgaia_email,gaia_tool_selection,tool_selectionand compare againsttests/fixtures/eval_baselines/gaia-flagship/