Skip to main content

Launching the TUI

# Launch with a config
docker agent run agent.yaml

# Start with an initial message
docker agent run agent.yaml "Help me refactor this code"

# Auto-approve all tool calls
docker agent run agent.yaml --yolo

# Enable debug logging
docker agent run agent.yaml --debug

Keyboard shortcuts

ShortcutAction
Ctrl+KOpen command palette
Ctrl+MSwitch model
Ctrl+RIncremental history search
Ctrl+YToggle yolo (auto-approve) mode
Ctrl+OToggle hide tool results
Ctrl+SCycle to next agent
Ctrl+BToggle sidebar
Ctrl+GOpen external editor
Ctrl+ZSuspend TUI to background (resume with fg)
Ctrl+XClear queued messages
Ctrl+TNew tab
Ctrl+NNext tab
Ctrl+PPrevious tab
Ctrl+WClose tab
EscapeCancel current operation
EnterSend message
Shift+EnterInsert newline (or Ctrl+J as fallback)
TabSwitch focus between content and editor
Voice input (/speak) is available as a slash command on macOS only, using the system microphone via the OpenAI transcription API.

Slash commands

Type / during a session to see available commands, or press Ctrl+K for the command palette:
CommandDescription
/newStart a new conversation
/compactSummarize the current conversation (optional: /compact [instructions])
/copyCopy the conversation to clipboard
/copy-lastCopy the last assistant response to clipboard
/exportExport the session as HTML (optional: /export [filename])
/sessionsBrowse and load past sessions
/modelChange the model for the current agent
/themeChange the color theme
/yoloToggle automatic tool call approval
/permissionsShow tool permission rules for this session
/titleSet or regenerate session title (optional: /title [new title])
/attachAttach a file to your message (optional: /attach [path])
/shellStart a shell
/starToggle star on current session
/split-diffToggle split diff view mode
/costShow detailed cost breakdown for this session
/evalCreate an evaluation report (optional: /eval [filename])
/exitExit the application
/quit or /qQuit the application (aliases for /exit)
/speakStart speech-to-text transcription (macOS only)

File attachments

Attach file contents to your messages using the @ trigger:
1

Type @ to open the file menu

The file completion menu opens and respects .gitignore.
2

Start typing to filter files

Type to narrow the list, then select a file.
3

The reference is inserted

The UI shows the reference; the agent receives the full file contents in a structured <attachments> block.
# Example: in the chat input
Explain what the code in @pkg/agent/agent.go does

Session management

Docker Agent automatically saves sessions. Use /sessions to browse past conversations.
  • Browse past sessions with search and filtering
  • Star important sessions with /star
  • Branch conversations by editing any previous user message — the original history is preserved
  • Resume a session with docker agent run config.yaml --session <id>
  • Relative refs: --session -1 for the last session, -2 for the one before

Session title editing

Titles are auto-generated from your first message. Override them at any time:
# In the chat input:
/title                     # Regenerate title using AI
/title My Custom Title     # Set a specific title
Or click the pencil icon next to the title in the sidebar.
Manually set titles are preserved and won’t be overwritten by auto-generation.

Runtime model switching

Change the AI model mid-session with /model or Ctrl+M. Select from config models or type a custom provider/model string. The switch is saved with the session and restored on reload.

Multi-session tabs

Run multiple agent sessions simultaneously in separate tabs within the same TUI window.
ActionShortcut
New tabCtrl+T
Next tabCtrl+N
Previous tabCtrl+P
Close tabCtrl+W
Each tab has an independent conversation, model, and working directory. Tabs can be restored on next launch by enabling restore_tabs in your user config.
Enable tab restoration in ~/.config/cagent/config.yaml:
settings:
  restore_tabs: true

Editable messages

Click any previous user message to edit it. The agent re-processes from that point; the original session history is preserved as a branch. Press Ctrl+R to enter incremental history search. Start typing to filter previous inputs, then press Enter to select or Escape to cancel.

Tool permissions

When an agent calls a tool, Docker Agent shows a confirmation dialog. You can:
  • Approve once — allow this specific call
  • Always allow — permanently approve this tool/command for the session
  • Deny — reject the tool call
Pattern-based matching means “Always allow” approves only that exact pattern. Other commands from the same tool still require confirmation.
Use --yolo or the /yolo command to auto-approve all tool calls. You can toggle this mid-session.

Theming

Built-in themes

default, catppuccin-latte, catppuccin-mocha, dracula, gruvbox-dark, gruvbox-light, nord, one-dark, solarized-dark, tokyo-night Switch themes interactively with /theme.

Custom themes

Create theme files in ~/.cagent/themes/ as YAML. Theme files are partial overrides — omitted keys fall back to the built-in default theme.
# ~/.cagent/themes/my-theme.yaml
name: "My Custom Theme"

colors:
  background: "#1a1a2e"
  background_alt: "#16213e"
  text_bright: "#ffffff"
  text_primary: "#e8e8e8"
  text_secondary: "#b0b0b0"
  text_muted: "#707070"
  accent: "#4fc3f7"
  brand: "#1d96f3"
  success: "#4caf50"
  error: "#f44336"
  warning: "#ff9800"
  info: "#00bcd4"

# Optional: syntax highlighting
chroma:
  comment: "#6a9955"
  keyword: "#569cd6"
  literal_string: "#ce9178"

# Optional: markdown rendering
markdown:
  heading: "#4fc3f7"
  link: "#569cd6"
  code: "#ce9178"
Apply a theme in your user config (~/.config/cagent/config.yaml):
settings:
  theme: my-theme
Custom themes hot-reload when you save the file — no restart needed.
User themes are layered on top of default, not on top of another built-in theme. To base your theme on dracula, copy its full YAML from the built-in themes into ~/.cagent/themes/ and edit the copy.

Build docs developers (and LLMs) love