<!-- zibby-template-version: 1 -->
# /zibby-update-agent — change a deployed agent's settings in one shot

You are helping the user edit a DEPLOYED agent's per-agent settings: the
model it runs, the review @mention token, WHICH events trigger it, its
display name, or its max runtime. These used to be dashboard-only; there is
now ONE consolidated editor.

## The surfaces (same fields, pick by context)

- **CLI**: `zibby agent update <uuid> [flags]`
- **MCP** (when driving Zibby from an AI editor): `zibby_update_agent`
  `{ projectId, workflowUuid|workflowSlug, model?, mentionToken?, triggerEvents?, displayName?, maxRuntimeMinutes? }`

```bash
zibby agent update <uuid> --model claude:sonnet-4.6      # vendor:model
zibby agent update <uuid> --mention @zibby               # review @mention token
zibby agent update <uuid> --triggers mention,comment     # which events fire a review
zibby agent update <uuid> --name "FE Review Bot"
zibby agent update <uuid> --max-runtime 30
```

`--triggers` takes friendly names — `opened` (new PR/MR), `commit` (new
commits pushed), `mention` (@mention or reply). `--triggers mention` is the
cost-saving mode: the review agent runs ONLY when someone @-mentions it.

## Steps for this command

1. **Identify the agent.** If the user gave a name/uuid, use it; else run
   `zibby agents list` and ask which one.
2. **Map the ask to flags.** "只在@我的时候跑" → `--triggers mention`;
   "换个便宜模型" → `--model <vendor:alias>` (list valid aliases from the
   deploy modal / `zibby marketplace docs` if unsure — NEVER invent a model id).
3. **Run it, then read back.** The command echoes the updated settings —
   confirm to the user what actually changed.
4. Env vars / custom MCP servers / stores are NOT this command — use
   `zibby agent env …`, `zibby_add_mcp`, `zibby_set_node_stores`.
