Repository navigation
feat(llm): switch default embedder nomic → EmbeddingGemma 300M - #1952
Conversation
The current llama.cpp server can't load nomic-embed-text-v2-moe, which broke RAG, code-index, and agent-memory embedding on any up-to-date Lemonade build. Default to EmbeddingGemma 300M instead. Lemonade ships no built-in EmbeddingGemma, so it's registered as the custom user-model user.embeddinggemma-300m-GGUF (checkpoint ggml-org/embeddinggemma-300M-GGUF:Q8_0, recipe llamacpp) with the embedding=true pull flag — which sets the embeddings label explicitly and avoids the #1745 auto-label bug. It's 768-dim, same as nomic, so FAISS index shapes and EMBEDDING_DIM stay unchanged. Memory vectors are model-specific and the dim check can't catch a model swap (both 768-dim), so memory now records the embedder name and clears+re-embeds stale vectors when it changes. RAG/code-index caches already self-invalidate on embedding_model change.
|
Verdict: Approve — safe to merge as-is; the notes below are optional polish, not blockers. This swaps GAIA's default embedder from The bottom line reviewers should know: this only registers the pull shape — the live Lemonade contract (fresh cold-pull on a real box) still needs the boundary test the author left unchecked in the test plan. Nothing in the diff can prove that end-to-end, which is exactly the right call to flag. No security concerns. 🔍 Technical details🟢 Minor / nits1. 2. Procedures embeddings are cleared but not re-backfilled on the migration run (src/gaia/agents/base/memory.py:445) 3. EMR disk-space note (docs/guides/emr.mdx) — the per-model row dropped from 522 MB → ~334 MB but the "at least 25 GB free" guidance is unchanged. Fine (headroom), just noting the two lines were reviewed together. Strengths
|
Validated against a live Lemonade Server (10.9.0): EmbeddingGemma is a custom user-model, so /v1/pull registers it as user.embeddinggemma-300m-GGUF but /v1/models lists it under the stripped id embeddinggemma-300m-GGUF (/load and /embeddings accept either form). The availability check in ensure_model_downloaded compared raw strings, so it never matched the registered model and re-pulled on every call — an observed hang. Add a user.-prefix-tolerant name matcher and use it in the availability, download-wait, and loaded-model checks. Runtime validation now passes: ensure_model_downloaded returns immediately, gaia init resolves the embedder, and a full RAG index→retrieve→answer round-trip works. Also refines the embedder docs (agent-ui/code-index/rag) to match actual cache-invalidation behavior.
Generalize the embedder hardware test to validate EmbeddingGemma 300M on both backends GAIA uses: the GGUF/llamacpp variant (user.embeddinggemma-300m-GGUF, the non-NPU default replacing nomic, #1952) and the FLM/NPU variant (embed-gemma-300m-FLM, #1744). The vector-level checks — 768-dim, finite, non-zero, deterministic, distinct-texts-differ — are shared and parametrized across both backends; the chat+embedder co-residency check stays FLM-specific. Each backend gates on the live Lemonade catalog and skips when absent, so the GGUF variant runs on GPU/Vulkan boxes and the stx CI runner while FLM runs on Ryzen AI NPU runners — neither produces a false failure where its model isn't present. Verified locally: GGUF variant passes against a real EmbeddingGemma GGUF model (4 passed), FLM variant skips cleanly with no server error.
|
🟡
🔍 Technical details
health = self._llm_client.health_check()
running = [m.get("id", "") for m in health.get("all_models_loaded", [])]
if self.config.embedding_model not in running: # ← raw string compare
self._llm_client.load_model(
self.config.embedding_model,
llamacpp_args="--ubatch-size 2048 --split-mode none",
)Fix — swap the membership test for from gaia.llm.lemonade_client import _model_ids_match
if not any(_model_ids_match(rid, self.config.embedding_model) for rid in running):
self._llm_client.load_model(...)Secondary: |
|
🟡 The 🔍 Technical details
if not self.llm_client.ensure_model_downloaded(
self.config.embedding_model,
checkpoint=mr.checkpoint,
recipe=mr.recipe,
embedding=mr.embedding,
):
raise RuntimeError(
f"Failed to register/download embedding model ..."
)
if mr and self.config.embedding_model.startswith("user."):
self._llm_client.ensure_model_downloaded( # ← return value ignored
self.config.embedding_model,
checkpoint=mr.checkpoint,
recipe=mr.recipe,
embedding=mr.embedding,
)Fix: mirror the RAG pattern — check the bool return and raise a |
…ingGemma Two fixes for the embedder switch: 1. _download_models passed checkpoint/recipe/embedding=None to ensure_model_downloaded for EVERY model, including built-ins — which broke test_npu_profile_pulls_builtin_model_without_recipe and risked Lemonade treating a built-in pull as a custom registration (#1655). Only user.-namespaced models now carry those kwargs; built-ins are pulled by name. 2. EmbeddingGemma is validated on Lemonade v10.9.0; older bundled llama.cpp builds fail to load it. Bump LEMONADE_VERSION to 10.9.0 and floor the chat/rag/all init profiles at 10.9.0 so init fails loudly instead of the embedder failing at first RAG index. reset-lemonade.ps1 fallback bumped to match.
|
🟡 The The health endpoint returns the model's stripped id ( 🔍 Technical details
running = [m.get("id", "") for m in health.get("all_models_loaded", [])]
if self.config.embedding_model not in running: # <-- plain `in`, no prefix strip
self._llm_client.load_model(...)The from gaia.llm.lemonade_client import _model_ids_match
...
if not any(_model_ids_match(r, self.config.embedding_model) for r in running):
self._llm_client.load_model(...) |
The LEMONADE_VERSION bump to 10.9.0 left hardcoded 10.8.1 references in docs/cpp/setup.mdx, docs/guides/npu.mdx, and cpp/README.md, which util/check_doc_versions.py flags as mismatches (fails the validate + code-quality jobs). Sync them to 10.9.0.
…mbedder # Conflicts: # src/gaia/agents/base/memory.py # src/gaia/agents/base/memory_store.py
|
🔴
DEFAULT_EMBEDDING_MODEL = "nomic-embed-text-v2-moe-GGUF"The
🔍 Technical detailsRoot cause: Files to fix:
# before
DEFAULT_EMBEDDING_MODEL = "nomic-embed-text-v2-moe-GGUF"
# after
from gaia.llm.lemonade_client import DEFAULT_EMBEDDING_MODEL # "user.embeddinggemma-300m-GGUF"
# before
assert get_embedding_model_for_device(device) == "nomic-embed-text-v2-moe-GGUF"
# after (import EMBEDDING_MODEL from registry or lemonade_client)
assert get_embedding_model_for_device(device) == "user.embeddinggemma-300m-GGUF" |
…mbedder # Conflicts: # .github/workflows/test_embeddings.yml # .github/workflows/test_rag.yml
#1761 shipped the NPU FLM hardware test as tests/test_gemma_embedder_hw.py but its workflow (test_npu_embedder.yml) and the file's own docstring both reference tests/test_npu_flm_embedder_hw.py — so the job failed with 'file or directory not found'. Rename the file to the intended name.
|
🟡 🔍 Technical details
if mr and self.config.embedding_model.startswith("user."):
self._llm_client.ensure_model_downloaded( # return value discarded
self.config.embedding_model,
checkpoint=mr.checkpoint,
recipe=mr.recipe,
embedding=mr.embedding,
)Compare to if mr and self.config.embedding_model.startswith("user."):
if not self.llm_client.ensure_model_downloaded(...):
raise RuntimeError(
f"Failed to register/download embedding model ..."
)Fix: mirror the |
Two failures introduced on main by the #1748 (embedding cache) × #1761 (per-instance embedder) interaction and #1371 (schedule), which this branch inherits via the merge: 1. MemoryMixin._embed_text/_get_embedder referenced self._embedding_model directly, which is only set in init_memory — so the embedding-cache unit tests (bare mixin) failed with AttributeError, and the cache key used the module default while the embed call used the instance model (mismatched for the NPU FLM embedder). Resolve the active model/dim via helpers that fall back to the module default, and key the cache by the same resolved model. 2. schedule/daemon.py reimported datetime inside next_fire_time (W0404) — already imported module-level. Removed.
|
🟡 The 🔍 Technical details
if not self.llm_client.ensure_model_downloaded(
self.config.embedding_model,
checkpoint=mr.checkpoint,
recipe=mr.recipe,
embedding=mr.embedding,
):
raise RuntimeError(
f"Failed to register/download embedding model ..."
)
if mr and self.config.embedding_model.startswith("user."):
self._llm_client.ensure_model_downloaded( # ← return value dropped
self.config.embedding_model,
checkpoint=mr.checkpoint,
recipe=mr.recipe,
embedding=mr.embedding,
)Fix: mirror |
Root cause of the "Server failed to start" infra failures in the api, embeddings, and rag workflows: they launched `lemonade-server serve` inside a Start-Job, but the `lemonade-server` shim was removed in Lemonade v10.5 — on 10.9.0 it no longer exists, so the command failed instantly, the 60s health poll timed out, and the finally block discarded the server output (zero diagnostics). Fix: route all three through the shared start-lemonade.ps1 launcher (already used by the 5 healthy Lemonade workflows), which launches LemonadeServer.exe with a bare --port, captures stdout/stderr to log files, waits for health, and dumps those logs on failure. Restructure each into start → test → always-cleanup steps so the detached server's LEMONADE_PROCESS_ID (exported via GITHUB_ENV) is visible to the test and teardown steps, and surface the server logs whenever model setup/verify fails. Adds a -NoModel switch to start-lemonade.ps1 (start server only) so callers that register a custom user-model themselves (the EmbeddingGemma embedder via LemonadeClient) can reuse the robust launcher, and dumps server logs on a startup timeout.
|
🟡 🔍 Technical details
if mr and self.config.embedding_model.startswith("user."):
self._llm_client.ensure_model_downloaded( # return value discarded
self.config.embedding_model,
checkpoint=mr.checkpoint,
recipe=mr.recipe,
embedding=mr.embedding,
)When that returns if mr and self.config.embedding_model.startswith("user."):
if not self._llm_client.ensure_model_downloaded(
self.config.embedding_model,
checkpoint=mr.checkpoint,
recipe=mr.recipe,
embedding=mr.embedding,
):
raise RuntimeError(
f"Failed to register/download embedding model "
f"{self.config.embedding_model!r}. Ensure Lemonade Server "
f"is running, then retry (or run `gaia init --profile rag`)."
) |
…run)
Follow-up to the launcher fix. The multi-step split (start server in one
step, test in the next) failed because GitHub Actions reaps a step's child
processes at step end — the detached LemonadeServer.exe was gone by the test
step ("connection refused" on :13305). The healthy workflows (examples, npu)
run start-lemonade.ps1 + tests in a SINGLE step for exactly this reason.
Collapse the api/embeddings/rag jobs back to one step each: start-lemonade.ps1
(-NoModel) then register/verify + pytest in the same shell, with a finally
that stops the server. start-lemonade.ps1 now also sets $env:LEMONADE_PROCESS_ID
on the live process env (not just GITHUB_ENV, which only reaches later steps)
so same-step cleanup works.
The prior push already proved the launcher itself works: CI logs showed
"✅ LEMONADE SERVER READY" in ~2s where the old `lemonade-server serve` shim
timed out.
|
🔴 🟡 Same function also silently drops a 🔍 Technical details🔴 running = [m.get("id", "") for m in health.get("all_models_loaded", [])]
if self.config.embedding_model not in running:
from gaia.llm.lemonade_client import MODELS, LemonadeClient, _model_ids_match
...
if not any(_model_ids_match(r, self.config.embedding_model) for r in running):🟡 Silent failure on download — if mr and self.config.embedding_model.startswith("user."):
self._llm_client.ensure_model_downloaded(...) # return value discarded
|
The RAG job reached the embeddings round-trip (server up, models pulled, embedder registered+loaded) but failed with a raw KeyError: 'data' — a freshly loaded embedder can briefly return a non-standard body. Retry the embeddings call up to 5x and, on persistent failure, print the actual response instead of a KeyError so the fault is diagnosable.
|
🟡 The "is it already running?" check in the code-index embedder init breaks with the new 🔍 Technical details
running = [m.get("id", "") for m in health.get("all_models_loaded", [])]
if self.config.embedding_model not in running:
self._llm_client.load_model(
self.config.embedding_model,
llamacpp_args="--ubatch-size 2048 --split-mode none",
)With The fix — import and apply from gaia.llm.lemonade_client import MODELS, LemonadeClient, _model_ids_match
...
if not any(_model_ids_match(m, self.config.embedding_model) for m in running):
self._llm_client.load_model(...)Note: |
… sticks Root cause of the RAG/embeddings 501 'This server does not support embeddings. Start it with --embeddings': a shared runner had embeddinggemma-300m-GGUF already registered WITHOUT the embeddings label (stale registration from a prior job / #1745 auto-label bug), so ensure_model_downloaded short-circuited on 'already downloaded' and never applied the label — llama-server then loaded the model without --embeddings. For custom embedding models, delete any existing registration first so the subsequent pull re-registers with embedding=True and the label is guaranteed. Verified locally: delete + re-register + /v1/embeddings returns dim=768.
…aps (#1892) Rebase onto main pulled in #1952's tolerant model-id matching (_model_ids_match, stripping the user. prefix) alongside this branch's exact-pin machinery, which still compared ids with strict equality in three places -- _find_loaded_entry, the eval benchmark's ctx readback probe, and (implicitly) anything built on either. Switch all three to _model_ids_match so a user.-prefixed model id is still recognized as loaded. Also fixes a settle-race in _wait_model_state: get_status() swallows probe exceptions into running=False/loaded_models=[], which the present=False (post-unload) direction was reading as "confirmed absent" -- letting a pinned reload proceed to /load while the server could still be mid-teardown. A failed probe is now treated as unknown and polled again, not as absence. Restructures the benchmark's per-experiment error path so close_db() runs after an ERRORED row too, not only on success, tolerating stub agents used in tests that have no close_db. Ports teardown hygiene (GAIA_MEMORY_DISABLED, close_db) from the duplicate ctx-size wiring test being deleted in this same change into its surviving counterpart, and removes the two test files that were strict subsets of files already covering the same contract.
…#1892) An integrator (or the eval harness) previously had no REST way to see what context window the triage model is actually loaded at -- the readiness probe reported presence only, so a model silently loaded at the wrong window looked identical to a correctly pinned one. InitModelStatus gains ctx_size: the /health probe now also parses the raw all_models_loaded[] list (entries carry model_name/checkpoint -- no id key at that layer) and, when the resolved triage model is currently loaded, reports its recipe_options.ctx_size. Matching tolerates the user. prefix via _model_ids_match (the third of the three lookup sites #1952 made tolerant). Null whenever the model is not loaded or the server does not report a ctx -- the value is always the server's word, never a config echo. Mirrors updated together per the doc-bundle rule: openapi.email.json (regenerated via export_openapi), CONTRACT.md, specification.html (InitModelStatus field table), and the npm types.ts InitModelStatus interface (tsc --noEmit clean).
Cuts the **v0.22.0** minor release on top of v0.21.2 — 198 commits, 62 of them `feat`, built around the email agent. It grows past triage: it now keeps track of the mail you're waiting on and the things you said you'd do, can send and snooze on a schedule, drafts replies that sound like you (derived style only — never your Sent content), and handles attachments. In the Agent UI, email moved out of the main process — you install it from the Agent Hub and it runs as its own isolated sidecar. Away from email: **`gaia schedule`** brings cron dispatch to the CLI (no UI in the loop), agents start **distilling procedures from work they repeat**, RAG **reads Word documents**, and `gaia config set default_model` ends re-typing `--model`. The **default embedder** changes to EmbeddingGemma 300M — quieter than it sounds, because the old default can't be loaded by current llama.cpp builds at all, which silently broke document indexing, code search, and memory. **Two breaking changes** are called out up front: triage's `draft.body` is gone (it was always `""`; it's a `DraftScaffold` now), and RoutingAgent / DocumentQAAgent moved to standalone wheels with no deprecation shim. The email agent is marked **beta** throughout, and the notes carry a short **Known issues** section naming two open bugs found while validating this release (amd#2124, amd#2127) rather than leaving users to discover them. ## Evidence Claims in the notes were verified against `origin/main` @ `5265b96a` (a pristine detached checkout, not a dirty tree), on macOS + Ubuntu 24.04 + Windows 11, all running the pinned **Lemonade 10.10.0**. <details> <summary>What was exercised, and what it showed</summary> | Claim | Evidence | |---|---| | Triage returns a scaffold, no `draft.body` | Live `POST /v1/email/triage` → HTTP 200, `draft` = `['subject','to']`, `schema_version 2.4`. Confirmed on Ubuntu + macOS, and in the published `openapi.email.json` | | `.docx` indexing (tables, nested tables, content controls, hyperlinks, textboxes) | All 6 planted facts extracted verbatim (`Zephyr`, `APAC 8610`, `violet-otter-92`, `quartz-badger-40`, `cobalt-lynx-77`, `desk 17C`); legacy `.doc` rejected loudly | | `gaia schedule` cron + sinks | `~/.gaia/schedules.toml` written; sinks `stdout \| file:<path> \| notification \| telegram`; verified on macOS + Ubuntu | | `gaia config set default_model` | Persists + reads back; corrupt config fails loudly naming the file | | Email runs as its own process in the Agent UI | Typed a message in a real Agent UI email chat → sidecar spawned: `email-agent --host 127.0.0.1 --port 59026`, health-checked, `apiVersion=2.3`; `GAIA_EMAIL_AGENT_MODE` unset, `gaia_agent_email` not pip-installed | | Binary is integrity-checked | Fresh Hub install (uninstall → install from the panel); recorded `artifact_sha256` matches the on-disk binary exactly; log: `using hub-installed verified binary` | | Lemonade 10.10.0 note: re-run `systemctl --user enable lemond` | Verified live — after the 10.7.0→10.10.0 upgrade on Ubuntu, `systemctl --user is-enabled lemond` returned `disabled` | Claims that could **not** be measured were rewritten rather than asserted: no performance number is quoted for the embedder work (none of amd#1952/amd#1761/amd#1748 has a measured before/after), and the NPU entry describes the mechanism instead of claiming the load/unload loop is fixed (amd#1676 is still open). Two spam metrics from a PR body (0.807 recall / 0.677 precision) contradicted the committed baseline (`tests/fixtures/email/baseline_accuracy.json`: 0.7719 / 0.6567) and were dropped along with the whole spam claim — see amd#2124. </details> ## Release checklist - [x] `util/validate_release_notes.py docs/releases/v0.22.0.mdx --tag v0.22.0` passes - [x] `src/gaia/version.py` → `0.22.0` - [x] `src/gaia/apps/webui/package.json` → `0.22.0` - [x] `src/gaia/apps/webui/package-lock.json` → `0.22.0` - [x] Navbar label in `docs/docs.json` → `v0.22.0 · Lemonade 10.10.0` (was drifted at `10.7.0`) - [x] All 198 commits in range (`v0.21.2..HEAD`) represented in the notes - [x] Community contributors credited (@alexey-tyurin, @TravisHaa, @Rohithmatham12, @Osamaali313, @eeee2345, @somo9909) - [ ] Review from @kovtcharov-amd addressed
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
…emory (amd#4489) Stale `nomic-embed-text` references outlived the switch to EmbeddingGemma (amd#1952), and nomic crashes llama.cpp on Vulkan (amd#1831). This removes them everywhere except where there's a reason to keep them (listed below), and closes a gap where memory from before July 2026 kept its nomic vectors and mixed them with EmbeddingGemma queries, quietly degrading recall. - **Legacy memory is now re-embedded.** Memory written before the embedder was stamped holds nomic vectors with no marker, and startup kept them. A missing marker now counts as an embedder change: vectors are cleared with a logged warning and backfill re-embeds them. The dashboard's rebuild button goes through the same path. - **One live test was always skipping.** The code-index eviction test loaded nomic as the competing embedder, which current Lemonade can't do. It now evicts by unloading, so it actually runs. - **Pairs with amd#4459**, which fixes the agent-registry default (the fresh-install bug itself). The registry, the chat/email agent comments and the registry tests are left to that PR to avoid conflicts. Once both merge, the only nomic references left are the ones below. **Kept on purpose:** - `docs/releases/*`: release notes record what shipped. - Migration notes in the memory SDK doc, memory spec and code-index guide, plus the tests that seed a nomic-stamped store: they describe and pin the upgrade path for existing users. - `eval/results/phase2/scorecard.json` and `eval/scenarios/memory/memory_journaling_report.py`: captured outputs of past runs. Editing them would misstate what ran. - `docs/plans/gaia-agent-latency.md` (captured `lemonade` output) and `docs/plans/tool-loader.mdx` ("τ was calibrated against live nomic embeddings"): they record past measurements. The second is also a real caveat, because τ hasn't been re-checked against EmbeddingGemma. RAG and code-index needed no migration. The RAG disk cache stores only text and chunks, and a code index built with nomic already fails loudly with a model-mismatch error. Retrieval for fresh installs is unchanged (same default embedder), so no `rag_quality` eval was run. ## Test plan - [x] `pytest` on the memory, memory-router, embedder, RAG-cache, broker, stdio and email-wiring suites: 1422 passed. The one failure (`test_memory_discovery` Outlook registry) fails identically on `origin/main` on this machine. - [x] `python util/lint.py --all`: black, isort, flake8 and bandit pass. The two pylint errors (`os.getuid`, `signal.SIGKILL`) are Windows-only and pre-existing. - [ ] `build_cpp.yml` CI: the C++ vector-index tests only swap a string literal, and there is no C++ toolchain on the machine this was written on. - [ ] Upgrade path: start the agent against a `memory.db` from before July 2026 (no `embedder_id` in `meta`). Expect one `embedder changed (unrecorded, pre-2026-07 memory -> user.embeddinggemma-300m-GGUF)` warning and full embedding coverage afterwards. Co-authored-by: Claude Opus 5.5 <[email protected]>
Why this matters
The current llama.cpp server can't load
nomic-embed-text-v2-moe— GAIA's default embedder — so on any up-to-date Lemonade build, RAG, code-index, and agent-memory embedding silently break (the model fails to load; retrieval and memory stop working). This switches the default to EmbeddingGemma 300M, which loads cleanly on current llama.cpp. It's 768-dim (same as nomic), so index shapes and retrieval behavior are unchanged; existing indexes/caches re-embed automatically on next run.EmbeddingGemma is a Lemonade custom user-model:
/v1/pullregisters it asuser.embeddinggemma-300m-GGUF(checkpointggml-org/embeddinggemma-300M-GGUF:Q8_0,recipe=llamacpp,embedding=true— the flag sets theembeddingslabel explicitly, sidestepping the #1745 auto-label bug). Note that Lemonade then lists it under the stripped idembeddinggemma-300m-GGUFwhile/loadand/embeddingsaccept either form — so the availability check isuser.-prefix-tolerant to avoid a re-pull loop.Live validation (Lemonade Server 10.9.0)
ensure_model_downloaded("user.embeddinggemma-300m-GGUF")resolves the registered model instantly (no re-pull hang)gaia init --profile chatdownload path resolves both models cleanly/embeddingsreturns 768-dim vectors under theuser.-prefixed nametest_lemonade_client,test_memory_store,test_code_index,test_tool_call_priority,test_llamacpp_backend,test_rag), incl. new pull-shape + namespace-matcher tests;black/isortcleanStill to verify (couldn't run in this env)
/pullregister-from-scratch wasn't exercised end-to-end.anthropicSDK (not installed) and a realANTHROPIC_API_KEY(currently a dummy value); rungaia eval agent --category rag_quality --agent-type docand--comparetotests/fixtures/eval_baselines/gemma-4-e4b-d71cd914/scorecard_rag_quality.jsonin an env with judge access.