Repository navigation
feat(ui): stream GAIA's work as a live timeline of notes, steps and thinking - #5966
Conversation
The chat folded all of GAIA's work into one collapsed "N steps · M tools" bar, so a long turn showed almost nothing until the answer. Each turn now reads like Claude Code: notes GAIA writes before a tool call appear in full, each step shows live with a timer, reasoning scrolls by and then folds to "Thought for Ns", and finished steps fold into one line between notes. - Text streamed right before a tool call is sent as a `commentary` event, in the event sink both the in-process and relayed paths share, and is saved with the turn. - Relayed turns keep each step's plain-language narration and drop the finished step from the live line. - Streamed reasoning keeps its word spacing; the step count moves to the line under the answer.
…aits An installed GAIA sent its reasoning folded into status lines the Agent UI drops, so its chats never showed any thinking, and the live line read a bare "Thinking…" through model queues and long prompt reads. The relay now asks an agent at contract 2.22 or later for its reasoning and shows it like an in-process turn, and passes each status's phase through so the live line says "Reading your request" or "Waiting for the model". - `/query` takes `reasoning: true` (contract 2.22) and streams `reasoning` events. Older agents are never sent the field and behave as before. - Opening a folded run no longer replays the steps' entry motion. - A finished step shows what it did (a globe for web searches, a link for page reads) instead of a green check.
|
Verdict: Approve with suggestions The Agent UI now shows each turn as it happens: the agent's own notes, each step with its timer, reasoning that folds to "Thought for Ns", and a live line saying what the model is doing. It works for both the in-process agent and the installed one. The new contract field (2.22) is only sent to agents that support it, and the agent package's docs were all updated together. I found no blocking issues. The behaviour that could have lost data, moving already-streamed text out of the answer when a tool call follows, is safe: the saved answer still comes from the final Two small follow-ups:
Real-world evidenceN/A — no 🔍 Technical detailsIssues 🟢 Separate thoughts fuse when they are adjacent ( (applies to 🟢 Unused imports ( Notes checked and found fine
Strengths
|
…ning CI caught two gaps. A folded run holding a policy block read "Hit an error", where the old bar said "Blocked by policy"; it now says so again. The Slack adapter must handle every event the translator can emit, and the new `reasoning` event is only sent to a client that asks for it, which Slack never does, so the adapter skips it on purpose.
Live thinking pieces are now joined with no separator, so a whole thought
from print_thought ran straight into the next one ("plan stepStart with").
A whole thought now ends on a newline. Also drops two icon imports the
removed summary bar left behind, and adds tests that a turn with hundreds
of steps renders and ticks quickly and that streamed notes and reasoning
cannot inject markup.
|
Thanks @kurplunkin, this is a big improvement: seeing the agent's own notes and the "Thought for 8s" fold makes a long turn much easier to follow, and keeping the reasoning field behind the 2.22 version check means older installed agents can't get a 422. I merged
The earlier red CI (the Slack contract test and the Electron "Blocked by policy" check) came from the commit before your last one, and your last commit already fixed it. 🔍 Technical details
|
…mapped The host's output handler now emits a commentary event for text the model writes just before a tool call. The email agent's translator didn't know it, so the Agent UI showed '[unmapped agent event: commentary]' and saved it with the turn. It now drops the event like the core translator does: the words already went out as tokens. Slack reads the same translated stream, so this covers it too.
|
One more fix pushed, for the email agent. When the email model wrote a sentence before checking mail, the Agent UI showed 🔍 Technical details
|
main's amd#5966 took contract 2.22 for /query's reasoning field, and that contract shipped in v0.25.2-rc5. internet_off and /sessions/{id}/internet move to 2.23, so a 2.22 agent from rc5 is not mistaken for one that takes the switch and sent a field it would 422. From amd#5961, a relayed GAIA chat can now be given a folder; only taking one away is still refused, and that refusal no longer mentions the internet. The live-sidecar switch tests released the parked agent before the relay had re-read the switch, so they raced the push they were checking. They now wait for the relay to go live, as a real first tool call waits on a model reply.
Main has moved a long way since the last update; this keeps the branch's opt-in eviction on top of it. Nothing main ships duplicates it: main still carries only the defaults-on overflow retry from amd#5396. - The chat package was folded into the flagship (amd#7035): the eviction settings move into gaia_agent/chat_agent.py, beside main's new resend_reasoning_across_requests, and the CHANGELOG entry moves to the gaia npm package's Unreleased section. - Kept main's tool_scope argument and its unsaved-memory nudge next to the re-read reminder. - Agent UI: main's timeline (amd#5966) hides finished status rows, so a context notice now draws its own row and stays after the turn ends. Status handling moved into applyStatusEvent, so the notice is added there. - The closing-answer overflow tests from amd#6875 now patch the evictor's counter, which this branch sizes the trim with. - Two second-turn tests now run at a 64K window: at 16K, main's history fitting drops the whole earlier turn, so there is nothing to replay.
While GAIA worked, the Agent UI folded everything into one collapsed "6 steps · 4 tools" bar and a "Thinking…" line. On an installed GAIA it also dropped the model's reasoning and every step's description. Now each turn streams as a live timeline, the way Claude Code shows its work:
All of this works the same whether the agent runs in-process or as an installed background agent. Older installed agents keep working; they just show no reasoning until they update.
Same question, "Find the README in this folder, read it, and tell me in three bullets what this project is", in the old and new window, on Gemma-4-E4B:
main)Opening the folded line shows each step, with its own icon and the time each thought took:
Closes #5965
/querytakesreasoning: trueand streamsreasoningevents. The relay asks only agents at 2.22 or later, so an older one is never sent a field it would 422. The contract spec and the agent package's README, SPEC, SKILL and CHANGELOG move together.Test plan
npx vitest runinsrc/gaia/apps/webui: 1,929 tests. Under load, 3 ChatView tests timed out (history notice, session panel, transcript). This change doesn't touch them, and they pass alone, on this branch and on the commit before.pytest tests/unit/test_sse_narration.py tests/unit/test_sidecar_relay_fidelity.py tests/unit/test_email_sidecar_relay.py tests/unit/chat/ui/test_relayed_reasoning.py tests/unit/chat/ui/test_relayed_surface.py: 227 passedpytest hub/agents/gaia/python/tests: 814 passed. 4 fail on this Mac without thebrowserextra and the installed entry point, the same 4 as onmain.tests/unit/chat/ui,tests/unit/apiand related files againstmain: identical failures, all caused by a running Lemonade tripping the test guard.🔍 Technical details
SSEOutputHandler._emitturns text streamed since the last tool call into acommentaryevent just before the nexttool_start. Both paths share that sink: the relay callshandler._emit, so commentary needs no contract change. The sidecar's translator drops its own copy._stream_chat_implsaves it as acommentarystep.AgentActivitysplits the rows into notes and step runs (toTimeline). A finished run folds behindstepsSummary, and the run in progress stays open. Status rows are gone: the live line (liveLineprop, rendered after the timeline) carries the phase instead.tool_callnarration and the statusphase/words/chars/queue, and mapsreasoningtothinking.<think>pieces keep their spacing. The live join changed from\nto''to match how the saved turn joins them, and_close_reasoningsaves the reasoning time on the last piece.