## §OIP SYSTEM ARTICLE — Agents (12 operations)
A generated article for one OIP shelf. It lists every operation in this API/CLI/MCP/device/model/core subsystem, links each leaf article, and gives the ledger path for proof.

### Read Order
- scan operations
- open a leaf doc
- run via run_now or POST /api/dispatch
- open receipt
- repair/replay if needed

### Operations
- **AGENT_IMPORT** — Cannibalize an agent definition (md frontmatter name/description/model/tools) into a proposed agent row. PROPO
  when: you need to agent import
  args: source(url|r2:key|raw)|category
  doc: https://miscsubjects.com/api/dispatch?key=AGENT_IMPORT&format=markdown
  run: https://miscsubjects.com/api/dispatch?invoke=AGENT_IMPORT&body=%3Csource(url%3E%7C%3Cr2%3Akey%3E&share=<TOKEN>
  history: https://miscsubjects.com/api/invocations?object_id=AGENT_IMPORT
- **AGENT_SPAWN** — Spawn a resident agent that loops on a goal until done (durable, survives Mac sleep)
  when: you need to agent spawn
  args: goal|brain|maxSteps
  doc: https://miscsubjects.com/api/dispatch?key=AGENT_SPAWN&format=markdown
  run: https://miscsubjects.com/api/dispatch?invoke=AGENT_SPAWN&body=%3Cgoal%3E%7C%3Cbrain%3E%7C%3CmaxSteps%3E&share=<TOKEN>
  history: https://miscsubjects.com/api/invocations?object_id=AGENT_SPAWN
- **AGENT_LIST** — List resident agents and their live status
  when: you need to agent list
  args: none
  doc: https://miscsubjects.com/api/dispatch?key=AGENT_LIST&format=markdown
  run: https://miscsubjects.com/api/dispatch?invoke=AGENT_LIST&share=<TOKEN>
  history: https://miscsubjects.com/api/invocations?object_id=AGENT_LIST
- **AGENT** — Control a resident agent
  when: you need to agent
  args: op(status|send|pause|resume|kill|events)|id|msg
  doc: https://miscsubjects.com/api/dispatch?key=AGENT&format=markdown
  run: https://miscsubjects.com/api/dispatch?invoke=AGENT&body=%3Cop(status%3E%7C%3Csend%3E%7C%3Cpause%3E&share=<TOKEN>
  history: https://miscsubjects.com/api/invocations?object_id=AGENT
- **AGENT_LEARN** — save a lesson/working pattern to an agent persistent memory. Args: agent|lesson.
  when: the user says something works, prefers a style, or gives feedback worth keeping.
  doc: https://miscsubjects.com/api/dispatch?key=AGENT_LEARN&format=markdown
  run: https://miscsubjects.com/api/dispatch?invoke=AGENT_LEARN&body=%3Carg1%3E%7C%3Carg2%3E&share=<TOKEN>
  history: https://miscsubjects.com/api/invocations?object_id=AGENT_LEARN
- **AGENT_RECALL** — load an agent saved lessons/patterns. Arg: agent.
  when: at the start of a creative job, to apply what worked before.
  doc: https://miscsubjects.com/api/dispatch?key=AGENT_RECALL&format=markdown
  run: https://miscsubjects.com/api/dispatch?invoke=AGENT_RECALL&body=%3Carg1%3E&share=<TOKEN>
  history: https://miscsubjects.com/api/invocations?object_id=AGENT_RECALL
- **AGENT_BRIDGE** — 
  doc: https://miscsubjects.com/api/dispatch?key=AGENT_BRIDGE&format=markdown
  run: https://miscsubjects.com/api/dispatch?invoke=AGENT_BRIDGE&body=%3Carg1%3E%7C%3Carg2%3E%7C%3Carg3%3E&share=<TOKEN>
  history: https://miscsubjects.com/api/invocations?object_id=AGENT_BRIDGE
- **AGENT_TURNS** — last N agent turns across all CLI agents (claude, codex, grok, …). $1 = agent id or "all", $2 = limit (default
  when: "what did codex do", "show agent turns", cross-agent audit.
  doc: https://miscsubjects.com/api/dispatch?key=AGENT_TURNS&format=markdown
  run: https://miscsubjects.com/api/dispatch?invoke=AGENT_TURNS&body=claude%7C5&share=<TOKEN>
  history: https://miscsubjects.com/api/invocations?object_id=AGENT_TURNS
- **AGENT_TURNS_TRACE** — agent turns linked to one ledger trace_id. $1 = trace_id, $2 = limit (default 20).
  when: "what CLI agents ran on this trace", incident/debug linkage.
  doc: https://miscsubjects.com/api/dispatch?key=AGENT_TURNS_TRACE&format=markdown
  run: https://miscsubjects.com/api/dispatch?invoke=AGENT_TURNS_TRACE&body=t_abc123%7C10&share=<TOKEN>
  history: https://miscsubjects.com/api/invocations?object_id=AGENT_TURNS_TRACE
- **AGENT_TURNS_ISSUES** — agent turns matching issue tags (risk, protected, file_edit, unaudited, audit_fail). $1 = tag, $2 = limit.
  when: "show risky agent turns", "unaudited codex turns", filterable issue triage.
  doc: https://miscsubjects.com/api/dispatch?key=AGENT_TURNS_ISSUES&format=markdown
  run: https://miscsubjects.com/api/dispatch?invoke=AGENT_TURNS_ISSUES&body=risk%7C20&share=<TOKEN>
  history: https://miscsubjects.com/api/invocations?object_id=AGENT_TURNS_ISSUES
- **AGENT_TURNS_FILTER** — multi-filter agent turn query. $1=agent|all, $2=tag|risk|all, $3=limit.
  when: cross-agent issue board, "gemini risk turns", audit backlog.
  doc: https://miscsubjects.com/api/dispatch?key=AGENT_TURNS_FILTER&format=markdown
  run: https://miscsubjects.com/api/dispatch?invoke=AGENT_TURNS_FILTER&body=codex%7Crisk%7C15&share=<TOKEN>
  history: https://miscsubjects.com/api/invocations?object_id=AGENT_TURNS_FILTER
- **AGENT_SPAWN_CLI** — 
  doc: https://miscsubjects.com/api/dispatch?key=AGENT_SPAWN_CLI&format=markdown
  run: https://miscsubjects.com/api/dispatch?invoke=AGENT_SPAWN_CLI&body=%3Carg1%3E%7C%3Carg2%3E%7C%3Carg3%3E%7C%3Carg4%3E%7C%3Carg5%3E&share=<TOKEN>
  history: https://miscsubjects.com/api/invocations?object_id=AGENT_SPAWN_CLI

### Troubleshooting
- If a row's example has placeholders, replace only the placeholder values and preserve separators.
- If a call fails, open its receipt and repair it with POST /api/dispatch {key, body, repairs:'inv_ID'}.
- If token scope denies this system, ask the owner for a row:/rows:/pfx: token scoped to the exact operation set.

Back to the tree: https://miscsubjects.com/api/dispatch?map=1&format=markdown