feat(adk): add subagent middleware example with TUI#204
Open
feat(adk): add subagent middleware example with TUI#204
Conversation
Add a demo application showcasing the subagent middleware from eino's feat/subagent branch. The example creates a main ChatModelAgent with Explore and Plan read-only subagents that run in background via TaskMgr, displayed in a dual-panel Bubbletea TUI with scrollable views and multi-turn conversation loop that feeds subagent results back into the main agent. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Each subagent task now gets a dedicated tmux window with real-time event streaming via FIFO pipes. The top panel becomes a compact task status bar showing tmux jump hints (e.g., "tmux select-window -t :task_1"). Falls back to the previous in-TUI event log when tmux is not available. Three modes: inside tmux (uses current session), external (creates eino-subagents session), none (graceful degradation to TUI panel). Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Main agent now fills the entire window; subagent status shown as compact footer below the main panel (one line per task with tmux link) - Replace FIFO-based tmux output with regular temp file + tail -f combined with stty -echo to prevent arrow key escape sequences from appearing as garbage characters in subagent windows - Users can scroll tmux subagent windows via copy mode (Ctrl+B [) Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…ment Set the prompt directly on textinput.Model instead of prepending externally, which caused a duplicate ">" and misaligned placeholder text rendering at line start instead of at the cursor position. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…ndow hint Replace stty -echo + tail -f with less -R +F which is a proper terminal app that handles keyboard input correctly. Users get arrow key scrolling, PgUp/PgDn, search with /, and can toggle follow mode with Ctrl+C / F. Remove per-task tmux select-window hints (broken in external mode) and show a single line with attach command and keyboard shortcuts instead. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Cleanup now kills each tmux window and, in external mode, kills the entire eino-subagents session. Previously only temp files were removed, leaving orphaned tmux sessions after the process exited. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
adk/middlewares/subagent/example demonstrating eino's subagent middleware (fromfeat/subagentbranch)Dependencies
github.com/cloudwego/einotofeat/subagentbranch (89b967b5)charmbracelet/bubbletea,charmbracelet/lipgloss,charmbracelet/bubbles,mattn/go-runewidthTest plan
ARK_API_KEY,ARK_MODELgo run ./adk/middlewares/subagent/🤖 Generated with Claude Code