Skip to content

Commit 7fe042b

Browse files
authored
Merge pull request #3451 from docker/feat/board-kanban-tui
feat: add docker agent board, a Kanban TUI for orchestrating agents
2 parents a74dbe5 + 9e6f0a7 commit 7fe042b

28 files changed

Lines changed: 5060 additions & 0 deletions

cmd/root/board.go

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
package root
2+
3+
import (
4+
"github.com/spf13/cobra"
5+
6+
boardtui "github.com/docker/docker-agent/pkg/board/tui"
7+
"github.com/docker/docker-agent/pkg/telemetry"
8+
)
9+
10+
// newBoardCmd creates the `docker agent board` command: a Kanban TUI that
11+
// orchestrates one agent per card, each running in a tmux session on an
12+
// isolated git worktree. Projects and column prompts are configured in the
13+
// user's global config file, or from the TUI itself.
14+
func newBoardCmd() *cobra.Command {
15+
cmd := &cobra.Command{
16+
Use: "board",
17+
Short: "Orchestrate agents on a Kanban board",
18+
Long: `Board is a Kanban TUI for orchestrating agents. Each card launches an agent
19+
in a tmux session on an isolated git worktree, and moving a card forward
20+
through the pipeline (Dev → Review → Push → Done) sends the
21+
destination column's prompt to its agent.
22+
23+
Projects and column prompts are stored in the global config file
24+
(~/.config/cagent/config.yaml) and can be managed from the TUI.`,
25+
Example: ` docker-agent board`,
26+
Args: cobra.NoArgs,
27+
GroupID: "core",
28+
SilenceUsage: true,
29+
RunE: func(cmd *cobra.Command, _ []string) error {
30+
telemetry.TrackCommand(cmd.Context(), "board", nil)
31+
applyTheme("")
32+
return boardtui.Run(cmd.Context())
33+
},
34+
}
35+
return cmd
36+
}

cmd/root/root.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -168,6 +168,7 @@ We collect anonymous usage data to help improve docker agent. To disable:
168168
newDebugCmd(),
169169
newAliasCmd(),
170170
newSandboxCmd(),
171+
newBoardCmd(),
171172
newServeCmd(),
172173
newAskpassCmd(),
173174
)

docs/features/board/index.md

Lines changed: 83 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,83 @@
1+
---
2+
title: "Kanban Board"
3+
description: "Orchestrate multiple agents from a Kanban TUI: each card runs an agent in a tmux session on an isolated git worktree."
4+
keywords: docker agent, ai agents, features, board, kanban, orchestration
5+
linkTitle: "Kanban Board"
6+
weight: 15
7+
canonical: https://docs.docker.com/ai/docker-agent/features/board/
8+
---
9+
10+
_Board is a Kanban TUI for orchestrating agents. Each card launches an agent
11+
in a tmux session on an isolated git worktree, and moving a card forward
12+
through the pipeline sends the destination column's prompt to its agent._
13+
14+
## Launching the board
15+
16+
```bash
17+
$ docker agent board
18+
```
19+
20+
Requirements: `tmux` and `git` must be installed.
21+
22+
## How it works
23+
24+
- **Cards run agents.** Creating a card (`n`) launches `docker agent run` in
25+
a dedicated tmux session, working in a fresh git worktree branched from the
26+
project's upstream default branch. The card's title, running/idle status,
27+
and failures are mirrored live from the agent's control plane.
28+
- **Columns are a pipeline.** The default pipeline is
29+
Dev → Review → Push → Done. Moving a card forward (`]`)
30+
sends the destination column's prompt to the card's agent; moving it back
31+
(`[`) sends nothing.
32+
- **Attach anytime.** Press `enter` (or double-click a card) to attach your
33+
terminal to the agent's session and interact with it directly; `ctrl+q`
34+
detaches and returns to the board.
35+
- **Everything is recoverable.** Quitting the board leaves agents running in
36+
tmux; restarting it reattaches to them. If an agent process dies, the board
37+
relaunches it and resumes the same conversation and worktree.
38+
39+
## Key bindings
40+
41+
| Key | Action |
42+
| ------------- | --------------------------------------------------- |
43+
| `n` | Create a card (project + prompt) |
44+
| `enter` | Attach to the card's agent (`ctrl+q` detaches) |
45+
| `d` | View the card's worktree diff |
46+
| `o` | Open the card's worktree in `$BOARD_EDITOR` (`code`) |
47+
| `[` / `]` | Move the card back / forward |
48+
| `x` | Delete the card, its session, worktree, and branch |
49+
| `p` | Manage projects |
50+
| `e` | Edit the selected column's prompt |
51+
| `←↓↑→` `hjkl` | Navigate |
52+
| mouse | Click selects, double-click attaches, wheel scrolls |
53+
| `?` | Help |
54+
| `q` | Quit (agents keep running) |
55+
56+
## Configuration
57+
58+
Everything is configured in the global config file
59+
(`~/.config/cagent/config.yaml`) or through the TUI itself (`p` for projects,
60+
`e` for column prompts):
61+
62+
```yaml
63+
board:
64+
projects:
65+
- name: my-app
66+
path: /Users/me/src/my-app
67+
agent: coder # any agent ref; defaults to the built-in agent
68+
columns:
69+
- id: dev
70+
name: Dev
71+
emoji: 🔨
72+
- id: review
73+
name: Review
74+
emoji: 🔍
75+
prompt: Review the local changes and fix any issues you find.
76+
- id: done
77+
name: Done
78+
emoji:
79+
```
80+
81+
Omitting `columns` keeps the default pipeline. When a card enters a column
82+
with a `prompt`, that prompt is delivered to the card's agent as its next
83+
message.

0 commit comments

Comments
 (0)