Documentation

Agents

Built-in agents, /model, /agent, modes and effort.

Built-in agent registry

Defined in src/acp/agent-launch.ts. The /agent picker only lists agents whose required binaries are on PATH.

IdLabelLaunchRequires
grok-buildgrokgrok agent stdiogrok
claudeclaudenpx -y @agentclientprotocol/claude-agent-acp@0.64.0npx, claude
codexcodexnpx -y @agentclientprotocol/codex-acp@1.1.7npx, codex
opencodeopencodeopencode acpopencode

Adapter pins (npm) — TOML [agents] or env override:

TOML / envDefault
agents.claude_acp_pkg / ACPBOT_CLAUDE_ACP_PKG@agentclientprotocol/claude-agent-acp@0.64.0
agents.codex_acp_pkg / ACPBOT_CODEX_ACP_PKG@agentclientprotocol/codex-acp@1.1.7

Upstream: claude-agent-acp, codex-acp.

Aliases (normalized before launch):

InputCanonical
grok, xai, grok-buildgrok-build
claude-code, claude-acpclaude
opencode-ai, open-codeopencode

Overrides

default_agent = "grok-build"

[agents]
# command_json = '{"grok-build":{"command":"grok","args":["agent","stdio"]}}'
# claude_acp_pkg = "@agentclientprotocol/claude-agent-acp@0.64.0"

JSON command overrides merge on top of the built-in registry (same shape: command + args).

Backend

The worker always uses real ACP agents (realAgents → acp-host by default).
Unit tests may still import echoAgents as an in-memory fake.

/agent — switch process mid-session

  • Shows a picker of available agents (+ any ids from agents.command_json)
  • Or /agent <id>
  • Respawn the agent for this topic; persists identity.agent
  • Mid-turn: cancel then switch
  • With acp-host, ensure reattaches/respawns the slot for the new agent

/model — switch LLM

Sources of model lists (first available wins in practice):

  1. ACP session.models / model notifications (e.g. Grok Build session/set_model)
  2. ACP configOptions with model category + session/set_config_option
  3. Canned fallbacks for known agents (and spawn -m / env where applicable)

Usage:

  • /model → button list
  • /model <value> → set directly
  • Mid-turn cancels the turn, then applies

/status shows Agent, Launch, Mode, Model, Effort, and Permissions as distinct fields.

Tool permissions (ask vs bypass)

Separate from session mode (plan/build). Controls whether tool calls show Telegram approve buttons.

SettingEffect
ask (default)Each tool permission → Telegram keyboard (message deleted after you answer)
bypassAuto-allow tools (Grok: --always-approve + yoloMode; all agents: host auto-allow)

Duplicate concurrent prompts for the same action are coalesced (one keyboard).

Config (config.toml):

[features]
permission_mode = "ask"            # or "bypass"

Setup TUI asks once on acpbot setup.

Slash commands:

CommandScope
/permissionsStatus (default + this topic)
/permissions ask|bypassThis topic only
/permissions default ask|bypassNew topics (persists under state_dir/permission-mode.json)

Changing a topic’s policy re-ensures the agent slot so Grok spawn flags apply.

FieldMeaning
ModePermission / plan mode — Codex/Claude session.modes, OpenCode config mode, or Grok built-in default/plan/ask
EffortReasoning effort when advertised — e.g. Grok high/medium/low

Grok Build (source of truth)

From xai-org/grok-build:

Wire surfaceMeaning
_meta["x.ai/sessionConfig"] options with category: "mode"Reasoning effort only (high/medium/low…) — not permission mode
session/new.modesNot set (NewSessionResponse is models + meta only)
session/set_modeReal session modes: default, plan, ask (SessionMode in xai-grok-tools)
current_mode_updateEmitted when plan/default/ask changes

acpbot seeds Grok’s mode catalog as default / plan / ask so /mode, /plan, and /build work. Effort stays on /effort.

Modes (permission)

CommandIntent
/planPlan / read-only-ish mode
/buildBuild / tools-on mode
/modePicker or /mode <id> / toggle

Modes come from:

  1. ACP session.modes / session/set_mode (Codex, Claude)
  2. ACP configOptions with id/category "mode" (OpenCode: build / plan)

Reasoning effort is not a permission mode — use /effort when the agent advertises it.

Effort (reasoning)

CommandIntent
/effortPicker of advertised levels (ids only, e.g. high / medium / low)
/effort <level>Set directly

Sources depend on the agent:

  • Grok Build — session config under _meta (category often labeled "mode" in the agent payload; treated as effort)
  • OpenCodeconfigOptions with id effort / category thought_level when the model has variants

Setting uses ACP session/set_mode or session/set_config_option as appropriate. UI shows level ids, not marketing labels.

Skills

acpbot ships telegram and schedules. Install globally so every agent CLI sees them:

acpbot skills install   # once — not on every worker start

Works from the release binary (skills are embedded). Telegram /skills also discovers them without a global install.

/skills (topic) discovers collections from:

  • Bundled skills root (package skills/ or materialised under ~/.local/share/acpbot/bundled-skills/)
  • Session cwd (.agents/skills, .grok/skills, …)
  • [skills].roots / ACPBOT_SKILL_ROOTS (extra dirs)
  • Defaults under $HOME: .grok/skills, .grok/bundled/skills, .agents/skills, .claude/skills

Pick a skill, then send a prompt that includes it for the agent. Full write-up: Skills.

acp-host notes

acp-host is required (worker fails boot without a live host socket):

  • Agent stdio lives in the host process
  • Worker restart does not kill agents
  • Host SIGTERM disposes all agent processes
  • /agent changes go through host ensure + optional respawn RPCs

See Architecture.