Repository navigation
feat(memory): surface memories relevant to each request, with their age - #4061
Conversation
The stable memory prompt picks facts by confidence alone at session start, and everything else needed an explicit recall call, which models almost never make (4 in 2,121 benchmark tasks). Relevant lessons sat unused in the store. - Each turn, the few stored memories most relevant to the request (top 3, cosine floor 0.5, same context or global, not sensitive, credentials masked, not already in the stable prompt) are added to the per-turn dynamic context. That context is prepended to the user message, so the cached system prompt is unchanged. Surfacing does not bump confidence or use counts. - Every memory the model sees without calling recall now shows the absolute dates it was learned and last confirmed, so a months-old lesson is visibly months old.
Same rule as the stable prompt: a 'global' session is unscoped, so a relevant memory filed under 'work' or 'personal' is surfaced; an agent that set its own context still sees only that context and global.
Request changesThis makes stored memories actually reach the model: each turn now prepends the three most relevant memories to the user message, and every surfaced memory carries the dates it was learned and last confirmed. The design choices are good — vector-only search with an absolute floor (so nothing unrelated sneaks in), no confidence bump for passive surfacing, credentials masked, and the cached system prompt left byte-identical. Two things should be settled before merge. Dates can silently push existing memories out of the system prompt. The memory block is hard-capped and cut from the end, and the new age suffix adds roughly 45 characters to every preference, fact, skill and error line. A user whose memory is already near that cap loses the tail of the block — the "known errors to avoid" section goes first. It gets worse from there: the bookkeeping that stops a memory from appearing twice records every item the block tried to show, including the ones truncation just removed, so those memories are now missing from the system prompt and suppressed from per-turn recall. The fix is either to raise the cap to cover the extra characters or to only suppress what actually survived truncation. The eval is the one test that can tell you whether this works, and it hasn't run. Your own test plan leaves it unchecked, and the project requires it for any change to prompt content — this change alters both the system prompt and every user message. It matters more than usual here: as the PR notes, the 0.5 similarity floor was calibrated on memory-to-memory pairs, and question-to-memory similarity runs systematically lower. If that gap is large, the feature is a no-op in production and every unit test still passes, because the tests supply their own vectors. Please run it against the memory categories and post the comparison. Real-world evidenceN/A — no evidence bundle was produced for this PR. The verdict rests on static review plus the new unit tests; nothing here exercised the feature against a real embedder, which is exactly the gap the eval above would close. 🔍 Technical details🟡 Age suffixes interact with the 4000-char cap, and truncated items are also hidden from turn recall (
|
|
🟡 The two flagged issues from the first review are still open. The
🔍 Technical details
Minimal fix: move the The eval concern: |
|
Merged current 🔍 Technical detailsMerge commit Tests: |
The stable memory prompt is hard-capped at 4000 chars and cut from the end, so a large store loses the tail of the block -- the known-errors section first. The suppression set that stops a memory being shown twice was built from every candidate item, including the ones the cap had just removed, so those memories were missing from the system prompt and blocked from per-turn recall at the same time. The set is now derived from the lines that survive truncation, so anything the cap cuts can still be surfaced when it is relevant to the request.
|
Fixed the truncation bug the last two reviews flagged. A memory the 4000-char cap cut was missing from the system prompt and blocked from per-turn recall, so it went invisible on both paths — worse than before this PR added the dates. The suppression set is now built from the lines that actually survive the cap, so anything cut can still surface when it is relevant to the request. The eval is still not run — that box stays open, and it is the one thing left before merge. 🔍 Technical details
Two regression tests in
The fixture generates per-item vocabulary on purpose: Tests: Unaddressed from the earlier review, all 🟢 and left deliberately: the per-turn warning repeating each turn, the up-to-12 single-row |
Resolved conflict in src/gaia/agents/base/memory.py: process_query needed both the new _turn_tool_record init (main) and _memory_turn_query capture (this PR) - independent per-turn state, kept both.
|
Merge conflict resolved and everything else checks out, but the required eval still hasn't run — this stays blocked on that one step, not on the code.
🔍 Technical details
Next step: someone needs to run |
|
Folded into #4406, which combines this with the other three memory PRs so they can be tested as one change. This one is fully contained there — GitHub refuses to repoint the base at the combined branch precisely because there are no commits left between them. Closing this once #4406 merges; nothing here is dropped. 🔍 Why it was combined rather than merged on its ownAll four memory PRs edit the same |
A memory the model filed under "work" or "personal" was saved and never shown again. The `remember` tool offered a `context` label, and `gaia memory bootstrap` writes "work" rows. But a default session reads only "global" rows, and nothing in GAIA switches to another context. In a learning benchmark the user stated two standing rules, and the model saved them with `context='work'`. Sessions 2–4 ran on the same store, never saw the rules, and all three failed to follow them. A default session now shows memories from every context, and that also fixes rows already on disk. An agent that picked its own context, such as email, keeps it plus "global". The model can no longer choose a label: `remember` and `update_memory` store under the agent's active context. I dropped the parameter rather than validating it. Validation would mean either rejecting the call, which wastes a turn, or quietly relabelling it, which is a silent substitution. The model can't know the agent's scoping anyway. <details> <summary>🔍 Technical details</summary> - The same "global means unscoped" rule applies to the reminder list in the per-turn context and to extraction's duplicate search. `recall` already searches every context unless the model filters. - Sensitive rows stay out as before. - A model that still passes `context=` gets the loop's structured "unexpected argument" error and can retry without it. - Docs updated: the memory guide's context section, which showed the model storing into "personal" by chat, and the SDK page's filter description and tool card. Also updated the bootstrap docstring that described the old global-only read. - The per-request retrieval in amd#4061 gets the same rule in a follow-up commit on that branch. </details> ## Test plan - [x] `pytest tests/unit/test_memory_context_visibility.py`: 6 new tests on a real on-disk store. A "work" preference saved in one session is in the next session's system prompt, and a "personal" reminder reaches the next turn (both fail on main). Sensitive rows stay out. Email scoping holds. `remember` stores under the active context, and neither tool accepts `context` - [x] `pytest tests/unit -k "memory or bootstrap"`: 1108 passed. Two existing tests updated because they encoded the old global-only read and the model-chosen label - [x] `python util/lint.py --black --isort` on changed files - [ ] `gaia eval agent` on the memory categories vs the committed baseline (memory tool schema changed) --------- Co-authored-by: Kalin Ovtcharov <[email protected]> Co-authored-by: Ovtcharov <[email protected]> Co-authored-by: Kalin Ovtcharov <[email protected]>
#4066 scopes lessons to workspace:<root> so another project never sees them, and renders them behind an anti-injection framing because their content is raw tool output. #4061's per-turn recall reads every context in a default global session and files lessons under 'note', so a lesson from project A could surface in project B — as a bare note, without that framing, and potentially twice in one prompt. Recall now skips the lesson domain outright; lessons keep their own path. Docs that contradicted each other on the same page set are reconciled, and the spec's dynamic-suffix section now lists the two sections these PRs added to it.
…amd#4066) **Stacked on amd#4058.** The first four commits are that PR. Review the last two here. The agent rediscovered the same project quirk every session. When a call failed and the agent worked around it (say `pytest` fails with "test clock not configured", it reads the doc, reruns with `env TOYBOX_CLOCK=frozen` and it passes), memory stored the error and then deleted it on the success. Nothing recorded what fixed it, so the next session started from scratch. Now that fail-then-fix sequence in one turn becomes a lesson, built only from the two calls: the failing call and its error, the call that worked, and what changed ("added `env TOYBOX_CLOCK=frozen`"). It belongs to the workspace it happened in, and the next session there sees it in its memory prompt with the date learned. It gains confidence each session the fix works again and is dropped when the fix itself fails. Other folders never see it. <details> <summary>🔍 Technical details</summary> - The pairing key is amd#4058's operation key: the tool plus the program it runs (past `env`, `VAR=value` and `python -m`) or the path. The failing and working calls must have different arguments, so a plain retry that happens to pass teaches nothing. Refusals (`executed: False`) never count, either as the failure or as a failed fix. There's no matching on error wording. - Scope: stored as `category="note"`, `domain="lesson"`, in the memory context `workspace:<most specific allowed path>`. That context keeps lessons out of every other workspace's prompt and retrieval, including amd#4061's per-request recall. So lessons are shown in their own stable-prompt section (top 3 by confidence), not through relevance search, which would also hide them whenever the request is worded differently from the lesson. - Within a session, later turns get the new lessons in the per-turn context, since the stable prompt is frozen. Within a turn there was a real loss path: overflow recovery stubs every tool result except the latest, which drops the failure a fix answered. The recovery now restates this turn's lessons on the last user message. The cache is already lost at that moment, so this costs nothing extra. - A lesson whose text looks like a credential isn't stored. </details> ## Test plan - [x] `pytest tests/unit/test_memory_heal_lessons.py`: 14 tests on a real on-disk store, over several sessions sharing one DB. All 7 positive tests fail on the pre-change source. Covers the exact lesson text and row shape, no lesson for a same-call retry / a refused failure / a different program / a failure and fix in different turns, a path tool's changed argument, the next session's prompt in the same workspace but not another, the rest of the session, confirm once per session (0.5 → 0.6), drop when the fix fails, keep when the fix is refused, and overflow recovery keeping the lesson (idempotent) - [x] `pytest tests/unit -k "memory or overflow or shrink"`: 1155 passed. The 1 failure, `test_tool_loader_token_budget`, also fails on main - [x] black + isort on changed files - [ ] `gaia eval agent` on the memory categories vs the committed baseline (memory prompt content changed) --------- Co-authored-by: Kalin Ovtcharov <[email protected]> Co-authored-by: Ovtcharov <[email protected]> Co-authored-by: Kalin Ovtcharov <[email protected]>
# Conflicts: # src/gaia/agents/base/memory.py
Three of the four consolidated PRs were merged to main directly while this branch was under test, so most conflicts here are the same work arriving twice. Took main's arrangement of the lesson constants and the session-lessons block, and kept this branch's two things main does not have: #4034's background extraction, and the lesson-scope fixes the hardware run found.
…n their workspace (amd#4406) Memory extraction used to run *before* the answer reached the screen, so every turn that stated a fact paid the model call twice over — once for the answer, once to decide what to remember. This moves extraction to a background worker: the answer lands, the turn returns, and the extraction follows. On a Ryzen AI machine that was measured at 19 seconds of the user's time given back on a single turn. It also carries four fixes found while testing this against the memory work that landed on main (amd#4061, amd#4062, amd#4066) — two of which only exist *because* those changes now run together. Closes amd#4034. The other three memory PRs merged to main directly; this branch has been merged with main and carries only what main lacks. ### What's fixed here that isn't on main - **A closed memory store could segfault the process.** `MemoryStore.close()` took no lock, so agent teardown freed the SQLite connection while the extraction thread was mid-statement. A segfault aborts the whole process, so this would have taken the Linux unit job down rather than failing four tests. `close()` now holds the connection lock and every DB method refuses a call that lost the race. - **A workspace lesson could reach another project.** amd#4066 scopes lessons to one workspace and frames them against injection because their content is raw tool output; amd#4061's per-turn recall reads every context in a default `global` session. A lesson from project A could surface in project B, unframed. **This one is live on main today.** - **The same leak, one call further in.** The background extraction job builds its "existing memory" list from the same unfiltered scope, so another workspace's lessons reached that prompt too. Observed on hardware, then fixed. - **An ordinary fact could be silenced forever.** The lesson filter keyed on `domain`, which the *extraction model* picks — so a turn that merely mentioned a lesson got its ordinary facts tagged `domain='lesson'` and suppressed from recall permanently. It now keys on `source`, which only the write path sets. ### Test plan - [x] `pytest tests/unit/test_memory_mixin.py tests/unit/test_memory_turn_recall.py tests/unit/test_memory_heal_lessons.py tests/unit/test_memory_context_visibility.py tests/unit/test_cli_memory_drain_on_exit.py tests/unit/test_memory_extraction_grounding.py` — **389 passed** - [x] `pytest tests/unit/` — 17,198 passed, 33 failed, **all 33 reproduce identically on main** (verified in a separate main worktree, not via `PYTHONPATH`, which cannot baseline in this repo) - [x] Real-world run on AMD Ryzen AI MAX+ 395 (Radeon 8060S, Vulkan, all three models on GPU) - [ ] `gaia eval agent` — not run; see note below ### Evidence Every fix has a test verified to fail without it — each was disabled in turn and the test watched go red. **Extraction is off the answer path.** Answer rendered at `13:20:15`; extraction finished at `13:20:34`. 19 seconds returned to the user on one turn. ``` 13:20:15 PERF process_query session=a1997a20 took=5.084s 13:20:15 [MemoryMixin] extraction started (context=global, waited 0.0s) 13:20:34 [MemoryMixin] extraction finished in 19.0s ``` **A lesson does not leave its workspace.** A real `tool_lesson` row in workspace A, then a turn from workspace B — absent from both the user-visible chat prompt and the extraction job's internal prompt. Before the fix it appeared in the latter; after, the "existing memory" list carries nine items and the lesson's id is not among them. **A fact the model mislabelled still surfaces.** A row with `domain=lesson` but `source=llm_extract` now reaches the turn: ``` Stored memories that may bear on this message: - [note] Tool call list_files on /tmp/gaia-scratch-… reported 0 total files. (learned 2026-09-28) ``` <details> <summary>🔍 Full evidence table and method</summary> Driven through the Agent UI in a real browser on `t-nx-strx-halo`, against a Lemonade already serving Gemma-4-E4B. Proof for prompt-content claims is the literal prompt sent to the model (llama-server `--log-prompts-dir`), not the answer text — an answer can be right for the wrong reason, and absence claims cannot be proven from an answer at all. | Claim | Verdict | Artifact | |---|---|---| | Answer renders before extraction finishes | CONFIRMED | `backend.log` timestamps above | | A memory outside the stable prompt still surfaces per-turn, with its age | CONFIRMED | One prompt dump showing both halves: the stable `Known facts` list (5 highest-confidence decoys) and the dynamic `Stored memories that may bear on this message:` block carrying the target fact | | A memory under a non-global context label is visible | CONFIRMED | Dashboard row with `CONTEXT=work-project` | | A same-operation fail→fix in one turn is stored as a workspace-scoped lesson | CONFIRMED | `knowledge` row, `domain=lesson`, `source=tool_lesson`, `context=workspace:/…` | | That lesson is absent from another workspace's chat prompt AND extraction prompt | CONFIRMED | Both prompt dumps, zero hits; extraction half required this branch's fix | Two findings worth knowing, neither a defect in this PR: - **Per-turn recall is invisible on a small store.** The stable prompt records every memory it renders and recall skips exactly those, so with only a handful of memories recall correctly has nothing left to surface. Proving it needs enough memories to overflow the 4000-char stable cap. This cost two test rounds before the mechanism was understood. - **Nothing in the product sets a non-global memory context except the email sidecar.** `set_memory_context()` has no callers, and `remember()`'s docstring advertises a `context` parameter its signature lacks. Two unrelated bugs found along the way are filed separately as amd#4409 and amd#4410. **On the eval:** this branch changes no prompt wording, no tool schema, and no tool registration — it adds none. The dynamic-context sections it touches came from amd#4061/amd#4066, which are already on main. A scorecard run would measure main's behaviour, not this diff, and there is no committed flagship baseline to compare against. </details> --------- Co-authored-by: Kalin Ovtcharov <[email protected]> Co-authored-by: Kalin Ovtcharov <[email protected]> Co-authored-by: Ovtcharov <[email protected]> Co-authored-by: Kalin Ovtcharov <[email protected]>
…md#4662) Every open PR shows these two failures; this clears them. The macOS one is fixed here; the Windows one is fixed by amd#4585, so the smoke jobs go green once both merge. - **macOS, `test_memory_turn_recall`:** an audio test imported the Whisper ASR module, and that import loaded torch. Once torch is loaded, macOS has two OpenMP runtimes in the process (torch's and faiss's), so memory recall refuses every faiss search for the rest of the run. torch and whisper are now imported only when an ASR is actually created. The recall test runs and passes; it isn't skipped. amd#4580 handles this failure by skipping the test, so drop that half of amd#4580 when this merges. - **Windows, `test_resolves_direct_shebang_posix`:** the test faked Linux by patching `sys.platform` for the whole process. pyfakefs teardown then took the POSIX path and called `os.getuid`, which doesn't exist on Windows. amd#4585 now patches only the uninstall module's view of the platform, so this PR doesn't touch it. The macOS failure dates from amd#4061 (Sep 28), which added the recall test after the torch-loading audio test from amd#3616. The smoke job runs with `-x`, so earlier failures hid it until amd#4562 fixed those on Oct 2. ## Test plan - [x] New `test_importing_whisper_asr_does_not_load_torch` fails on main and passes here - [x] Locally on macOS, all audio and memory tests in CI order: 433 passed, `test_memory_turn_recall` included - [x] Locally on macOS, every unit test up to and including the recall test: torch never loads, and recall passes. The 13 failures are local env noise (CLI binaries not on PATH, pip frontends); none import the audio module - [ ] CI: "Unit Tests (macOS smoke)" passes `test_memory_turn_recall.py` Co-authored-by: Kalin Ovtcharov <[email protected]> Co-authored-by: Kalin Ovtcharov <[email protected]>
# GAIA v0.25.0 Release Notes ## Breaking Changes - **`gaia chat` runs the flagship GAIA agent**, the same agent as the TUI and Agent UI, instead of the retired ChatAgent. `gaia chat -q "…"` queries it once. (PR [amd#4520](amd#4520)) - **`gaia talk` transcribes and speaks through Lemonade** — it uses Lemonade's Whisper and `kokoro-v1`, and stops with the reason if Lemonade is down. The `[audio]` extra is gone; `pip install amd-gaia[audio]` only warns. (PR [amd#4665](amd#4665)) - **The Agent UI runs only the GAIA agent** — the Agent Hub home, agent picker, and custom-agent export/import are removed from the UI. The CLI and eval harness can still run other agents. (PR [amd#4509](amd#4509)) - **The retired nomic embedder is removed** — memory saved with it is re-embedded on first start. (PR [amd#4489](amd#4489)) - **Indexed documents are re-indexed once** — the document cache is now keyed on chunking settings, so the first query after upgrading rebuilds it. (PR [amd#4624](amd#4624)) - **A skill that asks for more than its tier allows no longer loads** — the permission ceiling is checked at every load, so a skill already on disk that exceeds it is refused with the reason. (PR [amd#4849](amd#4849)) ## What's New - **A larger local model where the GPU holds it** — `gaia init` picks Qwen3.6-35B-A3B on a 64 GB+ Strix Halo or a 32 GB GPU and keeps Gemma-4-E4B elsewhere, with each context window sized to available memory. Qwen3.8 Flash Next is opt-in on 128 GB Strix Halo. (PRs [amd#4479](amd#4479), [amd#4670](amd#4670), [amd#4671](amd#4671), [amd#4658](amd#4658), [amd#4655](amd#4655)) - **The Agent UI opens straight to a chat and sets itself up** — a fresh install runs the same setup steps as the TUI in the window, with provider, key and model settings, permission modes, and revocable "always allow" grants. (PR [amd#4509](amd#4509)) - **A much smaller install** — PyTorch, transformers and accelerate are gone from the core, `[ui]` and `[talk]` installs; the desktop app's Python environment drops from ~0.9 GB to ~0.1 GB on Windows. (PRs [amd#4666](amd#4666), [amd#4621](amd#4621), [amd#4665](amd#4665)) - **One Windows installer for the desktop app and the terminal**, with a GAIA Windows Terminal profile. (PRs [amd#4720](amd#4720), [amd#4707](amd#4707)) - **A "no" holds** — a declined action isn't retried through another tool; the agent asks again with the exact command. The TUI gains Shift+Tab permission modes. (PRs [amd#4460](amd#4460), [amd#4461](amd#4461)) - **Answers are checked against what the tools actually did** — the agent looks at files you name before answering about them, and a short plain-English note appears only when work isn't confirmed. (PRs [amd#4532](amd#4532), [amd#4501](amd#4501), [amd#4508](amd#4508)) - **One shell session** — commands share a persistent shell, risky ones ask instead of being refused, and "full access" is one setting everywhere. (PR [amd#4408](amd#4408)) - **Memory surfaces what's relevant to each request, with its age**, keeps what fixed a failure as a lesson for that workspace, and extracts after the answer instead of before it. (PRs [amd#4061](amd#4061), [amd#4066](amd#4066), [amd#4406](amd#4406)) - **`gaia.log` stays bounded** — it rotates at 10 MB with three backups (`GAIA_LOG_MAX_MB`, `GAIA_LOG_BACKUPS`). (PRs [amd#4668](amd#4668), [amd#4760](amd#4760)) - **Child processes get a trimmed environment** — shell, MCP and skill children no longer inherit GAIA's internal credentials; `GAIA_NO_DOTENV` skips loading `.env`. (PRs [amd#4635](amd#4635), [amd#4659](amd#4659)) - **Every file tool checks the allowed-folders rule**, and paths inside an inline shell script are checked one by one. (PRs [amd#4656](amd#4656), [amd#4758](amd#4758)) ## Bug Fixes A selection of the user-visible fixes; the full list is in the changelog below. - **Local Qwen models no longer loop on repeated tool calls** — they run with their model card's sampling instead of near-greedy settings. (PR [amd#4655](amd#4655)) - **Qwen3.6 runs on a Strix Halo with an older AMD driver** — it used to crash on its first token, so `gaia init` failed; GAIA now turns off the Vulkan path that crashes on those drivers only, and newer drivers keep the faster path. (PR [amd#4674](amd#4674)) - **A long PDF no longer hangs or times out while indexing** — big documents index in the background, and PDFs that only carry owner-password restrictions now index. (PRs [amd#4754](amd#4754), [amd#4679](amd#4679), [amd#4734](amd#4734)) - **Document answers cite the right document and page**, and every chunk is embedded whole instead of its first 1,200 characters. (PRs [amd#4688](amd#4688), [amd#4723](amd#4723)) - **`gaia init` fails when model verification fails**, shows downloads live, and no longer hangs while Lemonade hashes a large model. (PRs [amd#4620](amd#4620), [amd#4564](amd#4564), [amd#4673](amd#4673)) - **`gaia init` adds a profile's extras without reinstalling GAIA**, which failed on Windows while `gaia.exe` was running. (PR [amd#4672](amd#4672)) - **Every SDK and CLI entry point starts GAIA's own Lemonade**, and every call goes to the resolved URL with its API key. (PRs [amd#4657](amd#4657), [amd#4627](amd#4627)) - **Local chat stays cached across turns** — the system prompt is fixed and side requests no longer evict the conversation. (PRs [amd#4698](amd#4698), [amd#4543](amd#4543)) - **A cloud model selection never preloads a local model**, and cloud models no longer get llama.cpp-only fields. (PRs [amd#4757](amd#4757), [amd#4709](amd#4709)) - **The Agent UI stops claiming "100% local" while chat goes to a cloud model**, and the chat header names the session's real model. (PRs [amd#4711](amd#4711), [amd#4550](amd#4550)) - **Enter can't approve a permission prompt**, and prompts wait 10 minutes before timing out. (PRs [amd#4700](amd#4700), [amd#4699](amd#4699)) - **Stopping a run keeps the turn and its steps visible.** (PR [amd#4743](amd#4743)) - **A file edit keeps the file's line endings** — a one-line edit on Windows used to rewrite every line ending, so a small change showed up as the whole file changed. (PR [amd#4864](amd#4864)) - **A broken agent install is reported as broken, not as missing** — the error names both package versions and the real import error, and suggests a reinstall that works. (PR [amd#4588](amd#4588)) - **A meeting or document summary is never cut off mid-sentence** — a thinking model used to spend the summary's output budget reasoning, so a long meeting lost its second half. (PR [amd#4827](amd#4827)) - **"What can you do?" gets an answer** instead of an attempt to generate an image of the question. (PR [amd#4809](amd#4809)) - **Writes and approved edits can't reach credential folders** (`~/.ssh`, `~/.aws`, `~/.kube` and others), and shell option values and script arguments get the same path check as plain paths. (PRs [amd#4848](amd#4848), [amd#4847](amd#4847)) - **`gaia connectors connect google --grant-agent installed:gaia` works** — it used to fail with no sign-in link for the shipped agent; it now asks for read-only Gmail and grants exactly that. (PR [amd#4859](amd#4859)) - **A "no" to creating a folder also covers writing into it** — GAIA no longer asks again to create the same folder a different way. (PR [amd#4857](amd#4857)) - **`gaia skill import` runs the same checks as a hub install** — https only, the audit, the permission ceiling, and an explicit opt-in for skills that ship code. (PR [amd#4849](amd#4849)) - **Memory off and private chats apply to scheduled and background runs too.** (PRs [amd#4842](amd#4842), [amd#4821](amd#4821)) - **Memory stops false apologies and reusing deleted values**, saves "remember this" requests, and skips loading the embedder when memory is off. (PRs [amd#4708](amd#4708), [amd#4756](amd#4756)) - **A reply cut off by the token limit is continued** instead of ending mid-sentence, and a tool call cut off at the output cap is retried shorter. (PRs [amd#4054](amd#4054), [amd#4556](amd#4556)) - **The TUI remembers the chosen model** across restarts and agent-process restarts. (PRs [amd#4497](amd#4497), [amd#4710](amd#4710)) - **`gaia uninstall --purge` removes installer binaries, PATH edits and daemon state.** (PR [amd#4413](amd#4413)) ## Contributors Thanks to the community members who contributed to this release: - [@itomek](https://github.com/itomek) — the flagship's browser and tool picker, one shell session, memory extraction off the answer path, stale tool-result eviction, the TUI's sourced Fireworks rankings, and `--purge` cleanup (PRs [amd#4407](amd#4407), [amd#4408](amd#4408), [amd#4406](amd#4406), [amd#4465](amd#4465), [amd#4414](amd#4414), [amd#4413](amd#4413)) - [@mikemikimike](https://github.com/mikemikimike) — chained shell command timeouts, bundled skills in frozen builds, and sidecar cleanup reporting (PRs [amd#4463](amd#4463), [amd#4467](amd#4467), [amd#4419](amd#4419)) - [@Hashim1999164](https://github.com/Hashim1999164) — honoring `GAIA_HOME` for cache, chat and index paths (PR [amd#4381](amd#4381)) - [@krtadev](https://github.com/krtadev) — `~` expansion in file and document tool paths (PR [amd#4576](amd#4576)) - [@aksh8b](https://github.com/aksh8b) — telling a broken agent install apart from a missing one, with a reinstall hint that works (PR [amd#4588](amd#4588)) - [@Dev-next-gen](https://github.com/Dev-next-gen) — numeric prerelease ordering in the hub (PR [amd#4517](amd#4517)) - [@vianmangal](https://github.com/vianmangal) — recording denied tool calls as unsuccessful in memory (PR [amd#4412](amd#4412)) - [@GaetanVDB07](https://github.com/GaetanVDB07) — links to upstream credential setup guides for connectors (PR [amd#4669](amd#4669)) - [@rradjabi](https://github.com/rradjabi) — moving self-hosted CI jobs to the xsj-dispatch runner pool (PR [amd#4534](amd#4534)) ## Also in this PR - **Hub floors raised to core 0.25.0** — the chat agent imports the allowed-folders check that only 0.25.0 ships (amd#4656), so `gaia-agent-chat` goes to 0.2.0 with `amd-gaia>=0.25.0`, and the flagship requires `amd-gaia>=0.25.0` and `gaia-agent-chat>=0.2.0`. - **Two follow-ups held back until that floor could rise** — `~/.gaia/logs/gaia-agent.log` now rotates like `gaia.log` (amd#4668), and the chat agent's Python runners and Windows notification start their children without GAIA's internal credentials (amd#4659). The full changelog (300 commits) is in `docs/releases/v0.25.0.mdx`. ## Test plan - [x] `util/validate_release_notes.py docs/releases/v0.25.0.mdx --tag v0.25.0` passes; narrative is 590 words (cap 600) - [x] `util/check_component_core_api.py --release-version 0.25.0` passes - [x] `pytest tests/unit/test_docs_json_release.py tests/unit/test_check_component_core_api.py hub/agents/chat/python/tests/test_chat_dependency_floor.py hub/agents/chat/python/tests/test_dependency_floor.py hub/agents/gaia/python/tests/test_gen_binaries_lock.py` (72 passed) - [x] `pytest hub/agents/gaia/python/tests/test_stdio.py` (91 passed, incl. the new rotation test); `pytest tests/unit/test_execute_python_file_cwd.py tests/unit/test_run_python_tool.py` (42 passed) - [ ] `mintlify validate` (docs CI job) — timed out locally, relying on CI - [x] Full flagship eval on main 9ce6598 (https://github.com/amd/gaia/actions/runs/37436249503): 181/308 scenarios pass vs 100/183 for the same categories in the baseline, 39 FAIL→PASS, 13 PASS→FAIL (two fixed in amd#4878, held until after rc1); retrieval lane still finishing at merge time - [ ] CI green ## Release checklist - [ ] Publish `gaia-agent-chat` 0.2.0 only after core 0.25.0 is on PyPI — it fails at import on an older core - [ ] Build Installers on the merged SHA (pre-tag verification) before pushing `v0.25.0` - [ ] terminal-hub 0.25.0 published before the flagship npm release consumes `binaries.lock.json` 🤖 Generated with [Claude Code](https://claude.com/claude-code) --------- Co-authored-by: Claude Opus 5.5 (1M context) <[email protected]> Co-authored-by: Kalin Ovtcharov <[email protected]>
Memory held useful lessons that the model almost never saw. The memory section of the system prompt is fixed at session start and picks facts by confidence alone, whatever the user is asking. Everything else only surfaced if the model called
recall, and it did so 4 times in a 2,121-task benchmark sweep. Surfaced memories also had no dates, so a lesson learned months ago under different permissions looked as current as one confirmed yesterday.Each turn now adds the three stored memories most relevant to the request to the per-turn context, which is prepended to the user message. The cached system prompt doesn't change. A memory has to clear a similarity floor, so an unrelated nearest match isn't shown. It must also be in this context or global and not sensitive, credentials are masked, and anything the system prompt already shows is skipped. Every memory the model sees without calling
recallnow carries a short "(learned 2026-06-03, last confirmed 2026-09-20)". The dates are absolute, so the fixed prompt stays stable, and the per-turn context already carries the current time.🔍 Technical details
TURN_RECALL_MIN_SIMILARITY = 0.5), not_hybrid_search. RRF gives no absolute floor, and hybrid search bumps confidence on every hit, which would inflate anything shown passively.updated_at, which moves when the same memory is stored again or updated.Test plan
pytest tests/unit/test_memory_turn_recall.py: 13 new tests on a real SQLite store and FAISS index. The 6 positive ones fail on main. Covers the exact injected line with its age, the top-3 cap, dedup against the stable prompt, no confidence or use-count bump, context scope (a default session reads every context, the same rule as fix(memory): show memories saved under a context label #4062; a scoped one reads its own), excluded rows (sensitive, reminder, below floor), credential masking, embedder failure, stable-prompt ages, and that the memory arrives on the user message while the system prompt stays byte-identicalpytest tests/unit -k memory: 1101 passed. Hub chat/gaia memory tests: 22 passedpython util/lint.py --black --isortgaia eval agenton the memory categories vs the committed baseline (memory prompt content changed)