mBm TUI (mbm2)
Menu

Agents And Models

Built-in agent Description the runtime gives Asks before Never does Colour
build The default agent. Executes tools based on configured permissions. Paths outside the project, .env reads, a call repeated in a loop — pink
safe Safe mode. Requires confirmation for all write operations. Every shell command, edit, write and patch, plus what build asks Allow always (not offered) green
plan Plan mode. Disallows all edit tools. As build Edit project files (plan files under .mbm/plans/ excepted) orange

The agent a new run starts on is the runtime's default_agent when it sets one, else safe (the runtime lists it first), whatever build's description says; mbm2 --agent <name> picks another for one run. When a plan tool finishes — plan_exit or plan_enter — the client switches to build or plan for you, once per call.

Agents are defined by the runtime, not by mbm2: the client reads the runtime's list and shows what it gets. The table is the bundled runtime's default set; you can add, change, hide or turn off agents with a markdown file such as .mbm/agents/pm.md or an mbm.json agent entry, and the runtime runs them with their own prompt, model and permission (Custom agents). Permissions are enforced by the runtime; the client draws and answers its requests (Permissions and questions).

Switch The Agent

Action Key (default) Slash command
Next primary agent tab (previous: unbound; shift+tab switches tabs) —
Pick from a list <leader>a /agents
Hand one task to a subagent @ and its name in the prompt —

Example: a review before a change.

  1. Press tab until the metadata row reads Plan · <model> <provider>.
  2. Ask Review internal/cart for rounding bugs and propose a fix. The agent reads and answers; it cannot edit.
  3. Press tab until it reads Build · … and say Apply the fix you proposed.

The switch applies to your next message; the session keeps its history. <leader>a opens Select agent with each agent's description; return picks, the current one is marked.

The prompt's left stripe and the agent name take the agent's colour, so a glance tells you which rules are in force. The colours come from the runtime's agent definitions.

Subagents

Subagents are agents the runtime marks for delegation, such as general, explore and docs in the bundled runtime. They are not in the tab cycle. Two ways to use one:

Way Example
Mention it @explore list every place that writes to the orders table
Let the agent delegate The primary agent starts a subagent itself; a task block appears in the transcript

A subagent works in a child session of yours. <leader>down (or a click on the task block) goes to the first child; while you view a child session, right / left move to the next / previous child and up returns to the parent — also clickable as Next, Prev and Parent in the child's footer. The subagent's permission requests and questions are answered in the parent (Permissions and questions).

Choose A Model

Action Key (default) Slash command or flag
Pick a model <leader>m /models
Next / previous recent model f2 / shift+f2 —
Mark the highlighted model as a favourite ctrl+f in Select model —
Open Connect a provider from the model list ctrl+a in Select model; with nothing connected the list ends with Popular providers —
Cycle the model's variants ctrl+alt+w (v1: ctrl+t) /variants (only when the model has variants)
Connect a provider — /connect
Start with a model for this run — mbm2 --model provider/model

Example: compare two models on the same question.

  1. <leader>m, type sonnet, return. Ask the question.
  2. <leader>m, pick another model, return. Ask a follow-up; the new model sees the whole session.
  3. f2 goes back to the previous model; shift+f2 forward again.

A variant is a model setting such as a reasoning level. /variants opens Select variant with Default first; the chosen variant is shown at the end of the metadata row, for example Build · <model> <provider> · high. Recents, favourites and variants are kept in the client's model preferences file and shared with v1. --model wins over the stored choice for that run only.

Connect A Provider

  1. /connect opens Connect a provider. Type to filter, return picks; + Add account adds a second key or sign-in of a provider.
  2. Select auth method lists the provider's ways to sign in (for example an API key, or for OpenAI the ChatGPT browser and headless sign-ins).
  3. Paste the key and press return. The runtime stores it, not mbm2.
  4. /models now lists that provider's models; an account is listed as <provider> · <label>.

Every step, with examples: Connect.

Without any provider, commands that need a model say so, for example Connect a provider to summarize this session for /compact.

MCP Servers

/mcps opens MCPs: each MCP server the runtime knows, with its state. space turns the highlighted server on or off for the runtime; ctrl+e edits and ctrl+d removes it; the last row, + Add server, adds one by form or pasted JSON and starts it at once (Configuration cookbook). /status (<leader>s) shows MCP and LSP servers, formatters and plugins with their state.

Agents In Worker Tabs

A session worker pins its own agent and, optionally, its model, so one tab can plan while another builds:

{ "workers": [
  { "name": "planner", "kind": "session", "agent": "plan" },
  { "name": "builder", "kind": "session", "agent": "build", "model": "anthropic/claude-sonnet-4-5" }
] }

Pitfalls

Symptom Cause and fix
tab inserted a completion instead of switching The @ or / list was open; esc closes it, then tab
/variants is missing The current model offers no variants
A subagent is not in the tab cycle By design; mention it with @
plan cannot write the plan you asked for It may write only Markdown plan files under .mbm/plans/; ask for that path
The model changed back on restart --model applies to one run; pick it with <leader>m to keep it

Published from revision f88fc66f 2026-11-30