Repository navigation
feat(ui): cut email over to the out-of-process sidecar (remove in-process /v1/email) - #1910
Conversation
…cess /v1/email) Before: the Agent UI's email surface was split. The /v1/email REST routes were served by an in-process mount of the email wheel by default, and only by the out-of-process sidecar when GAIA_EMAIL_AGENT_MODE was set; separately, the in-app email chat agent (agent_type=email) ran the heavy EmailTriageAgent in-process, loading live Gmail/Outlook backends, an action DB, and a memory store into the UI process. After: the sidecar is the sole, default backend for both surfaces. The core UI backend no longer imports the email wheel — it stays lightweight, crash-isolated, and dogfoods the exact schema-2.1 product third-party integrators consume. - Ungate the proxy: it forwards the full schema-2.1 contract (prescan, search, archive/unarchive, quarantine/unquarantine, confirm, batch triage, calendar) returning the sidecar's envelopes unchanged. The UI router exposes the full contract so removing the in-process mount does not shrink the external surface. - The /v1/email surface defaults to user mode (frozen binary); GAIA_EMAIL_AGENT_MODE only selects user vs dev. There is no in-process fallback — a missing/unpublished binary fails loudly with a remedy. - agent_type=email now runs EmailProxyAgent: the local-LLM tool loop stays in the UI backend, but every tool is a thin HTTP call to the sidecar. pre_scan_inbox returns the identical email_pre_scan envelope, so the triage card renders unchanged. Tool surface is the subset the REST contract serves today (inbox pre-scan, search, calendar view, archive + undo); unmapped in-process tools are not exposed until their REST routes land. Refs #1767 (cutover), #1882 (design), #1884 (foundations), #1883 (REST 2.1).
Verdict: ApproveThis PR makes the out-of-process email sidecar the sole, default backend for both the No blocking issues. The shared-singleton manager is the one thing worth a second look — I traced it and it's correct (the two server-wiring tests pass because 🔍 Technical details🟢 Minor / nits🟢 🟢 Single-element 🟢 Strengths
|
…ans (§0.27) A requirements-traceability + cross-plan review found: - Requirement over-claim: the plan said "every capability is a deterministic call," but specification.html marks the advanced/personalization tier "agent only." Corrected §0.1 + the overview: the sidecar exposes the FULL capability set split across two surfaces — the deterministic core as fixed-function endpoints, the advanced tier (task extraction, follow-up, daily briefing, scheduled send, sender prioritization, inbox profiling, preferences) behind /query + §0.22. - §0.27 Relationship to sibling plans: v2 SUPERSEDES the "sidecar reads grants.json directly" model (connectors.mdx + email-sidecar-agent-ui.md → §0.6 forwards tokens), security-model.mdx's "localhost is the trust boundary" (→ §0.11/§0.24), and the impl plan's "UI backend owns the sidecar" (interim only; the daemon owns it in v2). RECONCILES autonomy-engine (= the v2 daemon), MCP server ownership (host owns registry, sidecar owns connections), and setup-wizard vs §0.5 model provisioning. Cross-links hub-publish Part 2 = §0.5. - Added a supersede banner to the v1 email-sidecar-agent-ui.md (the doc PR #1910 was built from) so readers don't follow the inverted grants model. Requirements 2–7 (CLI parity, thin UI, dev mode, hub mirror, both surfaces, backwards-compat) verified well-captured.
Per feedback: /query isn't UI-specific — it belongs on every agent-serving REST surface. The OpenAI-compatible API server (src/gaia/api/, `gaia api`) today serves /v1/chat/completions + /v1/models + an in-process /v1/email mount, but not the agentic loop. §0.33: - Adds POST /v1/<agent>/query (SSE) to the API server — the SAME contract, proxied to the sidecar (one agent-loop implementation, no in-process loop). - Keeps /v1/chat/completions (OpenAI-SDK drop-in) alongside /query (the agentic superset with tool events + confirmation + workflows). - Supersedes the API server's in-process /v1/email mount (openai_server.py:143 — the surface left out of PR #1910's scope) → sidecar-backed like the UI's. - Flags that this is a NETWORK-exposed surface (unlike the loopback daemon), so /query here sits behind API-key auth and still enforces the confirmation gate + containment — it must NOT inherit §0.11's loopback trust assumptions. Reframed the overview's "three thin clients" → "one contract, many front-doors" (CLI, UI, the gaia api server, integrators), all proxying to the one sidecar loop.
amd#1913) ## Why this matters Today the Agent UI is a ~19K-LoC Python backend that hosts each agent **in-process** — so the app can't dogfood the out-of-process product integrators actually consume, and every agent's logic is entangled with the UI. This plan recasts it: **every agent is its own out-of-process sidecar exposing one REST contract**, and the **Agent UI becomes a thin host** that renders components and supervises sidecars. All agent reasoning runs in the sidecar; the UI (and the `gaia <agent>` CLI, and integrators) all drive the *same* contract. The keystone the current product is missing: a **`POST /query` agent endpoint (SSE)** that reasons and chains tools into multi-step workflows — co-equal with the deterministic fixed-function endpoints. `gaia email` and the sidecar become endpoint-identical. This supersedes the incremental email cutover (amd#1910), whose in-UI `EmailProxyAgent` (a reduced 5-tool loop) is replaced by relaying to the sidecar's full `/query` — which also removes that PR's tool-surface reduction. ## What's in the PR Design captured across two docs (overview drives, detailed plan follows): - **`agent-ui.mdx`** — architecture, the thin-host boundary, `/query` SSE, hub mirror (one-click install/uninstall), dev mode, the card-rendering change, and a strangler-fig migration path. - **`agent-ui-agent-capabilities-plan.md` §0** — the per-sidecar REST contract, the `/query` SSE event schema, the host `AgentSidecarManager` + proxy, mid-workflow confirmation, OAuth forwarding, CLI parity, shared-service custody, and what each fat-backend router becomes. ## Grounded/corrected against the current code (not hand-waved) The design was reviewed against the real code and three optimistic claims were fixed: - **Card rendering is fence-based today** (`MessageBubble.tsx` `STRUCTURED_PAYLOAD_LANGS`) → v2's typed `render` SSE event is a real (small) frontend change, called out honestly. - **`/v1/connections` is a host-side *intake* today** (`connectors.py:94`, `api.py:266`) → v2 inverts the role to host-forwards-out, and assigns **token refresh to the single-writer host**. - **Memory (~1634 LoC) and RAG (~739) are cross-agent** → they live in host custody (same single-writer rationale as OAuth), not per-sidecar; the session index stays host-side. ## Open decisions flagged for sign-off (not silently resolved) - **Mid-workflow confirmation:** stateless stop-and-hand-off (recommended v1, preserves the sidecar's "HTTP, stateless" ethos) vs. a stateful resume model. - **Memory/RAG home:** host custody (recommended) vs. dedicated memory/RAG sidecars — the single call that most shapes the migration. ## Test plan - [ ] Review `agent-ui.mdx` "Architecture (v2 — sidecar-first)" section for the vision + boundaries. - [ ] Review `agent-ui-agent-capabilities-plan.md` §0.1–§0.10 for the contract, `/query` schema, supervisor, migration path. - [ ] Confirm the two open decisions (confirmation model, memory/RAG home). - [ ] Docs-only change — no code paths affected.
## Why this matters The v2 sidecar-first architecture (amd#1913) is signed-in design, but nothing yet tells an implementer where to start, what's reusable vs. net-new, or which unsigned decisions block which work — so the build can't be parallelized or even safely begun. This adds the implementation decomposition: a code-verified delta table for every v2 building block, 19 sequenced issue proposals (with acceptance criteria, dependencies, S/M/L sizes — proposals only, none filed), a specced first vertical slice (headless daemon + supervised email sidecar + `/query` streamed to the CLI), and the three sign-off decisions (§0.4 confirmation model, §0.9 custody home, §0.24 containment 🔒) as explicit questions. It also pins verified design-vs-merged deviations so implementers don't trip on them: `gaia api` still mounts email in-process (the pattern amd#1910 removed from the UI only), the only scheduler on main is UI-internal (PR amd#1566 — `gaia schedule`/PR amd#1371 is unmerged), and contract 2.1 has no `/query`, no auth (amd#1706), and no `/shutdown`. ## Test plan - [ ] Docs-only — no code paths touched - [ ] Spot-check the delta table's file/LoC claims against `main` @ `080e7259` (all were verified while writing) - [ ] Confirm the issue proposals don't duplicate existing open issues (checked: amd#1706, amd#1653, amd#1896, amd#1717 are linked, not duplicated)
Release notes had grown into long blocks of prose with a marketing-toned paragraph on top. They now generate as short bullets grouped by section, with a word cap on the narrative part. Nothing informational is lost — every PR link, contributor credit, and changelog entry is preserved; the prose around them is cut. Two generators write `docs/releases/<tag>.mdx` and they had drifted apart. The `gaia-release` skill told the model GAIA's notes "read dry" and to make them "engaging"; the `release-notes` job in `claude.yml` asked for "comprehensive" notes with an `## Overview` paragraph and emoji headings. Fixing one alone would have been overwritten by the other on the next tag, so both now share one spec. Closes amd#2961 ## What it looks like now Regenerated from the last two releases — same facts, same PR numbers, new template. Narrative words (the capped part, excluding bug-fix/contributor/changelog lists): | Release | Published | Regenerated | Cap | |---|---|---|---| | v0.22.0 (minor) | 1705 | **538** | 600 | | v0.23.0 (minor) | 1119 | **280** | 600 | <details> <summary>Example 1 — v0.23.0 regenerated</summary> ```markdown --- title: "v0.23.0" description: "Install and run agents from the terminal, add capabilities as skills, and connect a Microsoft account without a secret." --- # GAIA v0.23.0 Release Notes Agents are now installable from the terminal, and the confirmation gate that pauses an agent before a consequential action works everywhere, not just in the Agent UI. ## Breaking Changes - **`GAIA_MICROSOFT_TENANT` is gone** — the Microsoft connector split into Personal and Work/School, each with its own tenant. Drop the variable and pick the matching connector. (PR [amd#2729](amd#2729)) ## What's New - **Install and run agents from the terminal** — `gaia hub list`, `gaia hub install <agent> --trust`, `gaia hub uninstall <agent>`. `--trust` is required for an unverified agent. (PRs [amd#2484](amd#2484), [amd#2530](amd#2530), [amd#2708](amd#2708)) - **Every agent asks before it acts** — the confirmation gate for sending mail, writing files, and running commands now fires from the terminal, the local API, and MCP tool calls, not only the Agent UI. Set `GAIA_AUTO_APPROVE_TOOLS=1` to opt out. (PRs [amd#2475](amd#2475), [amd#2544](amd#2544), [amd#2846](amd#2846), [amd#2854](amd#2854)) - **Safer by default** — the MCP bridge binds to localhost and enforces `--auth-token`; the local API refuses credentialed cross-origin requests from non-allow-listed sites; MCP servers launch without a shell; agents cannot write to `~/.gaia` or pass crafted SQL to the database agent. (PRs [amd#2246](amd#2246), [amd#2238](amd#2238), [amd#2344](amd#2344), [amd#2844](amd#2844), [amd#2847](amd#2847), [amd#2860](amd#2860)) - **Add capabilities as skills** — `gaia skill create|import|list|info` gives an agent a new capability from a folder and a manifest. Skills are signed with trust tiers, audited before publish, and opt-in. (PRs [amd#2669](amd#2669), [amd#2692](amd#2692), [amd#2702](amd#2702), [amd#2693](amd#2693)) - **Connect a Microsoft account without a secret** — Personal and Work/School are separate connectors with device-code sign-in. (PRs [amd#2718](amd#2718), [amd#2364](amd#2364)) - **Lemonade Server 11.5.0.** ## Bug Fixes - **Triage paginates large inboxes and reports truncation** (PR [amd#2646](amd#2646)) — mail past a hidden limit is no longer dropped without saying so. - **Thread messages come back sorted and numbered** (PR [amd#2570](amd#2570)) — "reply to 3" hits the message shown at position 3. - **The inbox pre-scan reports uncertainty as uncertainty** (PR [amd#2587](amd#2587)). - **An email conversation survives its turns** (PR [amd#2837](amd#2837)) — a follow-up keeps session context. - **A bare reconnect keeps existing grants** (PR [amd#2733](amd#2733)). - **Restore from Trash anytime** (PR [amd#2542](amd#2542)) — no time window on undo. - **Sender priority no longer overrides content classification** (PR [amd#2774](amd#2774)). - **The agent survives an OpenMP double-init** (PR [amd#2508](amd#2508)). - **Large tool results truncate to valid JSON** (PR [amd#2645](amd#2645)). - **A missing model surfaces as a real 404** (PR [amd#2245](amd#2245)). - **GPU is detected on all platforms and `default_device` is honoured** (PR [amd#2244](amd#2244)). - **A sidecar that is alive but not serving is detected** (PR [amd#2707](amd#2707)). - **The model-slot lease is held across inference** (PR [amd#2394](amd#2394)) — a second agent can't evict the model mid-generation. - **A browser that never launched is surfaced** (PR [amd#2507](amd#2507)). - **Stop aborts in-flight streaming** (PR [amd#2166](amd#2166)). ## Known Issues - **The email agent is beta and CLI-first** — treat its output as a draft to review. - **A full inbox triage can time out on larger mailboxes.** - **Email autonomy is experimental** and not wired up in the packaged sidecar. ## Contributors - [@handle](https://github.com/handle) — <contribution> (PR [#NNN](https://github.com/amd/gaia/pull/NNN)) <!-- generated from the commit log; v0.23.0's list is unchanged from the published notes --> ## Full Changelog **N commits** since v0.22.0: - `<sha>` — <subject> Full Changelog: [v0.22.0...v0.23.0](amd/gaia@v0.22.0...v0.23.0) ``` </details> <details> <summary>Example 2 — v0.22.0 regenerated (the largest recent release)</summary> ```markdown --- title: "v0.22.0" description: "The email agent tracks follow-ups and action items, drafts in your voice, and runs as its own process. Plus a cron scheduler and Word document support in RAG." --- # GAIA v0.22.0 Release Notes A large release built around the email agent, which now tracks what you're waiting on instead of forgetting it after triage. ## Breaking Changes - **Triage returns a reply scaffold, not an empty draft** — `POST /v1/email/triage` and `/triage/batch` now return a `DraftScaffold` without `body`. Code reading `result.draft.body` gets a missing key instead of `""`; use `POST /v1/email/draft` for composed prose. (PR [amd#1984](amd#1984)) - **RoutingAgent and DocumentQAAgent moved to standalone packages** — install `gaia-agent-routing` and `gaia-agent-docqa`. The old imports fail; there is no deprecation shim. (PR [amd#1455](amd#1455)) ## What's New - **An inbox agent that keeps track** — `gaia email` scans Sent folders across every connected mailbox and flags threads still waiting on a reply past a window you set (default 3 days). Detection only; it never nudges anyone for you. (PRs [amd#1922](amd#1922), [amd#1917](amd#1917), [amd#1919](amd#1919), [amd#1918](amd#1918)) - **Drafts in your own voice** — the agent derives greeting, sign-off, length, and formality from your Sent history and composes against that. Only the derived characteristics are stored, never old mail content. (PR [amd#1925](amd#1925)) - **Attachments work end to end** — triage surfaces each attachment's name, type, and size, and drafting and sending accept real attachments as Gmail multipart MIME or Outlook Graph attachments. (PRs [amd#1921](amd#1921), [amd#1883](amd#1883)) - **Email runs as its own process in the Agent UI (beta)** — install it from the Agent Hub panel and the UI talks to it over HTTP, instead of loading the email stack into the UI process. (PRs [amd#1884](amd#1884), [amd#1910](amd#1910), [amd#2100](amd#2100), [amd#2101](amd#2101), [amd#2105](amd#2105)) - **Run prompts on a cron from the terminal** — `gaia schedule add --name digest --cron "0 9 * * *" --prompt "summarize my inbox" --sink stdout`, then `gaia schedule daemon`. Schedules live in a hand-editable `~/.gaia/schedules.toml`; sinks are `stdout`, `file:<path>`, `notification`, or `telegram`. (PR [amd#1371](amd#1371)) - **Agents learn from work they repeat** — after enough successes on the same shape of goal, an agent distills the tool sequence into a reusable procedure and recalls it next time. Runs inside the existing memory pass; nothing to install. (PR [amd#1794](amd#1794)) - **Pick your model once** — `gaia config set default_model <id>` persists across `gaia chat`, `gaia llm`, and `gaia prompt`. An explicit `--model` still wins for a one-off. (PR [amd#1863](amd#1863)) - **RAG reads Word documents** — `.docx` files index like PDF and PPTX, including table cells, nested tables, content controls, hyperlinks, and textboxes, so filled-in form values get indexed. (PR [amd#1866](amd#1866)) - **A new default embedder** — the previous default cannot be loaded by current llama.cpp builds, which broke indexing, code search, and memory embedding on an up-to-date Lemonade. The default is now EmbeddingGemma 300M at the same 768 dimensions. (PRs [amd#1952](amd#1952), [amd#1761](amd#1761), [amd#1748](amd#1748)) - **The Agent Hub shows what an agent is worth** — an agent's page now carries its eval scorecard with a score badge and a code-derived capability matrix. (PRs [amd#1985](amd#1985), [amd#2020](amd#2020), [amd#2066](amd#2066)) - **Lemonade Server 10.10.0** — adds an audio-generation endpoint, lets Windows reuse system ROCm, and inhibits suspend during inference. Two upstream breaking changes are Linux-specific. (PR [amd#1969](amd#1969)) ## Bug Fixes - **`gaia init` said a working Lemonade wasn't installed** (PR [amd#1940](amd#1940)) — modern Lemonade (10.7+) dropped the `lemonade-server` CLI that GAIA probed for. - **Installing the email agent from the Hub failed on every platform** (PR [amd#2086](amd#2086)). - **Bulk triage broke on any real inbox** (PR [amd#2088](amd#2088)) — 60 emails overflowed the 16K context window; the result envelope is now condensed. - **RAG silently indexed nothing** (PR [amd#1979](amd#1979)) — a failed `sentence-transformers` import made every indexing call a no-op. - **Email bodies were truncated at 4,000 characters with no override** (PR [amd#2036](amd#2036)) — MFA codes and precise replies lost content past the cutoff. - **Long threads overflowed the model's context** (PR [amd#2076](amd#2076)). - **A disabled device was treated as usable** (PR [amd#2081](amd#2081)) — a device reporting `available: false`, such as an unpowered NPU, was misread as ready. - **A newly connected mailbox was skipped** (PR [amd#1808](amd#1808)) — mailboxes connected mid-session were not picked up. - **JSON with a `}` inside a string was dropped** (PR [amd#1824](amd#1824)). - **Outlook users were told to reconnect Google** (PR [amd#1757](amd#1757)) — `AGENT_NOT_GRANTED` named the wrong provider. - **The Agent UI hard-crashed on a recoverable GPU crash** (PR [amd#1799](amd#1799)) — it now falls back to software rendering. - **A user-edited memory could be silently downgraded and then wiped** (PR [amd#1958](amd#1958)). - **The builder agent ignored an agent name you had already given** (PR [amd#1981](amd#1981)). - **The landing and hub pages scrolled sideways on phones** (PR [amd#1959](amd#1959)). ## Known Issues - **Inbox pre-scan needs a single mailbox for now** — with both Gmail and Outlook connected, an Agent UI pre-scan errors. Disconnect one in Settings → Connectors; triage itself still spans every mailbox. ([amd#2127](amd#2127)) - **Spam detection under-flags over the REST API** — `/v1/email/triage` uses a narrow sender check rather than the model's reading. The agent's own inbox scanning is unaffected. ([amd#2124](amd#2124)) - **The email agent is beta** — treat its output as a draft to review. It never sends without your confirmation. ## Contributors - [@alexey-tyurin](https://github.com/alexey-tyurin) — skill auto-synthesis / procedural memory (PR [amd#1794](amd#1794)) - [@TravisHaa](https://github.com/TravisHaa) — the `gaia schedule` CLI and cron-based dispatch (PR [amd#1371](amd#1371)) - [@Rohithmatham12](https://github.com/Rohithmatham12) — refresh resolved email backends before multi-mailbox triage (PR [amd#1808](amd#1808)) - [@Osamaali313](https://github.com/Osamaali313) — fix `extract_json_from_text` dropping JSON containing `}` (PR [amd#1824](amd#1824)) - [@eeee2345](https://github.com/eeee2345) — offline model-endpoint guard-proxy integration guide (PR [amd#1809](amd#1809)) - [@somo9909](https://github.com/somo9909) — prerequisites section for the memory guide (PR [amd#1665](amd#1665)) ## Full Changelog **N commits** since v0.21.2: - `<sha>` — <subject> Full Changelog: [v0.21.2...v0.22.0](amd/gaia@v0.21.2...v0.22.0) ``` </details> <details> <summary>What changed in the templates</summary> - The narrative overview paragraph and the `**Why upgrade:**` block are gone — the latter restated `What's New` verbatim. - `What's New` entries are bullets, not `###` prose blocks. - Tone guidance is no longer restated in the skill; it points at CLAUDE.md § How You Communicate. - The skill's embedded example now shows the old prose block as **bad** and the bullet form as **good**. - Emoji removed from the CI prompt (it asked for 🚀 / 🎯 / 🐛 headings against the skill's own no-emoji rule). - Both generators now emit the same sections in the same order, so the file's shape no longer depends on which one ran. - The cap excludes `Bug Fixes` / `Known Issues` / `Contributors` / `Full Changelog`. Those are reference lists sized by how many fixes shipped — capping them would hide work. This was caught by regenerating v0.22.0, which overflowed a whole-file cap purely on its 14 bug-fix bullets. **Follow-up, not in this PR:** the cap lives in prompt text, so it is advisory. Making it a hard check in `util/validate_release_notes.py` would enforce it in CI. </details> ## Test plan - [ ] `python util/validate_release_notes.py <regenerated sample> --tag v0.23.0` exits 0 — passes unmodified, no validator changes in this PR - [ ] `awk '/^## (Bug Fixes|Known Issues|Contributors|Full Changelog)/{exit} {print}' <file> | wc -w` is under 350 (patch) / 600 (minor-major) - [ ] `.github/workflows/claude.yml` parses as valid YAML and its release-notes prompt contains no emoji - [ ] `.claude/skills/gaia-release/SKILL.md` is under 500 lines (498) - [ ] Both generators list the same sections in the same order
Why this matters
Before this PR the Agent UI's email surface was split and the heavy email agent ran inside the UI process: the
/v1/email/*REST routes were served by an in-process mount of the email wheel by default (only by the sidecar whenGAIA_EMAIL_AGENT_MODEwas set), and the in-app email chat agent (agent_type=email) loaded live Gmail/Outlook backends, an action DB, and a memory store into the UI backend. After this PR the out-of-process sidecar is the sole, default backend for both surfaces. The core UI backend no longer imports the email wheel — it stays lightweight, crash-isolated, and dogfoods the exact schema-2.1 product third-party integrators consume.This is the deferred cutover from epic #1767, on the foundations from #1884 and the now-complete REST 2.1 contract from #1883 (design: #1882).
What changed (three threads a reviewer should evaluate independently)
EmailSidecarProxynow forwards the full schema-2.1 surface (prescan, search, archive/unarchive, quarantine/unquarantine, confirm, batch triage, calendar view/preview/create/respond) returning the sidecar's envelopes unchanged. The UI router exposes the full contract, so removing the in-process mount does not shrink the external/v1/emailsurface./v1/emailsurface. The in-processgaia_agent_email.api_routesmount is removed from the UI server; unsetGAIA_EMAIL_AGENT_MODEnow defaults to user mode (frozen binary, lazy-fetched + SHA-verified). No in-process fallback — a missing/unpublished binary fails loudly with a remedy. (The separategaia api/openai_servermount is intentionally out of scope.)agent_type=emailflipped to the sidecar. NewEmailProxyAgentkeeps the local-LLM tool loop in the UI backend, but every tool is a thin HTTP call to the sidecar.pre_scan_inboxreturns the identicalemail_pre_scanenvelope so the triage card renders unchanged. Its tool surface is the subset the REST contract serves today (inbox pre-scan, search, calendar view, archive + undo); the unmapped in-process tools (labels/stars/move/trash/delete/summarize/profile/preferences/forward/send) are not exposed in chat until their REST routes land — the agent product still implements them, they're just not reachable over the contract yet.Test plan
python -m pytest tests/unit/test_email_sidecar_*.py— 91 pass (proxy, router, server-wiring, manager, fetch, platform, devmode-app, new proxy-agent).python util/lint.py --black --isort --flake8— all pass.pytest tests/unit/test_session_mail_provider.py tests/unit/test_agents_split.py tests/unit/test_chat_preflight.py tests/unit/chat/ui/test_server.py— 141 pass.pre_scan_inboxoutput, fed through the realSSEOutputHandler, injects anemail_pre_scanrender payload (testtest_pre_scan_envelope_triggers_real_sse_card_injection).apiVersion=2.1 agentVersion=0.3.0), drove the proxy agent's realpre_scan_inbox/search_messagestools against live/prescanand/search; with no mailbox connected they fail loudly with the sidecar's verbatim "No mailbox connected…" detail (full chain: proxy agent → shared manager → sidecar → REST → fail-loud passthrough). Clean tree-kill on shutdown.create_app()withGAIA_EMAIL_AGENT_MODEunset → manager modeuser, full contract routes mounted, no in-process mount.To exercise locally with a connected Gmail:
uv pip install -e hub/agents/python/email GAIA_EMAIL_AGENT_MODE=dev gaia chat --ui # email session → "what's in my inbox" → pre-scan card via the sidecarNotes for the reviewer
gaia eval agentrun — the change touches neither the in-core ChatAgent prompts nor the wheel'sEmailTriageAgent; the eval harness targets the wheel agent (unchanged), and there is no eval path for the newEmailProxyAgent. Its behavior is covered by the integration + live tests above.emailid to resolve, so a no-wheel install can use the REST surface but not the chat agent. Decoupling that (registering proxy-agent metadata without the wheel) is a separate change.