Skip to content

feat(tui): Agent Hub TUI — browse, search, launch, and manage agents#1186

Merged
kovtcharov-amd merged 12 commits into
mainfrom
kalin/gaia-tui-agent-hub
May 28, 2026
Merged

feat(tui): Agent Hub TUI — browse, search, launch, and manage agents#1186
kovtcharov-amd merged 12 commits into
mainfrom
kalin/gaia-tui-agent-hub

Conversation

@kovtcharov-amd
Copy link
Copy Markdown
Collaborator

@kovtcharov-amd kovtcharov-amd commented May 21, 2026

Running gaia.exe with no args now opens the Agent Hub — a terminal-native hub for discovering, searching, and launching GAIA agents. Before: the Go TUI only supported gaia 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-events mode)

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
  • Hub: / search, d delete with confirm, v vote, ? help, q quit
  • Chat: multi-turn, /help /hub /clear, perf stats (duration/TTFT/tok/s), Esc to cancel

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
@github-actions github-actions Bot added the devops DevOps/infrastructure changes label May 21, 2026
Ovtcharov added 10 commits May 20, 2026 19:01
…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).
@kovtcharov-amd kovtcharov-amd marked this pull request as ready for review May 21, 2026 22:51
@kovtcharov-amd
Copy link
Copy Markdown
Collaborator Author

Ready for review — Agent Hub TUI

Two PRs ready together:

  1. feat(cpp): gaia-bash — native C++ bash coding agent with TUI, API server, MCP server #985gaia-bash native agent: adds --json-events mode to the C++ bash agent so TUI/WebUI can consume structured JSONL events instead of raw terminal output.

  2. feat(tui): Agent Hub TUI — browse, search, launch, and manage agents #1186Agent Hub TUI: Go terminal UI that serves as the central hub for browsing, searching, and launching GAIA agents. Standalone ~21MB binary, <200ms startup.

What it does: Run gaia.exe → see the Agent Hub with a dashboard, fuzzy search, agent categories (Installed/Available/Coming Soon), voting on upcoming agents. Select an agent → launches into a chat TUI with live streaming, Rich-style answer panels, perf stats (TTFT, tok/s). Esc returns to the hub.

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"

Merge #985 first, then #1186.

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.
Copy link
Copy Markdown
Collaborator

@itomek itomek left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

@kovtcharov-amd
Copy link
Copy Markdown
Collaborator Author

@claude review this PR.

@kovtcharov-amd kovtcharov-amd added this pull request to the merge queue May 28, 2026
Merged via the queue into main with commit aa2ca33 May 28, 2026
29 checks passed
@kovtcharov-amd kovtcharov-amd deleted the kalin/gaia-tui-agent-hub branch May 28, 2026 20:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

devops DevOps/infrastructure changes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants