feat(tui): Agent Hub TUI — browse, search, launch, and manage agents#1186
Conversation
The Go TUI was a chat-only wrapper. Now `gaia.exe` opens a full Agent Hub where users can browse installed/available/coming-soon agents, fuzzy-search by name/category/tags, launch agents into a chat session, vote on upcoming agents, and delete installed ones with confirmation. - Hub with ASCII GAIA logo, dashboard (installed/active/idle counts), tabbed sections - Agent catalog with 13 agents (5 installed, 5 available, 3 coming soon), version tracking - Chat TUI: live-region streaming (overwrites intermediate events), Rich-style answer panels, /help /hub /init /clear slash commands, welcome message - Root model for hub ↔ chat navigation (Esc returns to hub) - Reusable confirm dialog, help overlay, vote HTTP client (POST to amd-gaia.ai) - Mock agent binary for testing without LLM backend - 44 tests across 4 packages
…isplay Logo was chunky (6 lines of block chars). Now a clean 3-line box-drawing logo. Agent list items now have spacing between them for readability. Each agent shows version (v0.1.0). Added --mock flag to hub for testing with mock agent binary.
Replaced generic block-char logo with the GAIA robot head (green body, cyan eyes) rendered in box-drawing characters. Switched color palette from pink (212) to a green/teal theme (114/150) that matches the GAIA robot mascot and AMD brand aesthetics.
The subprocess client now auto-detects Lemonade Server by probing ports 13305 and 8000 when LEMONADE_BASE_URL isn't set. The bash agent defaults to Gemma-4-E4B-it-GGUF model which is pre-downloaded. TUI now works end-to-end with the real LLM backend.
Answers now show duration, step count, and tools used below the panel (e.g. "4.2s · 2 steps · 1 tools"). Live streaming region shows both step progress and current action with spinner. Status bar hints shortened to prevent text wrapping on narrow terminals.
…rf stats) The second query in a session hung because a stale "complete" status event from the previous turn was read by the new goroutine, causing it to exit immediately. Fixed by skipping "complete" events at the start of each read loop. Also: clean tool arg display (extract command from JSON), truncate long tool summaries, filter redundant status messages, reduce input height from 3 lines to 1, show perf stats (duration/steps/tools) below each answer panel.
… display Perf stats now show: duration, TTFT, approximate output tokens, tokens/sec, steps, tools used (e.g. "12.5s · ttft 3.2s · ~45 tokens · 5.6 tok/s · 2 steps · 1 tools"). Binary discovery searches common build paths (cpp/build/Debug/, Release/) so the hub can find gaia-bash without --mock. Elapsed time counter shown during streaming so users see progress during model load. Agent goal messages displayed with 🎯 icon.
Binary discovery now walks up the directory tree looking for cpp/build/{Debug,Release}/gaia-bash.exe instead of using hardcoded relative paths — works from worktrees and any cwd depth. Status bar now calculates text width correctly, preventing hint text from wrapping to the next line. Added binary discovery smoke test.
Only gaia-bash has a compiled C++ binary. Chat/Doc/File/Code are Python agents that need API client mode (not subprocess). Moved them to Available section so the hub doesn't show launchable agents that can't actually run. Other agents need API client mode (future work).
Ready for review — Agent Hub TUITwo PRs ready together:
What it does: Run How to test: cd tui
go build -o bin/gaia.exe ./cmd/gaia
go build -o bin/mockagent.exe ./test/mockagent
# Hub with mock agent (no LLM needed):
./bin/gaia.exe --mock "./bin/mockagent.exe"
# Hub with real LLM (needs Lemonade + gaia-bash from #985):
./bin/gaia.exe
# Direct chat with real LLM:
./bin/gaia.exe chat --subprocess "path/to/gaia-bash --json-events --model Gemma-4-E4B-it-GGUF" |
Replaced the simple box-drawing logo with the full GAIA robot mascot rendered in ASCII art. Each character is colored to match the original PNG: bright green (%) for highlights, green (#) for body, muted green (*) for mid-tones, dark green (+) for details, cyan (-) for eyes, and dim (=) for shadows.
itomek
left a comment
There was a problem hiding this comment.
Reviewed at a structural/triage level (no Go toolchain here to build). Cleanly isolated: all 33 substantive files live under tui/, with a CI workflow and a Go smoke test (tui/test/smoke_test.go) included; nothing touches the Python package. As the description notes, this depends on #985, so it should land after it. Approving on structure and scope; a go build + go test gate in CI would be worth adding so the TUI doesn't rot untested.
Generated by Claude Code
|
@claude review this PR. |
Running
gaia.exewith no args now opens the Agent Hub — a terminal-native hub for discovering, searching, and launching GAIA agents. Before: the Go TUI only supportedgaia chat --subprocess <binary>. After: users get a full agent browser with dashboard, fuzzy search, voting, and agent lifecycle management, all in a ~21MB standalone binary with <200ms startup.Depends on: #985 (gaia-bash
--json-eventsmode)Test plan
cd tui && go test ./... -v— 45 tests pass (catalog, client, event, smoke)go vet ./...— clean.\bin\gaia.exe— hub opens, browse Bash agent, Tab to Available/Coming Soon.\bin\gaia.exe chat --subprocess "path\to\gaia-bash.exe --json-events --model Gemma-4-E4B-it-GGUF"— real LLM chat works/search,ddelete with confirm,vvote,?help,qquit/help/hub/clear, perf stats (duration/TTFT/tok/s), Esc to cancel