Skip to content

feat(skills): auto-load a skill that clearly matches the request - #5442

Merged
kovtcharov-amd merged 15 commits into
amd:mainfrom
kovtcharov:kalin/skill-autoload
Nov 19, 2026
Merged

kovtcharov-amd merged 15 commits into
amd:mainfrom
kovtcharov:kalin/skill-autoload

Conversation

@kovtcharov

@kovtcharov kovtcharov commented Oct 21, 2026 •

Copy link
Copy Markdown
Contributor

Local models mostly ignore the per-turn skill suggestion (#5423): over 56 tasks Qwen3.6-35B-A3B was offered a fitting skill on nearly every one and called load_skill on 3. The suggestion line now names the skill to load, and with GAIA_SKILL_AUTOLOAD=1 (or skill_autoload=True) a skill that clearly matches the request loads before the turn, with "Loaded report-from-sources because it matches this request" in the message.

Auto-load is off by default. Its 0.55 floor and 0.03 lead come from an older 71-request measurement, and questions about a skill's topic ("What is RSS and how do RSS feeds work?", 0.589 against rss-digest) score above it. Those are now negatives in the labelled set; re-measuring on the current set decides whether it can turn on.

🔍 Technical details
  • Only trusted skills auto-load (bundled, or hub installs at community tier+); captured/local/.claude skills stay suggestions.
  • A skill granting a CLI loads only under full access, with a warning, and is unloaded when full access goes off.
  • Bodies must fit in 18% of the context window; an unloaded skill is never auto-loaded again; at most two per turn; auto-load is off on any embedder other than embeddinggemma-300m.
  • Calibration: GAIA_SKILL_SUGGEST_CALIBRATE=1 LEMONADE_BASE_URL=<server>/api/v1 pytest tests/unit/test_skill_suggester.py -k autoload_calibration -s prints a floor-by-lead table and fails if the defaults load on a negative.

Test plan

  • pytest tests/unit/test_skill_suggester.py hub/agents/gaia/python/tests/test_skill_suggestions.py hub/agents/gaia/python/tests/test_skill_autoload_turn.py
  • Full tests/unit/agents, tests/unit/test_skill*, hub/agents/gaia/python/tests: failures match main
  • python util/lint.py --all
  • Auto-load calibration against embeddinggemma-300m on the current labelled set
  • RC eval: gaia_skills_* categories (the suggestion line changes for every turn)

The skill catalogue said "when the work matches a skill, call load_skill",
which models read as one skill per task: a deck built from a folder of
documents loaded only the deck skill, and a workbook request that three
skills fit loaded none.

- The catalogue header now says to load every skill whose description
  matches any part of the request (what it reads and what it produces),
  and to load each one before starting even when they overlap.
- New optional metadata.gaia.pairs_with names companion skills. Pairing is
  mutual, rendered on the catalogue line within the description budget,
  and load_skill names installed companions that are not loaded yet.
  Uninstalled names are ignored with a debug log; a non-list is an error.
- data-explore, document-brief, research-report and summarize pair with
  office-docs (inert until office-docs ships).
Pairing is mutual, so a hub skill many others pair with (office-docs once
amd#5417 and amd#5421 land) collected five companions, and because the
"(pairs with: ...)" note shared the 480-char description budget its
description was cut. The note now has its own budget: at most three names,
the skill's own pairs_with first, then "+N more". load_skill still names
every unloaded companion.
Small local models skip the skills catalogue: asked for a deck from a folder
of documents they load one skill or none, because picking from a long list is
the step they do worst. Each turn the flagship now scores the user's message
against every installed skill that is not loaded and, when some clearly fit,
adds one line to the turn's context naming them and their pairs_with
companions. It suggests and never loads; the model still decides.

The line rides in the user message, not the system prompt, so the prompt
prefix stays byte-identical across turns. Descriptions are embedded once and
cached; a turn costs one query embedding. With no embedder the turn gets no
suggestion (debug log, one-minute back-off), never an error.

Threshold 0.30, margin 0.05 from the best match, top 3 — calibrated on 37
invented requests over the 16 hub skills (7 negatives) with
embeddinggemma-300m: precision 1.00, recall 0.94, no negative suggested.
Off with GAIA_SKILL_SUGGEST=0 or GaiaAgentConfig(skill_suggestions=False).
With office-docs, report-from-sources, log-triage and meeting-actions on
disk, the first defaults dropped to precision 0.77 from scoring alone and
0.52 with companions: pairing is mutual, so office-docs dragged in five
skills on any office-flavoured request. Companions now join only when they
score 0.40 against the request themselves, and the margin to the best match
narrows from 0.05 to 0.02.

The labelled set grows to 54 requests, adding three per new skill and five
near-miss negatives. On the 20 skills: precision 0.84, recall 0.93, and 3
of 12 negatives suggested (all near misses scoring 0.35-0.44). The coverage
test now accepts labels for skills not on disk and names any hub skill that
has no labelled request, so whichever change lands later adds its cases.
Local models often ignore the per-turn skill suggestion even when it is
right: asked to build a deck from documents, Qwen3.6-35B-A3B loaded
office-docs but not the suggested report-from-sources. A match scoring at
least 0.55, and 0.03 ahead of every other skill, now loads before the turn
(two per turn at most), and the user message says "Loaded
report-from-sources because it matches this request" where the suggestion
line goes. Weaker matches stay suggestions.

The labelled set grows to 71 requests, 26 of them negatives (19 near
misses such as "how does RSS work?", which scores 0.524). With
embeddinggemma-300m over the 20 hub skills, auto-load picked 11 skills on
10 requests, none outside a request's labels (precision 1.00) and none on
a negative, for recall 0.21. On the larger set suggestions measure
precision 0.66, recall 0.91, 14 of 26 negatives suggested.

A skill that would grant a command-line program, one already loaded or
auto-loaded and since unloaded, or one that would push the loaded bodies
past ~6,000 tokens is only suggested; a failed load is logged and
suggested. No embedder means no auto-load. On by default;
GAIA_SKILL_AUTOLOAD=0 or skill_autoload=False turns it off.
@github-actions github-actions Bot added documentation Documentation changes tests Test changes agents labels Oct 21, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Verdict: Request changes

This PR lets the flagship load a skill on its own when a request clearly matches it, instead of only suggesting it. The safeguards are well thought out: CLI-granting skills are never auto-loaded, there's a token budget, and a skill the user unloaded isn't loaded again. One gap needs fixing before it ships on by default:

  • Auto-load is on for an embedder it was never calibrated for. The 0.55 cutoff was measured only with the default GPU/CPU embedder, and the PR's own docs say scores don't carry over between embedding models. On an NPU-profile PC the flagship embeds with a different model, so auto-load runs at an untested cutoff and can quietly load the wrong skill's instructions into the prompt. Turn auto-load off unless the active embedder is the calibrated one. Suggestions can stay on, since a wrong one only costs a line.
  • No live run yet. This changes what the model sees on every turn, but the eval and any real agent turn showing a skill auto-loading are still unchecked. The motivating skills (report-from-sources, office-docs) aren't on this branch either; they come from feat(skills): office-docs skill with its own verify_workbook tool #5417 and feat(skills): add report-from-sources, log-triage and meeting-actions #5421. Add a log or transcript of a real turn that auto-loads, and name the eval categories to watch on the next RC.

Real-world evidence

N/A: no evidence bundle was produced for this run, and pytest isn't installed on this runner, so I couldn't run the new tests here. The verdict rests on static review alone. Nothing has exercised the auto-load path on a real agent turn.

🔍 Technical details

🟡 Auto-load isn't tied to the embedder it was calibrated on (hub/agents/gaia/python/gaia_agent/agent.py:576)

ChatAgent.__init__ calls init_memory(embedding_model=get_embedding_model_for_device(config.device)). On device="npu" that returns the FLM embedder, not user.embeddinggemma-300m-GGUF. The suggester uses self._embed_text, which embeds with _active_embedding_model(), so on NPU every score is compared against DEFAULT_AUTOLOAD_THRESHOLD = 0.55. That value was set 0.026 above the highest negative under embeddinggemma. The suggester's module docstring and agent-skills.mdx both say another embedder "needs its own calibration", and nomic "measured far worse". A wrong suggestion costs one line, but a wrong auto-load costs up to ~6K tokens of an unrelated skill body plus its tools. Gate it:

        autoload = autoload_env_override()
        if autoload is None:
            autoload = bool(getattr(self.config, "skill_autoload", True))
        if autoload and self._active_embedding_model() != DEFAULT_EMBEDDING_MODEL:
            logger.info(
                "[skills] auto-load off: its threshold is calibrated for %s, "
                "not the active embedder %s",
                DEFAULT_EMBEDDING_MODEL,
                self._active_embedding_model(),
            )
            autoload = False

You'll need to import DEFAULT_EMBEDDING_MODEL from gaia.agents.registry. Add a unit test that builds the agent with a non-default embedder and asserts skill_suggester.autoload_threshold is None. Also update the "No embedder, no auto-load" bullet in docs/spec/agent-skills.mdx and the CHANGELOG entry so all three docs agree.

🟡 Missing evidence and eval for an LLM-affecting change

Per CLAUDE.md, a change to what's injected into the model's turn needs gaia eval agent coverage, or the categories named in the PR for the next RC. The test plan leaves both the eval and the opt-in calibration test unchecked. A captured [skills] auto-loaded for this request: … log line from a real flagship turn would cover the evidence gap. The calibration was run on a local merge with #5417/#5421, so land those first or re-check the numbers after rebasing.

🟢 Nits

  • _autoload_skills loads through self.load_skill(name), which skips two steps the load_skill tool takes: skill_manager.reload() and _activate_extraction_skills. If an extraction skill can match, check that its framework tool still registers when the skill is auto-loaded.
  • SkillSuggester.select logs embedder failures at debug. That's consistent with feat(skills): suggest unloaded skills that match each request #5423, but it means an NPU or offline embedder silently disables both suggestions and auto-load. Logging once at info per cooldown would make that visible.

Strengths

  • Auto-loads go through the same permission gate as a model-issued load_skill, and anything that grants a CLI stays a suggestion. That's the right line between "loading is consent" and unprompted shell reach.
  • Calibration is reproducible: a labelled fixture with near-miss negatives, an opt-in real-embedder test that holds precision ≥ 0.97 with no negative loaded, and a coverage test that fails when a hub skill has no labelled requests.
  • The auto-load line goes into the user message, not the system prompt, which keeps the prompt-cache prefix stable.

@kovtcharov-amd

Copy link
Copy Markdown
Collaborator

Holding this for v0.25.2. It changes which skills the model loads, and v0.25.1's release eval is already measuring several other prompt and agent-loop changes, so landing it now would leave a regression with no single cause to trace back to. It's first in line once v0.25.1 ships.

# Conflicts:
#	src/gaia/agents/base/skill_catalog.py
On an NPU-profile PC the flagship embeds with the FLM model, where the 0.55 auto-load floor was never measured, so a wrong skill body could load unasked. Auto-load now turns off on any embedder other than embeddinggemma-300m, even with GAIA_SKILL_AUTOLOAD=1; matches stay suggestions.
@kovtcharov-amd

Copy link
Copy Markdown
Collaborator

Auto-load still loads the wrong skill for questions about a skill's topic, so it shouldn't ship on by default yet. With the real embedder, 3 of 24 "explain X" questions I wrote load a skill the user never asked to run: "What is RSS and how do RSS feeds work?" loads rss-digest (0.589), "How does image generation with diffusion models work, conceptually?" loads image-gen (0.585), and "What does a source watch mean in a newsroom?" loads source-watch (0.582). The fixture's highest negative, "How does RSS work?", scores 0.524, and rewording it adds about 0.06. A fourth, "Explain how GitHub issue triage works" (0.626), is held back only because github-triage grants gh.

No threshold fixes it on main's 16 skills: one positive scores above 0.60, and the GitHub-triage question scores 0.626. Two ways forward: ship auto-load off by default and keep suggestions on, or add a separate check that the request asks for the work to be done, not explained. Either way, add these four questions as negatives to skill_suggestion_cases.json.

I merged main (one conflict in skill_catalog.py, kept the public listed from this PR and the docstring from #5422). I also added the embedder gate the review asked for: auto-load is off on any embedder other than embeddinggemma-300m, and the spec and CHANGELOG say so.

🔍 Technical details
  • Measured outside pytest against Lemonade /api/v1/embeddings with user.embeddinggemma-300m-GGUF and the test module's own helpers. On main's 16 hub skills with 56 present cases, the fixture still holds: auto-load precision 1.00, recall 0.22, 0 negatives loaded. Suggestions measure precision 0.70, recall 0.94, 12 negatives suggested.
  • Positive expected-skill scores at the top: 0.674, 0.593, 0.592, 0.578, 0.569, 0.563, 0.559. The adversarial negatives reach 0.582 to 0.626, so any floor that drops them keeps one positive at most.
  • Your review nit on _activate_extraction_skills: auto-load runs in get_memory_dynamic_context, before Agent.process_query builds the turn's ExtractionLedger, so calling it there would act on the previous turn's ledger. The pinned body is in _active_skill_filter, which the first tool result's _activate_extraction_skills call reads. No hub skill on main declares extract_document_items anyway. I left it unchanged.
  • The skill_manager.reload() the tool runs is there so the tool's own ungated-code check reads current frontmatter. _autoload_skills reads permissions from skill_manager.load(name) and goes through the same Agent.load_skill gate, so it is not a bypass.
  • Main still lacks office-docs / report-from-sources (feat(skills): office-docs skill with its own verify_workbook tool #5417, feat(skills): add report-from-sources, log-triage and meeting-actions #5421 open), so the deck example in the body and CHANGELOG doesn't apply until those land.

main landed the skill suggester this branch started from, with its own catalogue, tests and labelled requests. The eight conflicted files take main's side; auto-load is re-applied on top in the next commit.
…quest

Local models mostly ignore the per-turn skill suggestion: over 56 tasks Qwen3.6-35B-A3B was offered a fitting skill on nearly every one and called load_skill on 3. With GAIA_SKILL_AUTOLOAD=1 or skill_autoload=True, a suggested skill scoring at least 0.55, and 0.03 ahead of every other skill, now loads before the turn (two per turn at most) and the user message says "Loaded report-from-sources because it matches this request". Weaker matches are suggested exactly as before.

It is built on the suggester from main: suggest() returns what it did, and a new select() splits the same matches into auto-loads and suggestions. Off by default, because the 0.55 floor was measured on an earlier 71-request set and not on the current labelled requests; test_autoload_calibration_against_the_real_embedder measures it.

A skill that would grant a command-line program, a .claude skill shipping tools, one auto-loaded earlier and since unloaded, or one that would push loaded bodies past ~6,000 tokens is only suggested; a failed load is logged and suggested. On any embedder other than embeddinggemma-300m auto-load stays off with a warning.
…ted skills

Auto-load as first written would rarely fire: paired skills score alike, so the best match seldom led by the margin. Companions of the best match no longer count as rivals, and the best one that also clears the floor loads with it (two per turn at most). A lead of exactly the margin now counts.

Only skills bundled with the agent or installed from the hub at community tier or above load unasked; captured, local and .claude skills stay suggestions. A skill that grants a program loads only under full access, with a warning naming the program, and is unloaded at the next turn once full access is off. The size cap is 18% of the context window, read each turn, counting only bodies that render. Any unloaded skill is never auto-loaded again, also after a rebuild. Asking for auto-load where it cannot run logs one warning with the reason.

The suggestion line now tells the model to call load_skill for the best match. The load moved out of get_memory_dynamic_context into a new pre-turn hook, so reading the context never loads a skill. GAIA_SKILL_AUTOLOAD_TAU and GAIA_SKILL_AUTOLOAD_MARGIN set the floor and lead; the calibration test prints a floor-by-lead table.
Runs the real Agent.load_skill from the pre-turn path with skills on disk: the body is in the first model call, the skill's tool is registered, the user message says what was loaded, the prompt is unchanged on the next turn, and a full-access grant is withdrawn once full access is off.
Covers the companion rule, trusted roots, full access, the context-share cap, the env settings and the calibration sweep.
@kovtcharov-amd kovtcharov-amd mentioned this pull request Nov 19, 2026
Four "explain X" questions scored 0.58-0.63 against the skill they name, above the 0.55 auto-load floor, so the calibration never counted them. They are now negatives in the labelled set, a test keeps them there, and the spec says why the floor stays opt-in.
@kovtcharov-amd
kovtcharov-amd merged commit db491b6 into amd:main Nov 19, 2026
54 of 56 checks passed
kovtcharov-amd added a commit that referenced this pull request Nov 19, 2026
# GAIA v0.27.0 Release Notes

## Summary

- Connect more than one Google or Microsoft account, and manage each one
separately.
- GAIA desktop has a browser beside the chat that both you and GAIA can
use.
- Type `/` and a skill's name to run that skill on a request.
- New skills build and check Office files and triage logs.
- The standalone email agent is gone; the main GAIA agent handles mail.
- 8 contributors merged 87 PRs and closed 72 issues since v0.26.0.

## Breaking Changes

- **The standalone email agent is removed** — `gaia email`, the
`gaia-agent-email` and `@amd-gaia/agent-email` packages, the `/v1/email`
routes and the `email` setup profile are gone. Ask GAIA about your mail
in `gaia chat` or the Agent UI instead; it reads, drafts and sends
through the Google and Microsoft connectors, as the [Email
guide](/guides/email) describes. On upgrade the old install is removed,
and any email it had scheduled is named once, since it won't be sent.
(PR [#7108](#7108))
- **`gaia agent list` and `gaia eval benchmark` are removed** — GAIA
ships one agent, and `gaia agent list` now says what replaced it. (PR
[#7108](#7108))
- **`gaia.ui.email_sidecar` is renamed `gaia.ui.sidecar`** — update the
import. (PR [#7108](#7108))

## What's New

- **Several accounts per mail provider** — `gaia connectors connect
google --add` adds another account; Settings and the terminal UI list
each one with its own Reconnect, Make default and Disconnect. (PRs
[#8331](#8331),
[#8332](#8332),
[#8333](#8333))
- **Browser pane in GAIA desktop** — browse beside the chat while GAIA
reads and drives the same tab, and pick part of a page to ask about. (PR
[#5973](#5973))
- **Run a skill by name** — start a message with `/skill-name` in the
Agent UI, terminal UI, `gaia -p` or the API; typing `/` lists installed
skills. (PR [#8483](#8483))
- **Office documents** — the `office-docs` skill builds spreadsheets,
decks with editable charts and Word files; its `verify_workbook` tool
recalculates formulas to catch wrong cell references. (PR
[#5417](#5417))
- **Log triage** — the `log-triage` skill's `triage_logs` tool reads
every named log in one call and returns the anomalies, bursts and hosts
hit. (PR [#5465](#5465))
- **Skill auto-load, opt-in** — with `GAIA_SKILL_AUTOLOAD=1` a skill
that clearly matches the request loads before the turn. Off by default.
(PR [#5442](#5442))
- **Document reranking, opt-in** — `RAGConfig(enable_reranking=True)`
reorders retrieved passages with a downloaded Lemonade reranking model.
(PR [#6136](#6136))
- **Review saved folder answers** — `gaia trust` lists, adds, declines
and forgets GAIA's per-folder answers about project guidance files. (PR
[#8480](#8480))
- **Sign in to Gmail over SSH** — `gaia connectors connect google
--callback-port PORT` fixes the sign-in port so it can be forwarded. (PR
[#8474](#8474))
- **Settings reach open chats** — a model server, connector or skill
change applies on an open chat's next message, including in the terminal
UI. (PR [#8400](#8400))
- **Agent UI** — Ctrl+/ lists keyboard shortcuts, formulas render
instead of LaTeX source, the library shows which chats use each
document, a scheduled task can be edited in place with its past runs
listed, and connector setup is shown as numbered steps. (PRs
[#7504](#7504),
[#7499](#7499),
[#7514](#7514),
[#7527](#7527),
[#8281](#8281),
[#8279](#8279),
[#8280](#8280))
- **Scripted `gaia -p` runs** — `--disallowed-tools`, `--no-web` and
`--no-skills` withhold tools; the run uses the apps' model without
downloading one, uses its whole `--time-limit`, and the agent knows
nobody is there to answer questions. (PRs
[#8326](#8326),
[#7808](#7808),
[#8385](#8385),
[#8451](#8451))
- **Large tool results pass by handle** — a tool given an `output_…`
handle gets the full result without it entering the prompt. (PR
[#8121](#8121))

## Bug Fixes

- **A missing command-line program becomes a step to install it**, not a
dead end. (PR [#8251](#8251))
- **A reply that stalls partway is requested again.** (PR
[#8446](#8446))
- **A chat fails at once when the chosen model server is down**, instead
of waiting. (PR [#8436](#8436))
- **A failed turn stays marked failed in history.** (PR
[#8335](#8335))
- **A document is never reported attached when nothing was written.**
(PR [#8388](#8388))
- **Attached file names keep their spaces and non-Latin scripts.** (PR
[#8461](#8461))
- **The agent can read images GAIA generated.** (PR
[#8478](#8478))
- **A bare JSON answer ends the turn.** (PR
[#8462](#8462))
- **A reply that was all thinking is told to act**, and the next one
thinks less. (PRs [#8430](#8430),
[#8448](#8448))
- **A file shown whole with `cat` counts as read back.** (PR
[#8458](#8458))
- **`run_python` says when long output was cut**, and a script missing a
module is pointed at the system Python. (PRs
[#8450](#8450),
[#8426](#8426))
- **Time limits are respected** — the model is told the limit, a
command's timeout never outlasts it, and no test run is requested after
it. (PRs [#8429](#8429),
[#8424](#8424),
[#8452](#8452))
- **`gaia -p` streams its model calls**, so a long reply is not lost.
(PR [#8427](#8427))
- **Model SDKs load on first use**, and context checkpoints are limited.
(PR [#8459](#8459))
- **A shell result sent to the model leaves out what it already knows.**
(PR [#8428](#8428))
- **Outlook availability is no longer guessed** when a meeting's time
can't be read. (PR [#8267](#8267))
- **No local chat download is planned while chat runs on a cloud
model.** (PR [#8086](#8086))
- **Setup shows the same model size and name as Settings.** (PR
[#8431](#8431))
- **A reply cut short by a crash isn't continued.** (PR
[#8391](#8391))
- **An MCP connector shows Connected only after a check has started
it.** (PR [#8434](#8434))
- **The document library's install hint matches this build.** (PR
[#8327](#8327))
- **A document overlap of 0 repeats nothing between chunks.** (PR
[#8382](#8382))
- **Documents in Russian, Greek, Polish and other languages are split
into sentences**, so their chunks overlap like English ones instead of
being cut every 2,000 characters. (PR
[#8499](#8499))
- **Documents added while the model server was down are indexed once it
is back**, and show "Waiting", not "Failed". (PR
[#8353](#8353))
- **Setup retries and resumes a dropped assistant download** instead of
failing. (PR [#8490](#8490))
- **A failed model download stays reported after Settings closes**,
until you dismiss it. (PR
[#8468](#8468))
- **Impossible input gets a 4xx error, not a 500.** (PR
[#8291](#8291))
- **Agent UI layout** — popovers stay on screen in right-to-left layouts
at phone width, the Mac window buttons clear the folded sidebar, and
closing the resource strip says how to bring it back. (PRs
[#8455](#8455),
[#8476](#8476),
[#8432](#8432))
- **The "GAIA doesn't run this model server" line is translated in
Arabic.** (PR [#8435](#8435))
- **A release candidate names its own pre-release as the agent's
source.** (PR [#8433](#8433))

## Known Issues

- **Installed builds: `gaia -p` refuses `--time-limit`,
`--disallowed-tools`, `--no-web` and `--no-skills`**, because there the
agent runs through GAIA's background service — run without them, or from
a developer install that includes the agent package. Tracked in
[#8495](#8495).
- **NPU PCs: chat on the NPU profile returns an empty reply** — use the
GPU/CPU profile for now. Tracked in
[#6008](#6008).
- **Fedora 44: setup cannot reach any HTTPS site**, so it can neither
connect a cloud model nor download one — tracked in
[#7226](#7226).
- **Long sessions on Windows: Lemonade's bundled llama-server leaks
handles on every request** — restart the model server from time to time.
Tracked in [#8312](#8312).
- **Coding: editing a config, data or `SKILL.md` file does not mark an
earlier "tests pass" as stale** — re-run the tests after such an edit.
Tracked in [#8213](#8213).
- **Your own model server, stopped: the connection banner says it is
"not installed"** — start your server again. Tracked in
[#8313](#8313).
- **Summarizing a 1,000+ page document can time out** — ask about
sections or page ranges instead. Tracked in
[#8218](#8218).

## Contributors

Thanks to the community members who contributed to this release:

- [@tylerbea](https://github.com/tylerbea) — several accounts per
connector, the browser pane, `/skill-name` in chat, and Mac window
layout (PRs [#8331](#8331),
[#8332](#8332),
[#8333](#8333),
[#5973](#5973),
[#8483](#8483),
[#8476](#8476))
- [@akshat-lakhera](https://github.com/akshat-lakhera) — `gaia trust`
and the Gmail sign-in callback port (PRs
[#8480](#8480),
[#8474](#8474))
- [@rapuckett](https://github.com/rapuckett) — failed-turn history,
honest document attachment, right-to-left popovers, and test and tooling
fixes (PRs [#8335](#8335),
[#8388](#8388),
[#8455](#8455),
[#8453](#8453),
[#8454](#8454),
[#8471](#8471))
- [@eshitakundu](https://github.com/eshitakundu) — passing tool results
by handle, and measuring what MCP servers cost an agent (PRs
[#8121](#8121),
[#8294](#8294))
- [@bniladridas](https://github.com/bniladridas) — bare JSON answers,
attachment names, failed-download reporting, and installer and test CI
fixes (PRs [#8462](#8462),
[#8461](#8461),
[#8468](#8468),
[#8482](#8482),
[#8466](#8466),
[#8465](#8465),
[#8467](#8467),
[#8464](#8464),
[#8402](#8402))
- [@huong8373tt-beep](https://github.com/huong8373tt-beep) — optional
Lemonade reranking for document search (PR
[#6136](#6136))
- [@0z5a](https://github.com/0z5a) — sentence splitting for non-ASCII
languages (PR [#8499](#8499))

## Full Changelog

**87 commits** since v0.26.0. The PR links above are the changelog.

Full Changelog:
[v0.26.0...v0.27.0](v0.26.0...v0.27.0)
rapuckett pushed a commit to rapuckett/gaia that referenced this pull request Nov 19, 2026
…#5442)

Local models mostly ignore the per-turn skill suggestion (amd#5423): over
56 tasks Qwen3.6-35B-A3B was offered a fitting skill on nearly every one
and called `load_skill` on 3. The suggestion line now names the skill to
load, and with `GAIA_SKILL_AUTOLOAD=1` (or `skill_autoload=True`) a
skill that clearly matches the request loads before the turn, with
"Loaded report-from-sources because it matches this request" in the
message.

Auto-load is **off by default**. Its 0.55 floor and 0.03 lead come from
an older 71-request measurement, and questions *about* a skill's topic
("What is RSS and how do RSS feeds work?", 0.589 against rss-digest)
score above it. Those are now negatives in the labelled set;
re-measuring on the current set decides whether it can turn on.

<details>
<summary>🔍 Technical details</summary>

- Only trusted skills auto-load (bundled, or hub installs at `community`
tier+); captured/local/`.claude` skills stay suggestions.
- A skill granting a CLI loads only under full access, with a warning,
and is unloaded when full access goes off.
- Bodies must fit in 18% of the context window; an unloaded skill is
never auto-loaded again; at most two per turn; auto-load is off on any
embedder other than embeddinggemma-300m.
- Calibration: `GAIA_SKILL_SUGGEST_CALIBRATE=1
LEMONADE_BASE_URL=<server>/api/v1 pytest
tests/unit/test_skill_suggester.py -k autoload_calibration -s` prints a
floor-by-lead table and fails if the defaults load on a negative.
</details>

## Test plan

- [x] `pytest tests/unit/test_skill_suggester.py
hub/agents/gaia/python/tests/test_skill_suggestions.py
hub/agents/gaia/python/tests/test_skill_autoload_turn.py`
- [x] Full `tests/unit/agents`, `tests/unit/test_skill*`,
`hub/agents/gaia/python/tests`: failures match main
- [x] `python util/lint.py --all`
- [ ] Auto-load calibration against embeddinggemma-300m on the current
labelled set
- [ ] RC eval: `gaia_skills_*` categories (the suggestion line changes
for every turn)

---------

Co-authored-by: Kalin Ovtcharov <[email protected]>
rapuckett pushed a commit to rapuckett/gaia that referenced this pull request Nov 19, 2026
# GAIA v0.27.0 Release Notes

## Summary

- Connect more than one Google or Microsoft account, and manage each one
separately.
- GAIA desktop has a browser beside the chat that both you and GAIA can
use.
- Type `/` and a skill's name to run that skill on a request.
- New skills build and check Office files and triage logs.
- The standalone email agent is gone; the main GAIA agent handles mail.
- 8 contributors merged 87 PRs and closed 72 issues since v0.26.0.

## Breaking Changes

- **The standalone email agent is removed** — `gaia email`, the
`gaia-agent-email` and `@amd-gaia/agent-email` packages, the `/v1/email`
routes and the `email` setup profile are gone. Ask GAIA about your mail
in `gaia chat` or the Agent UI instead; it reads, drafts and sends
through the Google and Microsoft connectors, as the [Email
guide](/guides/email) describes. On upgrade the old install is removed,
and any email it had scheduled is named once, since it won't be sent.
(PR [amd#7108](amd#7108))
- **`gaia agent list` and `gaia eval benchmark` are removed** — GAIA
ships one agent, and `gaia agent list` now says what replaced it. (PR
[amd#7108](amd#7108))
- **`gaia.ui.email_sidecar` is renamed `gaia.ui.sidecar`** — update the
import. (PR [amd#7108](amd#7108))

## What's New

- **Several accounts per mail provider** — `gaia connectors connect
google --add` adds another account; Settings and the terminal UI list
each one with its own Reconnect, Make default and Disconnect. (PRs
[amd#8331](amd#8331),
[amd#8332](amd#8332),
[amd#8333](amd#8333))
- **Browser pane in GAIA desktop** — browse beside the chat while GAIA
reads and drives the same tab, and pick part of a page to ask about. (PR
[amd#5973](amd#5973))
- **Run a skill by name** — start a message with `/skill-name` in the
Agent UI, terminal UI, `gaia -p` or the API; typing `/` lists installed
skills. (PR [amd#8483](amd#8483))
- **Office documents** — the `office-docs` skill builds spreadsheets,
decks with editable charts and Word files; its `verify_workbook` tool
recalculates formulas to catch wrong cell references. (PR
[amd#5417](amd#5417))
- **Log triage** — the `log-triage` skill's `triage_logs` tool reads
every named log in one call and returns the anomalies, bursts and hosts
hit. (PR [amd#5465](amd#5465))
- **Skill auto-load, opt-in** — with `GAIA_SKILL_AUTOLOAD=1` a skill
that clearly matches the request loads before the turn. Off by default.
(PR [amd#5442](amd#5442))
- **Document reranking, opt-in** — `RAGConfig(enable_reranking=True)`
reorders retrieved passages with a downloaded Lemonade reranking model.
(PR [amd#6136](amd#6136))
- **Review saved folder answers** — `gaia trust` lists, adds, declines
and forgets GAIA's per-folder answers about project guidance files. (PR
[amd#8480](amd#8480))
- **Sign in to Gmail over SSH** — `gaia connectors connect google
--callback-port PORT` fixes the sign-in port so it can be forwarded. (PR
[amd#8474](amd#8474))
- **Settings reach open chats** — a model server, connector or skill
change applies on an open chat's next message, including in the terminal
UI. (PR [amd#8400](amd#8400))
- **Agent UI** — Ctrl+/ lists keyboard shortcuts, formulas render
instead of LaTeX source, the library shows which chats use each
document, a scheduled task can be edited in place with its past runs
listed, and connector setup is shown as numbered steps. (PRs
[amd#7504](amd#7504),
[amd#7499](amd#7499),
[amd#7514](amd#7514),
[amd#7527](amd#7527),
[amd#8281](amd#8281),
[amd#8279](amd#8279),
[amd#8280](amd#8280))
- **Scripted `gaia -p` runs** — `--disallowed-tools`, `--no-web` and
`--no-skills` withhold tools; the run uses the apps' model without
downloading one, uses its whole `--time-limit`, and the agent knows
nobody is there to answer questions. (PRs
[amd#8326](amd#8326),
[amd#7808](amd#7808),
[amd#8385](amd#8385),
[amd#8451](amd#8451))
- **Large tool results pass by handle** — a tool given an `output_…`
handle gets the full result without it entering the prompt. (PR
[amd#8121](amd#8121))

## Bug Fixes

- **A missing command-line program becomes a step to install it**, not a
dead end. (PR [amd#8251](amd#8251))
- **A reply that stalls partway is requested again.** (PR
[amd#8446](amd#8446))
- **A chat fails at once when the chosen model server is down**, instead
of waiting. (PR [amd#8436](amd#8436))
- **A failed turn stays marked failed in history.** (PR
[amd#8335](amd#8335))
- **A document is never reported attached when nothing was written.**
(PR [amd#8388](amd#8388))
- **Attached file names keep their spaces and non-Latin scripts.** (PR
[amd#8461](amd#8461))
- **The agent can read images GAIA generated.** (PR
[amd#8478](amd#8478))
- **A bare JSON answer ends the turn.** (PR
[amd#8462](amd#8462))
- **A reply that was all thinking is told to act**, and the next one
thinks less. (PRs [amd#8430](amd#8430),
[amd#8448](amd#8448))
- **A file shown whole with `cat` counts as read back.** (PR
[amd#8458](amd#8458))
- **`run_python` says when long output was cut**, and a script missing a
module is pointed at the system Python. (PRs
[amd#8450](amd#8450),
[amd#8426](amd#8426))
- **Time limits are respected** — the model is told the limit, a
command's timeout never outlasts it, and no test run is requested after
it. (PRs [amd#8429](amd#8429),
[amd#8424](amd#8424),
[amd#8452](amd#8452))
- **`gaia -p` streams its model calls**, so a long reply is not lost.
(PR [amd#8427](amd#8427))
- **Model SDKs load on first use**, and context checkpoints are limited.
(PR [amd#8459](amd#8459))
- **A shell result sent to the model leaves out what it already knows.**
(PR [amd#8428](amd#8428))
- **Outlook availability is no longer guessed** when a meeting's time
can't be read. (PR [amd#8267](amd#8267))
- **No local chat download is planned while chat runs on a cloud
model.** (PR [amd#8086](amd#8086))
- **Setup shows the same model size and name as Settings.** (PR
[amd#8431](amd#8431))
- **A reply cut short by a crash isn't continued.** (PR
[amd#8391](amd#8391))
- **An MCP connector shows Connected only after a check has started
it.** (PR [amd#8434](amd#8434))
- **The document library's install hint matches this build.** (PR
[amd#8327](amd#8327))
- **A document overlap of 0 repeats nothing between chunks.** (PR
[amd#8382](amd#8382))
- **Documents in Russian, Greek, Polish and other languages are split
into sentences**, so their chunks overlap like English ones instead of
being cut every 2,000 characters. (PR
[amd#8499](amd#8499))
- **Documents added while the model server was down are indexed once it
is back**, and show "Waiting", not "Failed". (PR
[amd#8353](amd#8353))
- **Setup retries and resumes a dropped assistant download** instead of
failing. (PR [amd#8490](amd#8490))
- **A failed model download stays reported after Settings closes**,
until you dismiss it. (PR
[amd#8468](amd#8468))
- **Impossible input gets a 4xx error, not a 500.** (PR
[amd#8291](amd#8291))
- **Agent UI layout** — popovers stay on screen in right-to-left layouts
at phone width, the Mac window buttons clear the folded sidebar, and
closing the resource strip says how to bring it back. (PRs
[amd#8455](amd#8455),
[amd#8476](amd#8476),
[amd#8432](amd#8432))
- **The "GAIA doesn't run this model server" line is translated in
Arabic.** (PR [amd#8435](amd#8435))
- **A release candidate names its own pre-release as the agent's
source.** (PR [amd#8433](amd#8433))

## Known Issues

- **Installed builds: `gaia -p` refuses `--time-limit`,
`--disallowed-tools`, `--no-web` and `--no-skills`**, because there the
agent runs through GAIA's background service — run without them, or from
a developer install that includes the agent package. Tracked in
[amd#8495](amd#8495).
- **NPU PCs: chat on the NPU profile returns an empty reply** — use the
GPU/CPU profile for now. Tracked in
[amd#6008](amd#6008).
- **Fedora 44: setup cannot reach any HTTPS site**, so it can neither
connect a cloud model nor download one — tracked in
[amd#7226](amd#7226).
- **Long sessions on Windows: Lemonade's bundled llama-server leaks
handles on every request** — restart the model server from time to time.
Tracked in [amd#8312](amd#8312).
- **Coding: editing a config, data or `SKILL.md` file does not mark an
earlier "tests pass" as stale** — re-run the tests after such an edit.
Tracked in [amd#8213](amd#8213).
- **Your own model server, stopped: the connection banner says it is
"not installed"** — start your server again. Tracked in
[amd#8313](amd#8313).
- **Summarizing a 1,000+ page document can time out** — ask about
sections or page ranges instead. Tracked in
[amd#8218](amd#8218).

## Contributors

Thanks to the community members who contributed to this release:

- [@tylerbea](https://github.com/tylerbea) — several accounts per
connector, the browser pane, `/skill-name` in chat, and Mac window
layout (PRs [amd#8331](amd#8331),
[amd#8332](amd#8332),
[amd#8333](amd#8333),
[amd#5973](amd#5973),
[amd#8483](amd#8483),
[amd#8476](amd#8476))
- [@akshat-lakhera](https://github.com/akshat-lakhera) — `gaia trust`
and the Gmail sign-in callback port (PRs
[amd#8480](amd#8480),
[amd#8474](amd#8474))
- [@rapuckett](https://github.com/rapuckett) — failed-turn history,
honest document attachment, right-to-left popovers, and test and tooling
fixes (PRs [amd#8335](amd#8335),
[amd#8388](amd#8388),
[amd#8455](amd#8455),
[amd#8453](amd#8453),
[amd#8454](amd#8454),
[amd#8471](amd#8471))
- [@eshitakundu](https://github.com/eshitakundu) — passing tool results
by handle, and measuring what MCP servers cost an agent (PRs
[amd#8121](amd#8121),
[amd#8294](amd#8294))
- [@bniladridas](https://github.com/bniladridas) — bare JSON answers,
attachment names, failed-download reporting, and installer and test CI
fixes (PRs [amd#8462](amd#8462),
[amd#8461](amd#8461),
[amd#8468](amd#8468),
[amd#8482](amd#8482),
[amd#8466](amd#8466),
[amd#8465](amd#8465),
[amd#8467](amd#8467),
[amd#8464](amd#8464),
[amd#8402](amd#8402))
- [@huong8373tt-beep](https://github.com/huong8373tt-beep) — optional
Lemonade reranking for document search (PR
[amd#6136](amd#6136))
- [@0z5a](https://github.com/0z5a) — sentence splitting for non-ASCII
languages (PR [amd#8499](amd#8499))

## Full Changelog

**87 commits** since v0.26.0. The PR links above are the changelog.

Full Changelog:
[v0.26.0...v0.27.0](amd/gaia@v0.26.0...v0.27.0)
kovtcharov-amd pushed a commit that referenced this pull request Nov 19, 2026
…at fire (#8510)

Skill auto-load shipped in #5442 with a floor that was never measured on
the current request set, so it almost never fired, and its calibration
test could not run against GAIA's own Lemonade (401, no API key). This
re-measures it and picks defaults that fire, while auto-load stays **off
by default**.

- **Held-out calibration.** The labelled set grows to 243 requests; the
234 for skills on disk (62 needing no skill) are split by hash into a
tuning half and a held-out half. Defaults are chosen on the tuning half
only and checked on the held-out half.
- **Better matching.** Skills are matched by description under
EmbeddingGemma's document prompt and the request under its
classification prompt. Suggestion floor 0.35; auto-load floor 0.40 with
a 0.03 lead.
- **Calibration bar.** Questions *about* a skill's topic ("what is
RSS?") score as high as real requests, so the test no longer requires
zero loads on no-skill requests; it allows at most a fifth of them. A
wrong load costs context only, and auto-load remains opt-in. The spec,
CHANGELOG and release notes all say off by default.
- **Paired skills.** A skill named in another's `pairs_with` is no
longer auto-loaded with it unless it leads on its own score; otherwise
it is named as "Also available".
- The calibration embedder now sends the Lemonade key and fails with an
actionable 401/403 message.

## Eval

Suggestions are on by default, so the per-turn suggestion line changes
for every user. The RC eval should watch `gaia_skills_tasks`,
`gaia_skills_lifecycle`, `gaia_skills_capture` and
`gaia_tool_selection`. Auto-load itself is off by default, so no lane
exercises it.

## Test plan
- [ ] `python -m pytest tests/unit/test_skill_suggester.py`
- [ ] `cd hub/agents/gaia/python && python -m pytest
tests/test_skill_suggestions.py`
- [ ] `GAIA_SKILL_SUGGEST_CALIBRATE=1 LEMONADE_BASE_URL=<server> python
-m pytest tests/unit/test_skill_suggester.py -k calibration -s`
kovtcharov-amd added a commit to kovtcharov/gaia that referenced this pull request Nov 20, 2026
…dow (amd#5510)

On a 64K local model, loading two or three skills took each request from
~23K to ~40K tokens, and the model followed its instructions less well.
A large cloud model did better with the same skills. Now the skill text
in the prompt grows with the model's context window. A 64K model gets
~3,300 tokens of skill bodies, its most relevant skill in full and the
others as one line each with how to get them back, and auto-loads one
skill per turn. Windows of 120K and up keep a 6,000-token budget and two
auto-loads. Only text shrinks: every loaded skill keeps all its tools on
the tool list, summarized or not.

| Window | Skill body budget | Auto-loads per turn |
|---|---|---|
| 16K | 1,000 (floor) | 1 |
| 32K | ~1,600 | 1 |
| 64K | ~3,300 | 1 |
| 120K+ / Claude 200K | 6,000 (ceiling) | 2 |

<details>
<summary>🔍 Technical details</summary>

- Budget is 5% of the window from `history.context_window` (the history
budget's source), clamped 1,000–6,000. It is cached per model so it
doesn't move with free memory. Lemonade cloud models use the catalogue
`ctx_size`, or the ceiling when none is listed, because their 64K is an
admission policy, not their window.
- Ranking over budget: an explicit `load_skill` / auto-load since the
last turn began comes first, then `SkillLoader` relevance (new
`last_scores`), then load recency. The top body is always full. A
mid-turn `load_skill` on a summarized skill promotes it right away.
- Tools: main's rule that a loaded skill's tools stay listed
(`_pinned_skill_tools`) holds unchanged, including the skill's own
`<skill>/<tool>` tools. This PR no longer withholds a summarized skill's
tools.
- Opt-in through `Agent.SKILL_CONTEXT_BUDGET`; only `GaiaAgent` sets it,
so every other agent's prompt is byte-identical.
- Diagnostics: `[skills]` debug logs, plus `skill_budget` on the turn
result, the `GAIA_TURN_LOG` record and `/api/chat/context`.
</details>

## Test plan

- [x] `python -m pytest tests/unit/test_skill_budget.py
hub/agents/gaia/python/tests/test_skill_suggestions.py` covers
16K/64K/200K budgets, ranking, summaries, the auto-load cap, and that a
summarized skill keeps the tools it provides on 16K and 64K windows
(eight skills on 16K included)
- [x] `tests/unit/test_skill_tools_pinned.py`, dynamic-tool,
turn-metrics and turn-insights suites pass
- [x] `python util/lint.py --all`
- [ ] `gaia eval agent` on a 64K local model and a large cloud model,
comparing prompt tokens and skill-task scores with amd#5442 (eval gate:
next RC tag)

---------

Co-authored-by: Kalin Ovtcharov <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agents documentation Documentation changes enhancement New feature or request skill Claude Code skill files (.claude/skills/) tests Test changes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants