A visual kanban board for orchestrating multiple Claude Code agents
Spawn, monitor, and interact with AI coding assistants from a single web UI. Manage your autonomous development team through tmux sessions with real-time state tracking and intelligent auto-discovery.
- β¨ Features
- π Quick Start
- π± Remote Access
- π― Usage Guide
- ποΈ Architecture
- βοΈ Configuration
- π§ Development
- π Troubleshooting
- π API Reference
- π Agent Spawning β Create new Claude Code agents with custom prompts and project paths
- π Kanban Board β Visual organization across Running, Idle, and Completed columns
- π Real-time State Detection β Automatic state tracking via intelligent terminal output parsing
- π Auto-Discovery β Automatically detects existing Claude tmux sessions and adds them to the board
- π¬ Interactive Messaging β Send follow-up messages and files to running agents
- π Smart Project Management β Save frequently-used projects as tabs for quick access
- π¨ ANSI Color Support β Full 16/256/24-bit color rendering in terminal output
- π€ File Uploads β Drag-and-drop or click to send files to agents
- π Re-spawn β Restart completed agents with new prompts in the same project
- π Direct Attachment β Copy tmux attach commands for terminal access
- π Mobile-Friendly β Access and manage agents from your phone via Tailscale
- π§ AI-Generated Labels β Automatic label generation using Claude Haiku for better organization
- π¦ Persistent Registry β Agent state persists across server restarts
Nβ Open spawn modalEnterβ Send message (in prompt field)Shift+Enterβ New line (in prompt field)
You'll need the following installed on your system:
- Node.js v18 or higher
- tmux for session management
- Claude CLI (
claudecommand in PATH)
# Install dependencies via Homebrew
brew install node tmux
# Install Claude Code CLI globally
npm install -g @anthropic-ai/claude-codenode --version # Should be v18+
tmux -V # Should show tmux version
claude --version # Should show Claude CLI version# Clone the repository
git clone <repo-url>
cd agent-viewer
# Install dependencies
npm install
# Start the server
npm startOpen http://localhost:4200 in your browser.
Access Agent Viewer from any device on your network using Tailscale.
-
Install on your Mac
brew install tailscale # Or download from https://tailscale.com/download -
Install on your phone
-
Sign in with the same account on both devices
# Start the server (binds to 0.0.0.0 by default)
npm startGet your Tailscale IP:
tailscale ipThen visit on your phone:
http://<tailscale-ip>:4200
With MagicDNS (if enabled):
http://<machine-name>:4200
- Click
[+ SPAWN]or pressN - Enter the project path (or browse with π)
- Write your initial prompt
- Click
SPAWN
The agent launches in a new tmux session and appears on the board.
| Action | Description |
|---|---|
| VIEW OUTPUT | Open full terminal output with ANSI colors |
| EXPAND | Show output inline on the card |
| Send Message | Type in prompt field and press Enter |
| FILE | Upload a file to the agent |
| ATTACH | Copy tmux attach command |
| RESPAWN | Restart a completed agent with new prompt |
| CLEANUP | Remove agent from board |
| KILL | Terminate running agent session |
- Click
+to save the current project as a tab - Click a tab to filter by that project
- When a tab is selected, spawn modal auto-fills that project path
Click the π button in the spawn modal to visually browse your filesystem and select project directories.
Agent Viewer automatically discovers existing tmux sessions running Claude Code and adds them to the board. No manual registration needed!
Agent Viewer is a minimal, framework-free application with a clean two-file architecture:
agent-viewer/
βββ server.js # Express backend (tmux integration, SSE broadcasting)
βββ public/
β βββ index.html # Frontend (HTML/CSS/JS in one file)
β βββ prompt-key-utils.js
β βββ expanded-card-utils.js
βββ .agent-registry.json # Persistent agent state
βββ .project-tabs.json # Saved project tabs
Core Systems:
- Agent Registry β In-memory state + JSON persistence
- State Detection β Polls tmux output every 3s to classify agent states
- Tmux Integration β Spawns sessions, captures output, sends input
- Auto-Discovery β Scans tmux sessions and detects Claude processes
- LLM Label Generation β Async Claude Haiku calls for smart labeling
- SSE Broadcasting β Real-time state updates to all clients
State Detection Logic:
Agents are classified by pattern-matching terminal output:
- Running β "esc to interrupt" prompt visible
- Idle β Empty prompt or permission requests
- Completed β Session exited or specific completion signals
- Vanilla JavaScript β No frameworks, no build step
- SSE-Driven Updates β Real-time state synchronization
- ANSI Converter β Full 16/256/24-bit color support
- Drag-and-Drop β For card reordering and file uploads
- Terminal Aesthetic β Dark, modern UI inspired by CLI tools
| Variable | Default | Description |
|---|---|---|
PORT |
4200 |
Server port |
HOST |
0.0.0.0 |
Bind address (0.0.0.0 for network access, 127.0.0.1 for localhost only) |
POLL_INTERVAL |
3000 |
State detection interval in milliseconds |
Custom port:
PORT=3000 npm startLocalhost only:
HOST=127.0.0.1 npm startMultiple settings:
HOST=0.0.0.0 PORT=8080 POLL_INTERVAL=5000 npm startagent-viewer/
βββ server.js # Main backend (Express + tmux integration)
βββ public/
β βββ index.html # Complete frontend app
β βββ prompt-key-utils.js # Keyboard handling utilities
β βββ expanded-card-utils.js # Card state management
βββ test/
β βββ ansi-test.html # ANSI color rendering tests
βββ docs/
β βββ architecture.html # Visual architecture diagram
βββ .agent-registry.json # Auto-generated agent state
βββ .project-tabs.json # Auto-generated saved tabs
βββ CLAUDE.md # Claude Code integration guide
βββ package.json
This project runs directly with Node.js:
- No transpilation
- No bundling
- No compilation
Just edit and refresh!
- Shell escaping β Single quotes:
message.replace(/'/g, "'\\''") - Async commands β All external commands use
exec()with timeouts (neverexecSync()) - Session naming β Format:
agent-{label}(lowercase, hyphenated) - Manual parsing β Multipart file uploads parsed without libraries
- Interactive handling β
waitForClaudeReady()auto-dismisses Claude startup prompts
Problem: Agent doesn't appear on the board after clicking SPAWN
Solutions:
- Verify
claudeis in your PATH:which claude - Check tmux is installed:
tmux -V - Ensure project path exists and is accessible
- Check server logs for errors
Problem: Terminal output is blank or not updating
Solutions:
- Wait 3 seconds for next state detection cycle
- Check if tmux session exists:
tmux ls - Try clicking
VIEW OUTPUTinstead ofEXPAND - Verify agent is actually running:
tmux attach -t agent-<label>
Problem: Existing Claude tmux sessions not appearing
Solutions:
- Ensure tmux session contains a Claude process
- Restart the server to trigger fresh discovery
- Check
.agent-registry.jsonfor corrupted data
Problem: Tailscale IP not accessible
Solutions:
- Verify server started with
HOST=0.0.0.0 - Check Tailscale is running on both devices:
tailscale status - Use IP address instead of MagicDNS name
- Ensure no firewall blocking port 4200
Enable verbose logging:
DEBUG=* npm startView tmux sessions:
tmux lsAttach to agent directly:
tmux attach -t agent-<label>| Method | Endpoint | Description |
|---|---|---|
GET |
/api/agents |
List all agents with current state |
POST |
/api/agents |
Spawn new agent |
POST |
/api/agents/:name/send |
Send message or respawn |
POST |
/api/agents/:name/upload |
Upload file to agent |
DELETE |
/api/agents/:name |
Kill agent session |
DELETE |
/api/agents/:name/cleanup |
Remove from registry |
GET |
/api/agents/:name/output |
Fetch terminal output |
| Method | Endpoint | Description |
|---|---|---|
GET |
/api/recent-projects |
List recently used paths |
GET |
/api/browse?dir=PATH |
Browse directories |
| Method | Endpoint | Description |
|---|---|---|
DELETE |
/api/cleanup/completed |
Bulk cleanup completed agents |
| Method | Endpoint | Description |
|---|---|---|
GET |
/api/events |
SSE stream for real-time updates |
Spawn Agent:
curl -X POST http://localhost:4200/api/agents \
-H "Content-Type: application/json" \
-d '{
"projectPath": "/path/to/project",
"prompt": "Implement user authentication"
}'Send Message:
curl -X POST http://localhost:4200/api/agents/my-agent/send \
-H "Content-Type: application/json" \
-d '{"message": "Add unit tests"}'Upload File:
curl -X POST http://localhost:4200/api/agents/my-agent/upload \
-F "files=@./config.json"See repository for license information.
Contributions are welcome! This is a minimal project by design:
- Keep it simple
- No frameworks or build tools
- Maintain the single-file frontend approach
Built with:
- Express β Web framework
- tmux β Terminal multiplexer
- Claude Code β AI coding assistant
Made with β€οΈ for developers managing multiple AI agents
