How yoanwai/agent-manager works
agent-manager is a terminal-based control plane for running multiple AI coding agents in persistent, private tmux sessions. The main workflow is to open the manager, launch or select an agent, monitor its status, send prompts, and review its Git changes; agents can also delegate work through MCP tools. Its README additionally describes grouped session management, managed shells, forks, and notifications. Connections reflect the README and shown source references; unsampled internals are represented only where their subsystem is documented.
Main entry points: main.go Application entry · ui Manager interface · session.go Session commands · launch.go Agent launch
Components 20
Manager runtime
- Application entry
main.go - Manager interface
internal/ui - Configuration
internal/config/config.go
Session lifecycle
- Session commands
internal/sessioncmd/session.go - Agent launch
internal/launch/launch.go - Persistent sessions
internal/tmux/tmux.go - Session state
internal/store/store.go - Managed terminals
internal/sessioncmd/terminal.go
Review and status
- Git operations
internal/git/git.go - Change review
internal/diff/diff.go - Agent status
internal/status/status.go
Agent integrations
- Agent hooks
internal/hooks/hooks.go - MCP registration
internal/mcpreg/mcpreg.go - MCP tools
internal/mcpserver/mcpserver.go - Issue reporting
internal/report/report.go
Platform services
- Notifications
internal/notify/notify.go - Self update
internal/update/update.go
Other components
- Developer
- Installed agent CLIs
- Git repositories
Connections 29
- Developer → Application entry: starts
- Application entry → Configuration: loads
main.go - Application entry → Persistent sessions: initializes
main.go - Application entry → Agent status: initializes
main.go - Application entry → Manager interface: runs
main.go - Manager interface → Session commands: launches sessions
- Session commands → Agent launch: plans launch
internal/sessioncmd/session.go - Session commands → Persistent sessions: creates panes
internal/sessioncmd/session.go - Session commands → Session state: records sessions
internal/sessioncmd/session.go - Session commands → Git operations: manages worktrees
internal/sessioncmd/session.go - Agent launch → Configuration: reads settings
internal/launch/launch.go - Agent launch → Agent hooks: configures hooks
internal/launch/launch.go - Agent launch → MCP registration: registers tools
internal/launch/launch.go - Agent launch → Persistent sessions: starts session
internal/launch/launch.go - Persistent sessions → Installed agent CLIs: runs CLI
- Installed agent CLIs → Persistent sessions: runs in
- Manager interface → Managed terminals: opens shells
- Manager interface → Change review: opens review
- Change review → Git operations: reads changes
internal/diff/diff.go - Git operations → Git repositories: queries
internal/git/git.go - Application entry → MCP tools: serves MCP
main.go - MCP tools → Session commands: dispatches tools
internal/mcpserver/mcpserver.go - MCP tools → Issue reporting: uses reporter
internal/mcpserver/mcpserver.go - MCP registration → Agent hooks: configures hooks
internal/mcpreg/mcpreg.go - Application entry → Notifications: handles helper
main.go - Application entry → Self update: sets build source
main.go - Manager interface → Agent status: shows activity
- Manager interface → Session state: persists ordering
internal/ui/dragdrop.go - MCP tools → Installed agent CLIs: exposes tools
internal/mcpserver/mcpserver.go