# 24 Built-in Agent CLIs, Herdr PTYs & CLI

> Canban runs native coding agent CLIs inside persistent Herdr PTY terminals (`herdr-core`) rendered with `libghostty-vt`, preserving every tool's native TUI, MCP servers, skills, permissions, and conversation resume.

## Zero-interference native TUI, MCP & skill preservation

Rather than reimplementing provider chat wrappers or injecting fragile `Stop` hooks, Canban launches your chosen CLI inside a `herdr-core` (`hc`) supervised PTY:

- **Native TUIs & Controls**: Interact directly with the agent's own terminal UI via `libghostty-vt` (rendered in native AppKit/CoreText on macOS and GTK4 on Linux, with SGR/pixel mouse reporting, OSC 8 hyperlinks, and 17 dark themes including Monokai).
- **MCPs, Skills & Permissions Intact**: Because the real CLI binary executes in the Card worktree with your home configuration, existing MCP servers, custom skills, sandbox flags, and auth logins work unchanged.
- **Restart-Safe PTYs & Exact Resume**: Closing Canban, restarting `canband`, or live-upgrading the app leaves running `herdr-core` sessions alive. Finished sessions can resume exact provider conversation IDs (`--resume`, `--session`, or `--conversation`) when supported.
- **Global Scheduler Budget**: Automatic workflow steps share a configurable concurrency limit (`scheduler.max_agents`, default `8`), while manual shells and `script` steps run outside the agent budget.

![Canban Card #2 running a native @developer CLI session inside a persistent Herdr PTY terminal alongside card activity, Hold auto-merge, and workflow progress.](https://canban.dev/screenshots/board-terminal.png)

*Live @developer Herdr PTY running cargo test inside Card #2's isolated Git worktree (acme-api-f4c9/2), waiting for explicit canban report completion.*

## All 24 built-in CLI agents

Canban's catalog (`crates/profiles/src/catalog.rs`) includes 24 official interactive CLI presets matching Herdr's terminal detector and resume planner, plus custom profiles in `config/agents.json` and dynamic `herdr:<template>` profiles:

| ID | Agent | Binary | Exact Resume | Model / Effort Args |
| --- | --- | --- | --- | --- |
| `codex` | Codex | `codex` | Yes (`resume`) | `-m`, reasoning effort |
| `claude` | Claude Code | `claude` | Yes (`--resume`) | `--model`, `--effort` |
| `agy` | Antigravity | `agy` | Yes (`--conversation`) | `--model`, `--effort` |
| `gemini` | Gemini CLI | `gemini` | Yes (`--resume`) | `-m` |
| `opencode` | OpenCode | `opencode` | Yes (`--session`) | `-m`, `--variant` |
| `cursor` | Cursor Agent | `cursor-agent` | Yes (`--resume`) | `--model` |
| `pi` | Pi | `pi` | Yes (`--session`) | `--model`, `--thinking` |
| `omp` | Omp | `omp` | Yes (`--resume=`) | `--model` |
| `copilot` | GitHub Copilot | `copilot` | Yes (`--resume=`) | `--model` |
| `droid` | Droid | `droid` | Yes (`--resume`) | `-m` |
| `amp` | Amp | `amp` | Fresh launch | — |
| `kimi` | Kimi | `kimi` | Yes (`--session`) | `--model` |
| `kiro` | Kiro | `kiro-cli` | Fresh launch | `--model` |
| `qwen` | Qwen Code | `qwen` | Yes (`--resume`) | `-m` |
| `devin` | Devin | `devin` | Yes (`--resume`) | — |
| `cline` | Cline | `cline` | Fresh launch | — |
| `grok` | Grok | `grok` | Yes (`--resume`) | `-m` |
| `hermes` | Hermes | `hermes` | Yes (`--resume`) | `-m` |
| `kilo` | Kilo | `kilo` | Yes (`--session`) | `-m` |
| `qodercli` | Qoder | `qodercli` | Yes (`--resume`) | `--model` |
| `letta` | Letta | `letta` | Yes (`--conversation`) | `-m` |
| `mastracode` | Mastra Code | `mastracode` | Yes (`--thread`) | `--model` |
| `maki` | Maki | `maki` | Fresh launch | — |
| `muse` | Muse | `muse` | Fresh launch | — |

## Interactive takeover with canban card adopt

When you start exploring a `Backlog` Card in an interactive terminal or `@mention` session and decide to move ahead with implementation in that same conversation, the agent does not need to lose its context or spawn a duplicate session:

```sh
"$CANBAN_CLI" card update --file "$CANBAN_RUN_DIR/card.md"
"$CANBAN_CLI" card adopt --stage develop
```

- `card adopt` automatically passes inherited `HC_TERMINAL_ID` and `HC_SESSION` context to `AppServer`.
- `AppServer` verifies the Core, machine, live PTY, Profile, and Card workspace, transitions the Card to `develop` (`reason: "agent_adopted_stage"`) without launching a second Agent, and binds the existing live PTY directly to the `WorkflowRun` step.
- When the agent later runs `canban report --state completed`, the workflow proceeds seamlessly to `Review` and `Queue Merge`.

## Injected canban CLI reference

Canban injects `CANBAN_CLI`, `CANBAN_ENDPOINT`, `CANBAN_HOME`, `CANBAN_CARD`, `CARD_ID`, `CANBAN_PROJECT`, `CANBAN_PROFILE_ID`, and `CANBAN_RUN_DIR` into every launched session:

```sh
# Inspect or update the current Card
"$CANBAN_CLI" card show --fields number,title,body,stage,revision
"$CANBAN_CLI" card update [--title 'Updated title'] --file "$CANBAN_RUN_DIR/card.md"

# Report execution outcome (completed | backlog | blocked | failed | working)
"$CANBAN_CLI" report --state completed --message 'Summary' --file "$CANBAN_RUN_DIR/report.md"

# Reply to a follow-up question without ending the active task
"$CANBAN_CLI" reply --to <QUESTION_ID> --file "$CANBAN_RUN_DIR/reply.md"

# Stage local diff review comments without publishing directly to GitHub
"$CANBAN_CLI" review draft --file "$CANBAN_RUN_DIR/review_draft.json"

# Call any AppServer JSON-RPC method
"$CANBAN_CLI" call card.list '{"project_id":"<PROJECT_ID>","stage":"develop","limit":50}'
```

For the full command matrix, Agent-first `--fields` / `request_key` contract, and `--human` examples, see [Canban CLI, Agent Optimization & --human](/docs/cli/).
