Skip to main content

AGENTS_TOOL

Constant AGENTS_TOOL 

Source
pub(crate) const AGENTS_TOOL: &str = r#"{
  "name": "Agents",
  "description": "Other agents: who is reachable, what they are doing, and opening them; and your own past conversations and your own context (how full it is, and compacting it); and the environment variables an agent launches with. Every call takes an action. list: every agent reachable from here across host, LAN and cloud, as JSON: host.addressable (reachable right now by local delivery), host.agents (this host's directory, each with an addressable flag, its block_id and its seat: {role (leader, worker, specialist, platform_tester, analyst or super), qualifier, lead: {id, name}, area}, set by the operator or by an agent (set_seat), null when it has none; lead null means it reports to the operator, and a spawned worker without a seat shows role worker, qualifier spawned and its leader as lead; and its availability: {state, would (deliver or hold: what a routine message does now), reason and retry_when when it can't work, resets_at_ms for a limit, usage (how much of each usage window of the agent's account is used, by window: used_percent, resets_at_ms, age_ms; absent when none is known), pane (shown, not_in_window (its workspace is open in no window), parked or none), wanted (running, stopped or unset), api (online, degraded, offline, unchecked or not_tracked)}, so you know before sending that a message will be held; and its runtime: {state (stopped, starting, idle, working, waiting_on_user, limited, signed_out or error), desired (running or stopped), block_id, and blocked: why a start would be refused now, for a stopped agent that is wanted running or has a message waiting, kept for an agent with no pane too}, and spend: {spent_usd, cap_usd, stopped} for an agent on a model route (what it has used through the route today, its daily cap, and whether the cap is used: the gateway then refuses its requests), null for any other: every created agent is listed, running or not), lan (LAN peers and their agents, with each agent's seat in agent_seats by lower-cased name), and wan.local_agents_subscribed (THIS host's own agents subscribed to the cloud relay — not remote agents you can reach: the relay has no directory, so a cloud-only target appears nowhere here). A block_id is what Message broadcast and Stop agents take as targets; names are case-insensitive. list can narrow, page and add live facts, all optional: state (stopped, starting, idle, working, waiting_on_user, limited, signed_out or error), model (part of the model id or its short name, case-insensitive; a leading ! means not this one, and keeps the agents whose model is not known), provider, runtime (native or container), account (part of its stable id or label), seat (part of its role, lead or area), limit and offset (a page: the answer's host.page says total, returned and whether it was cut), and fields (a comma list of groups, or all) or detail (basic, facts or full) for a facts object per agent. The groups: model (id, label, effort, source: effective when the agent's CLI reported it, observed from its last reply, route, requested when only what was asked for is known, or unknown; and pending_switch when a requested change is not yet confirmed), runtime (harness, native or container, image, permission mode, pane_shown), turn (active, since, duration, last activity, idle time), context (tokens, window, percent, auto-compact point, compactions, stale), account (its label), usage (its account's windows), spend, task (the Kanban tasks it holds), session (started, uptime) and host (this AgentMux's name, version, build and channel); detail facts is every group but host, full adds it. Every row also gets model_label and model_source, and nothing else changes when no parameter is given. A fact nothing says is absent, never a guess. Not exposed: message text, prompts, transcripts, credentials, tokens and account emails. status: the same agents as one compact glance: lines (one per agent: name | state | model effort | context percent | account usage | task), counts (by_state, by_model) and, with group_by (model, state, host, account, provider or runtime), the groups; it takes the same filters and limit. With host, list and status ask another machine: a LAN peer's name as list shows it, or all for this machine and every LAN peer at once (each asked in parallel, 3 seconds each; limit and offset apply to each machine). Every row says which host it is from, and a hosts block says for each machine whether it answered (state ok, unreachable, needs_upgrade or refused), its version, when its answer is from (as_of_ms, age_ms) and why not. A machine that does not answer, or runs a build too old to know the question, is listed by what the LAN poll already says (name, state, provider, kind) with facts liveness_only: no model, never a guess. The peer must be one that has pinned your key and whose install this machine trusts, as for the other actions with host; an agent reachable only through the relay is not readable at the field level. conversations: every agent's latest activity in one call. Host and cross-channel (other AgentMux channels on this host) entries have turn_active, last_activity_ms, a last_message_preview, state (host only; see below) and work: goal, repo, branch, uncommitted files, recent edits, todo summary and current tool (Presence who searches them). LAN and WAN entries are liveness-only (remote_fetch_required: true). transcript: the tail of one agent's session transcript, on this host or another channel on it (not LAN or WAN), and whether it has a turn in flight: {agent, block_id, tier, turn_active, lines: [...], truncated}. Read-only; it delivers nothing. open: launch an agent from My Agents into a new pane, in tab_id or the active tab, by name or definition id (from list). Templates are refused (TEMPLATE_NOT_OPENABLE: create an agent from the template in the agent picker first). If it is already open in that tab, its pane is returned with created: false. To open several at once give agents instead of agent: everything that can be checked is checked before the first opens, so a short room is refused whole (an agent that is not running must have room under the agent limit, and a batch never stops another agent to make room; the answer names which would fit). If one still fails to open, the panes this call created are closed again and the error says so; an agent that was already open or parked is left as it was. It starts a real provider process (a container agent's runs in its container) and spends tokens like any pane the user opens. Returns {block_id, tab_id, agent_id, provider, controller_type, status, created}; the agent can then be messaged. spawn: open a worker, a new agent you coach, in a pane to the right of yours: built from your own definition (your instructions, skills and provider), on the model you name, and send it brief as its first message, from you, so it can report back with Message send. It is not a fork (the pane's Fork is an exact copy that keeps your conversation): it starts without your conversation or your Personal Memory, with your definition, Global Memory, its own workspace and the brief you send, so the brief must stand on its own (name the spec's absolute path, what done means, and when to report). Use it when the user asks you to hand work to an agent you coach; coach it with Message send and check on it with transcript. It runs on your account unless you name another; if yours is out of quota or needs sign-in, it runs on another of the user's signed-in accounts and the answer says which. It goes ahead at once only when the user's own message in this turn asked for it (pass their words verbatim as user_instruction); otherwise the user sees a card in your pane with a 30 s countdown (Stop it, Start now, Always allow you) and it goes ahead when the countdown ends unless they stop it. To start several workers (at most 12 live at once) give workers instead of brief: one card lists them all, all start or none do, a short room is refused up front naming which would fit, and the briefs are sent only after every worker is open. A worker can't spawn, and you can have at most 12 open at once: close one with Stop pane when its work is done. It spends tokens until it is stopped. By default a worker runs as you do (a container agent starts container workers). To start a worker in a container from the host, give runtime: container, and optionally container_image (ghcr.io/agentmuxai/agent-base:developer or ghcr.io/agentmuxai/agent-base:latest), memory_mb and cpus; it is refused, with the reason, when Docker is not available. A container agent can start only container workers and cannot set limits. Returns {agent_id, name, message_to, block_id, tab_id, provider, model, effort, account, account_note, asked_user, runtime, container_image, brief}, where brief says whether the brief was delivered. Your workers report to you; when one goes quiet without reporting (nothing for 15 minutes, `agents:quietminutes`), waits for an answer, fails or stops, you get an [AgentMux] note. create: add a named agent to My Agents from a seeded template (template: its id, slug or name), the way the new-agent picker does, without the operator: it is not a worker, has no leader, is not started (open it with Agents open) and can be given a seat with set_seat. name is its name; runtime is native or container (default: the template's), with container_image, memory_mb and cpus for a container agent, as for spawn; account links an account (default: yours, or another signed-in one; with none usable it is bound at its first open). The user is told first, as for spawn (a card with a countdown), unless their own message in this turn asked for it (pass their words verbatim as user_instruction). A container agent can create only container agents and cannot set limits; a container is refused, with the reason, when Docker is not available. Returns {agent_id, name, slug, message_to, template, provider, runtime, container_image, limits, account, account_note, asked_user}. routes: the model routes a spawn or create may name (route, model), as JSON {routes: [{route, label, harness, key_present, models: [{id, label, context, tools, thinking, images, price_in_per_million, price_out_per_million, default}]}]}: a route is billed to its key in the Vault, not to a plan, so naming one asks the person first; harness limits it to one harness; update with route \"\" takes an agent off its route. workers: your own workers open now, as JSON {workers: [{name, message_to, agent_id, block_id, state (working, waiting, idle, stopped, error, limited or signed_out), since_ms, unavailable, last_report_ms}]}: check on them all in one call. A state of limited means the agent's account is out of quota (its last run hit the plan's usage limit) and signed_out that its sign-in was refused: it is alive but every turn fails until the limit resets or it moves to another account, so don't wait on it or message it work: the message starts a turn that fails. For those two, unavailable (in conversations and workers) is {state, code, title, resets_at_ms, since_ms}, with resets_at_ms when the provider said when the limit lifts; otherwise it is null. start: run a stopped agent with no pane, resuming its session; it answers started: false if it is already running. It spends tokens until it is stopped, and each sender may start 5 agents a minute. stop: stop an agent's process (not your own: use Stop with action self); it is recorded as wanted stopped, so a restart does not resume it, and a message or start runs it again. Another agent gets the same 30-second window as Stop agents, in which the user can keep it running: the answer is {stopped: false, pending} and it stops after the window unless they keep it (Agents list shows its runtime); a worker you opened stops at once. detach: close an agent's pane and keep the agent running with none; open shows it again. delete: delete an agent you made (one you created with create, or a worker you spawned), given in agent (its id or slug): its definition, parked block and a container agent's container storage go, and it cannot be undone. Only when it is stopped and shows no pane (stop it, detach it, then delete it), never yourself, and never an agent someone else made; the operator deletes those in My Agents. Recorded under your name. ask_go_ahead: a host agent that shares a folder with a container agent is refused (SHARED_FOLDER, or a refusal that names both agents) until the person goes ahead with that pair, which only they can do from the AgentMux window. This asks them: give host_agent and container_agent (each an id or slug) and the person gets a card in your own pane with Go ahead and Don't open; it needs an open pane. It answers at once with status asked (the person has not answered; call it again to see), chosen (they went ahead: retry what was refused), declined (they said no, and the pair is not asked about again for a while; give the agents separate workspaces or bind the shared folder read-only into the container agent) or not_needed (the two share no folder). ask_pin_change: a pin says which key or install may speak under an agent's name, and an agent changes one only when the install that hosts it vouches for the key (pins adopt); anything else is the person's, which they do from the pins screen. This asks them: give pin_change (move: accept the key or install that was last refused for the name, or forget: drop the pin so the next one shown is pinned), pin_kind (lan or wan), pin_agent (the name the pin is for), pin_channel (wan only), pin_expect (what you saw: for move the refused key's fingerprint or install, for forget the pinned one, as pins list shows it) and reason (one sentence, at most 300 characters; the person reads it as yours). The person gets a card in your own pane with the pin's name, the old and new key or install, and Allow and Don't allow; it needs an open pane. The pin changes only for exactly what the card shows, and only when they click Allow; no answer in 10 minutes is a no. It answers at once with status asked (not answered yet; call it again with the same arguments to see), allowed (done), declined (they said no; not asked again for a while) or expired (nobody answered: ask again if still needed). A machine's pins are changed on that machine: to change another machine's pin, message an agent that runs there and have it ask. mute_quiet: tell the quiet watch that an agent you lead (its seat's lead, or the agent you spawned) will be quiet for minutes (1 to 240; 0 lifts it), with a short reason: it is neither nudged nor reported until then, and the watch starts again from the end of the mute; recorded as you, never as the operator. rotate_token: replace another agent's identity token, given in agent (its id or slug); the old token stops working at once and the new one reaches the agent through a restart. A stopped agent only has its token replaced; a running one is stopped like stop (its user has 30 seconds to keep it running, a worker you opened is stopped at once) and starts again in its pane and conversation, and you are told by a note if its user kept it running. Never your own agent: ask another agent to run it for you. Recorded under your name; the answer never holds a token. watch: an agent's recent transcript, then its new lines, without opening a pane: the first call returns the last max_lines (default 100, at most 500) as {lines, next, more, turn_active, runtime}; pass next back as after to get only what it wrote since, with wait_seconds (at most 25) to wait for a new line instead of getting none; reset: true means the transcript restarted, and lines are its tail. Lines are the raw session output, long ones shortened; it works for an agent that is stopped or has no pane. start, stop and detach act on agent (its id or slug), are recorded under your name, and answer with the agent's runtime. search_history: search YOUR OWN past conversations, including sessions that ended or were compacted away from your context. Use it before asserting what you previously did, said or sent: your context is a lossy view of your own history, so after a reset or compaction you can confidently misreport your own actions ('did I already message X', 'have I made this change before', 'what did I conclude about Y last week'). It matches message text and, with tool, the tool calls themselves, so 'did I message Agent4' is answered structurally (tool \"Message\", query \"Agent4\"; sessions from before the tools were merged recorded \"SendMessage\"). Newest sessions first; since and until narrow the window before any file is read. It covers every session in AgentMux's own record of you (all accounts, channels and versions), even ones whose provider transcript is gone. Returns {hits: [{session_id, timestamp, role, snippet, tool_name, source, attribution}], complete, incomplete_reasons, total_sessions, sessions_scanned, sessions_skipped, sessions_unreadable, sessions_partly_read, discovery_errors, ledger_sessions, record_only_sessions, inferred_sessions_excluded, truncated, hint}. IMPORTANT: only complete: true with no hits means it did not happen (within your window); complete: false means unknown, never 'it didn't happen' — incomplete_reasons says why (hit_limit, max_sessions, time_limit, unreadable_sessions, unreadable_records, discovery_errors); time_limit means the search stopped at its time limit and answered with what it had, and hint then says how to narrow it (since and until, role, tool, a smaller max_sessions). It searches only your own history; another agent's conversation is governed by the transcript_request visibility protocol. context: how full YOUR OWN context is and when it compacts by itself, as JSON {provider, model, tokens, window, auto_compact_at, compacting, calls_since_compaction, last_compaction_ms, hint}; it costs no tokens, so check it at the end of a piece of work, not every turn. hint is compact when your context is large enough that compacting would pay, fresh when you just finished a Kanban task with a large context (a fresh session, with a handoff, is the better move if your next work is unrelated), otherwise none. compact: compact YOUR OWN context when your current turn ends (never mid-task: it waits), as AgentMux's own turn. Use it when the same task continues and your context is large (hint says so, or an [AgentMux] note suggests it). Say in keep what to keep: PR and task numbers, file paths you're editing, decisions, the next step; it steers the summary; the full conversation stays in your transcript (search_history finds it). Returns {status: scheduled} or {status: refused, reason} (already scheduled, too soon after the last compaction, or an unsupported provider: a Codex agent in a container can't compact yet, or an ACP harness that announced no compaction command, which is told to use fresh). It acts only on the calling agent's own pane, which AgentMux identifies from your agent token; there is no target. fresh: end YOUR OWN session when your current turn ends and start a new one, for work unrelated to what's in your context (a finished task, a new one). You keep your pane, name, account, Global and Personal Memory, workspace, and Kanban and Presence claims; the old session stays in your record (search_history finds it). Write handoff for your next self: task number, spec or file paths, open PRs, decisions, the next step; it arrives as the new session's first message, from AgentMux, with a pointer to search_history for the old session. Nothing else of the conversation carries over: no summary and no transcript excerpt, so the handoff must stand on its own. Don't call it while background shells, monitors or subagents are running: they stop with the session. Returns {status: scheduled} or {status: refused, reason}; it is refused for the same reasons as compact (already scheduled, under 10 minutes or fewer than 50 calls since the last compaction or fresh start, unsupported provider, or a container agent that is not a Claude or Codex agent), and a fresh start counts toward that limit. It acts only on the calling agent's own pane, which AgentMux identifies from your agent token; there is no target. ready: answer an [AgentMux] note that asked you to prepare for a change (your account is being switched, say): after you stop at a safe point, give handoff, a few lines on what is in flight, what you wait on and the next step, which your resumed session reads first; or more_time true with why (once) when you are mid-push or mid-deploy. The change runs when your turn ends; it also runs when its window (30 seconds) ends, whatever you did. Nothing else of the conversation carries over, so the handoff must stand on its own; a background shell, monitor or subagent still running stops with the session, so say in the handoff what to start again. Returns {status: ready or more_time, note, prep}, or an error when no change is waiting on you or you already asked for more time. It acts only on the calling agent's own pane, which AgentMux identifies from your agent token; there is no target. env_get: the extra environment variables a definition launches with (its Environment in My Agents), as {agent, lines}: yours, or another agent's with agent (its id or slug). Values of names an agent may not set (credentials among them) are shown as [hidden], and a comment holding = or : and a skipped line as # [hidden] (write them back as shown and the operator's lines stay). env_set: change them: lines (the whole new text, comments and blank lines kept as written) or set {NAME: value} and/or unset [NAME] (the rest left as it is). ANTHROPIC_MODEL is accepted only with ANTHROPIC_BASE_URL (a server of its own) in the same environment, since the launch passes every other agent the model its pane chose: use update with model for that. Allowed names (no others): CLAUDE_CODE_AUTO_COMPACT_WINDOW, CLAUDE_AUTOCOMPACT_PCT_OVERRIDE, CLAUDE_CODE_MAX_OUTPUT_TOKENS, CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC, DISABLE_TELEMETRY, DISABLE_ERROR_REPORTING, DISABLE_AUTOUPDATER, DISABLE_COST_WARNINGS, MAX_THINKING_TOKENS, MAX_MCP_OUTPUT_TOKENS, MCP_TIMEOUT, MCP_TOOL_TIMEOUT, ANTHROPIC_MODEL, ANTHROPIC_SMALL_FAST_MODEL, RUST_LOG, RUST_BACKTRACE, NO_COLOR, FORCE_COLOR, TZ, LANG and LC_ALL; any other name is the operator's to set in My Agents (an agent's variables apply to another agent's launches). A Claude Code agent's model endpoint is also yours to set: ANTHROPIC_BASE_URL (http:// or https://, no sign-in or query in it), ANTHROPIC_AUTH_TOKEN or ANTHROPIC_API_KEY (vault:<entry id> for a key in a Vault the person opened to both you and that agent, or for a server that ignores it one of ollama, lm-studio, lmstudio, llamacpp, vllm, local, none, dummy, placeholder, unused, not-needed, no-key; never a key), API_TIMEOUT_MS, ANTHROPIC_DEFAULT_OPUS_MODEL, ANTHROPIC_DEFAULT_SONNET_MODEL, ANTHROPIC_DEFAULT_HAIKU_MODEL and CLAUDE_CODE_SUBAGENT_MODEL, each spelled in capitals. The agent that gets a custom endpoint is never given the person's Claude sign-in (it is sent only to Anthropic), asks the endpoint for ANTHROPIC_MODEL, and starts a new conversation on it; a card in its pane and in My Agents names you and the server, with an Undo for 30 seconds. Refused: an agent on a model route (switch its route instead) and a container agent. Also refused: names starting AGENTMUX_, names AgentMux sets or that decide where an agent's tools, credentials or traffic go (PATH, HOME, GH_CONFIG_DIR, CLAUDE_CONFIG_DIR, CODEX_HOME, proxies, provider endpoints), credential-looking names (ending _KEY, _TOKEN, _SECRET, _PASSWORD) and values that look like secrets (values are plain text; secrets belong in the Vault); at most 64 lines and 4 KiB. Returns {agent, changed: {added, changed, removed}, lines, audit_id, note}; the change is recorded under your name and applies at that agent's next launch, not to a session already running. set_seat: set or clear the seats of agents on this machine in one call, seats: [{agent (id or slug), seat: {role, qualifier, lead (id or slug; absent means the operator), area} or null to clear}], checked together, written all or none and recorded under your name; returns {changed, audit_ids}. rename: give the agent in agent (its id or slug, on this machine or on host) the displayed name in name, by the path the window's rename takes, so its pane, My Agents, the Swarm, seats, the Kanban and message addressing show the new name at once. Its agent id, slug (AGENTMUX_AGENT_ID), signing keys and workspace folder do NOT change: they are fixed when it launches. The old name keeps reaching it, so a message addressed to it still arrives, and no other agent may take that name; a name another agent has now is refused. A running agent is told in a note and signs as the new name; its startup files catch up at its next launch. Recorded under your name; returns {agent_id, slug, name, was, audit_id}. update: change fields of the definition of the agent in agent (its id or slug, on this machine): give only the ones to change, from description, icon, auto_start, restart_on_crash, idle_timeout_minutes (0 to 10080), model and effort, spend_cap_usd and reset_spend_today (an agent on a model route stops at its cap for the day: the gateway refuses its requests, its pane says why and its leader is told; the leader raises the cap here), and fresh with a route or model change on a model route (a new session on the new model, with handoff as its first message, instead of resuming the conversation: a model that did not write a long conversation can read it badly, so a change without fresh answers with a warning); the name is rename, environment variables env_set, the provider is fixed when the agent is made, and the container is update_container. What decides what an agent runs, where its traffic goes or which project files it reads (shell, provider_flags, working_directory, a custom model endpoint) is refused, as env_set refuses the same: the operator sets those in My Agents. A running agent keeps what it launched with until it is launched again. Returns {agent_id, changed, audit_id}. bundles: the bundles picked for the agent in agent, in order: without bundle_ids it reads them, with bundle_ids (the whole list) it replaces them. Their instructions go into the agent's startup file after Global Memory at its next launch and their skills are added; a bundle id is from Identity presets. Returns {agent_id, bundle_ids, audit_id}. hide, unhide: take a seeded picker template (template: its id or slug) out of the new-agent picker or bring it back; an agent you made is removed with delete. model and effort change what a Claude agent not on a model route runs, the way its pane's picker does: its panes and its remembered runtime are set, and its persistent panes restart at the end of their turn with their conversation (no fresh session); a model its definition's provider flags fix, or one an agent with a model server of its own asks for (ANTHROPIC_MODEL), is refused by name. With host, update takes only agent, model and effort. All of these are recorded under your name, and run on this machine only, except update (model and effort) with host. update_container: for a container agent whose container runs an older agent image than this AgentMux (its pane says so), remove the container so the agent's next message starts it from the current image; the workspace, Personal Memory and the agent's CLI and Claude home are kept, tools installed inside the container are reset. It acts on the agent in agent (its id or slug) and is refused while that agent has a turn running, so it cannot update your own container during your turn. Give container_image (ghcr.io/agentmuxai/agent-base:developer or ghcr.io/agentmuxai/agent-base:latest) to change which image the agent runs first: it is stored on the agent's definition and its open pane, then the container is removed so the next message starts from that image; it works on a stopped agent too, and a container agent cannot use it (ask a host agent, your steward or the operator). message_stats: the messages each agent received per day, read-only, for the last days (default 7, at most 31): received, how many started a turn or joined one, how many waited in a hold, replies refused for saying nothing, and messages sent. set_container_limits: a container agent's CPU and memory limits (every container agent has them; the default is half of what Docker has for memory and all but a quarter of its cores). Give agent (its id or slug) with memory_mb and/or cpus to change them, or neither to read them: the answer has what is set (empty: auto, \"0\": no limit), what is in force now (effective_*) and what Docker has in total (daemon_*). A change is put on the running container at once, without restarting it, and the agent's pane says who made it. A container agent can read its limits but not change them, its own included: it asks a host agent, its steward or the operator, saying how much memory the work needs. An out-of-memory kill in a container shows in its pane as a row naming the limit. container_caches: a container agent's cache volumes (a developer agent's cargo registry and build output, which stay when its container is replaced): give agent (its id or slug) to read how much each volume holds (total_bytes, and warn_bytes, above which it is a lot), or add clear: true to remove them, and the container with them, which starts again at the agent's next message with a cold first build. A container agent can read its caches but not clear them: it asks a host agent, its steward or the operator. migrate_ids: the agent id update, the one Settings > Agents > Outdated agent ids runs (a fork an older build named by chaining every generation, loap-loap-2, gets the id it would get today, loap-2; the old id still receives messages for 30 days). Give step: plan (the default; reads and changes nothing: the agents with an outdated id, the new id each would get, any that is taken with a suggested one, what still runs and what blocks), stop (asks every pane running an affected agent to stop, each with its user's 30 second keep-running window: the answer says how long to wait, and your own pane stops too if it is one), apply (migrates what the plan can; resumes a run that stopped partway), or rollback (undoes the last finished run). choices: [{uid, new_slug}] gives an agent whose own new id is taken another one. Run plan first and read it; nothing changes until stop or apply. export: save an agent as a portable archive file (.abf, kind agent) under YOUR working folder, for yourself or an agent you lead (not another agent: its conversation is its own to share). It carries the agent's definition (an allowlist: no permissions, shell, environment, accounts or working folder), Personal Memory and its conversation in the compact form, with a readable transcript, signed by this computer; never Vault values, keys, sign-ins, workspace files or the provider's own session file. The history is carried as it is: a secret that was pasted into a conversation and is not a value AgentMux holds is in the file, so scrub (default true) also withholds anything shaped like a key. Params: agent (default: you), include ([memory, history], default both), scrub, to (a name or path ending .abf under your working folder; default exports/<slug>-<time>.abf; an existing file is never overwritten). The answer has the path, size, parts, warnings and what is not in it. A container agent cannot export yet. bring_back / move_status: an agent saved with export and hand_over: true (a move by file) is stopped here and marked handed over, and starts nowhere on this computer until bring_back clears the mark (for yourself or an agent you lead; an agent marked moved needs force: true); move_status says where it stands. import: put an agent archive (.abf, from export) in My Agents. It reads the file without trust (every part is checked against its manifest first, a signature that does not verify is refused), takes only an allowlist of settings (never permissions, shell, environment, accounts or a working folder; a super seat is never carried), puts the conversation in as history (imported lines are never shown as typed by the person), puts Personal Memory in its record with an arrival-note.md that says where it came from, and makes the agent last. It arrives STOPPED: nothing starts it. It asks the user as create does. Params: file (a name or path ending .abf under your working folder), mode (move, the default: the same agent arrives under its id, refused where that id is already an agent here; or copy: a new agent with a new id), name (default: its own; a copy gets \" copy\" after it), dry_run (read and check, say what would be made, ask no one), user_instruction. The answer lists what it carries, what was not taken, blockers and warnings. A container agent cannot import yet.",
  "inputSchema": {
    "type": "object",
    "properties": {
      "action":           { "type": "string", "enum": ["list", "status", "conversations", "transcript", "open", "spawn", "create", "workers", "routes", "start", "stop", "detach", "delete", "watch", "search_history", "context", "compact", "fresh", "ready", "env_get", "env_set", "set_seat", "ask_go_ahead", "ask_pin_change", "rename", "update", "bundles", "hide", "unhide", "update_container", "message_stats", "set_container_limits", "container_caches", "migrate_ids", "rotate_token", "mute_quiet", "export", "import", "bring_back", "move_status", "move"], "description": "What to do" },
      "view":             { "type": "boolean", "description": "open with host: true shows that computer's agent in a pane on your own window instead of opening it there. The computer must already be paired with this one (its person pairs it in the Swarm). The pane watches only: you can't turn on driving, only the person in the pane can. host is then the computer's name as Agents list shows it (name, or name/channel when it runs several AgentMux instances); agent names the agent on it." },
      "host":             { "type": "string", "description": "move: the computer to move the agent to, by the name Agents list shows (srv asks that computer; nothing runs there as a result of host alone). list, status: a LAN peer's name, or all for this machine and every peer. start, open, stop, set_seat, rename, update (model and effort), env_get, env_set: another machine, by the name Agents list shows, to run it there instead of here; agent (or seats) then names agents on that machine. An open there goes in a tab of its own named for you, made if missing, without focus: it never uses the person's tab, and tab_id, focus and split settings are not used. Named on each call, never remembered; it must be a LAN peer that has pinned your key and whose install this machine trusts. The answer says which machine gave it; a stop of an agent there still waits for its user's keep-running window. Absent means this machine; the other actions refuse it." },
      "reason":           { "type": "string", "description": "host: one line, why; the other machine shows it as yours. mute_quiet: why, in a few words. ask_pin_change: why the pin should change, one sentence, at most 300 characters; the person reads it" },
      "minutes":          { "type": "integer", "description": "mute_quiet: how long the agent will be quiet, 1 to 240; 0 lifts the mute" },
      "file":             { "type": "string", "description": "import: the archive to read, a name or path ending .abf under your working folder" },
      "mode":             { "type": "string", "enum": ["move", "copy"], "description": "import: move (default) keeps the agent's id; copy makes a new agent with a new id" },
      "dry_run":          { "type": "boolean", "description": "import: read and check the archive, say what would be made, and make nothing. move: ask the destination and say what would be sent; stop there" },
      "include":          { "type": "array", "items": { "type": "string", "enum": ["memory", "history"] }, "description": "export: what to put in (default: memory and history)" },
      "scrub":            { "type": "boolean", "description": "export: also withhold anything shaped like a key or token (default true)" },
      "hand_over":        { "type": "boolean", "description": "export: a move by file: stop the agent here and mark it handed over once the file is written, so it starts nowhere here until bring_back" },
      "resume":           { "type": "boolean", "description": "move: continue a move that stopped after the agent was handed over, as a new attempt" },
      "force":            { "type": "boolean", "description": "bring_back: of an agent that moved to another computer, start it here although it may be running there" },
      "to":               { "type": "string", "description": "export: the file to write, a name or path ending .abf under your working folder (default: exports/<slug>-<time>.abf); an existing file is never overwritten" },
      "agent":            { "type": "string", "description": "transcript: the agent's name (its AGENTMUX_AGENT_ID); open: its name or definition id, case-insensitive; start, stop, detach, delete, rotate_token, watch, rename, update, bundles: its id or slug (required); env_get, env_set: the definition's id or slug (default: yours); update_container, set_container_limits, container_caches: the container agent's id or slug (required)" },
      "days":             { "type": "integer", "description": "message_stats: how many days back (default 7, at most 31)" },
      "max_lines":        { "type": "integer", "description": "transcript, watch: the most lines to return (default 100, at most 500)" },
      "after":            { "type": "integer", "description": "watch: the next from the last answer: only lines written since" },
      "gen":              { "type": "string", "description": "watch: the gen from the same answer as after, so the position still fits when the transcript was rewritten in between" },
      "wait_seconds":     { "type": "integer", "description": "watch: with after, wait up to this long (at most 25) for a new line" },
      "tab_id":           { "type": "string", "description": "open: the tab to open it in (default: the active tab)" },
      "focus":            { "type": "boolean", "description": "open: ignored. An agent's open never takes the person's tab, focus or caret" },
      "name":             { "type": "string", "description": "rename: the agent's new name (required; one line, at most 64 characters). create: the new agent's name (required). import: the agent's name here (default: its own). spawn: the worker's name, e.g. Loap-4 (default: \"<your name> worker N\")" },
      "model":            { "type": "string", "description": "spawn: the worker's model: opus, sonnet, haiku or a claude-… id (default: yours; Claude agents only); with a route, a model that route serves, from routes (default: the route's). create: the model on route. update: the model, on the route the agent is already on, or for an agent not on a route the model its pane runs (see update). list, status: only agents on a model whose id or short name contains this; !x means not x" },
      "fields":           { "type": "string", "description": "list, status: the live-fact groups to include per agent, a comma list of model, runtime, turn, context, account, usage, spend, task, quiet, session, host, or all" },
      "detail":           { "type": "string", "enum": ["basic", "facts", "full"], "description": "list, status: basic (default), facts (every group but host) or full (all groups)" },
      "state":            { "type": "string", "description": "list, status: only agents in this runtime state (stopped, starting, idle, working, waiting_on_user, limited, signed_out, error)" },
      "provider":         { "type": "string", "description": "list, status: only agents of this provider (claude, codex, ...)" },
      "seat":             { "type": "string", "description": "list, status: only agents whose seat role, lead or area contains this" },
      "offset":           { "type": "integer", "description": "list, status: skip this many agents (with limit)" },
      "group_by":         { "type": "string", "enum": ["model", "state", "host", "account", "provider", "runtime"], "description": "status: also group the agents by this" },
      "harness":          { "type": "string", "description": "spawn, create, routes: the harness the new agent runs (claude, codex, ...; default: yours for spawn, the template's for create). It is fixed when the agent is made. routes: only the routes that serve this harness" },
      "route":            { "type": "string", "description": "spawn, create: the model route the new agent runs on, from routes (openrouter); anthropic is the harness's own sign-in (default: your route for spawn, else the sign-in). A route is billed to its key in the Vault, not to a plan, and the person is asked first. update: \"\" takes the agent off its route" },
      "effort":           { "type": "string", "enum": ["low", "medium", "high", "xhigh", "max"], "description": "spawn: the worker's effort (default: yours; Claude agents only). update: the effort of a Claude agent not on a model route (see update)" },
      "template":         { "type": "string", "description": "create: the seeded template to make the agent from, by id, slug or name (required). hide, unhide: the template, by id or slug (required)" },
      "bundle_ids":       { "type": "array", "items": { "type": "string" }, "description": "bundles: the agent's whole list of picked bundles, in order; leave it out to read the list" },
      "description":      { "type": "string", "description": "update: the agent's description" },
      "icon":             { "type": "string", "description": "update: its icon" },
      "auto_start":       { "type": "boolean", "description": "update: start it when AgentMux starts" },
      "restart_on_crash": { "type": "boolean", "description": "update: start it again when it crashes" },
      "idle_timeout_minutes": { "type": "integer", "description": "update: stop it after this many idle minutes (0: never; at most 10080)" },
      "spend_cap_usd":    { "type": ["number", "string"], "description": "update: the most the agent may use through its model route in a UTC day, in dollars (default 50, set in Settings); 0 or \"none\" for no cap. Its leader sets it; an agent may only lower its own" },
      "reset_spend_today": { "type": "boolean", "description": "update: zero the spend counted for the agent today, for a figure that was wrong (its leader only)" },
      "runtime":          { "type": "string", "enum": ["native", "container"], "description": "list, status: only native or only container agents. spawn, create: where it runs: native (on the host) or container. Left out, a Claude Code agent runs in a container when Docker answers (the user's agents:defaultruntime setting can say native), and as you or its template run otherwise; say native when it must read or write host files, run host programs or build on the host. A container needs Docker" },
      "container_image":  { "type": "string", "description": "spawn, create, update_container: a container agent's image: ghcr.io/agentmuxai/agent-base:developer (the developer image) or ghcr.io/agentmuxai/agent-base:latest" },
      "brief":            { "type": "string", "description": "spawn: the worker's task, sent as its first message (required, unless workers is given)" },
      "workers":          { "type": "array", "items": { "type": "object", "properties": { "brief": { "type": "string" }, "name": { "type": "string" }, "model": { "type": "string" }, "harness": { "type": "string" }, "route": { "type": "string" }, "effort": { "type": "string", "enum": ["low", "medium", "high", "xhigh", "max"] }, "account": { "type": "string" }, "runtime": { "type": "string", "enum": ["native", "container"] }, "container_image": { "type": "string" }, "memory_mb": { "type": ["integer", "string"] }, "cpus": { "type": ["number", "string"] } }, "required": ["brief"] }, "description": "spawn: several workers at once, [{brief, name?, model?, effort?, account?, runtime?, container_image?, harness?, route?, memory_mb?, cpus?}], with one approval for all (instead of brief, name, model, effort and account)" },
      "agents":           { "type": "array", "items": { "type": "object", "properties": { "agent": { "type": "string" }, "tab_id": { "type": "string" }, "focus": { "type": "boolean", "description": "ignored: an agent's open never takes the person's focus" } }, "required": ["agent"] }, "description": "open: several agents at once, [{agent, tab_id?, focus?}], opened one after another once all are checked (instead of agent; at most 16)" },
      "account":          { "type": "string", "description": "list, status: only agents whose account's stable id or label contains this. spawn, create: the account to run the worker on, by id or email, from Identity accounts (default: yours, or another signed-in one if yours can't run)" },
      "user_instruction": { "type": "string", "description": "spawn, create, import: the user's own words in this turn asking for it, verbatim; leave it out if they didn't ask, and the user sees the card" },
      "query":            { "type": "string", "description": "search_history: a case-insensitive substring of message text and tool arguments (required; may be empty only with tool, meaning every call to that tool)" },
      "tool":             { "type": "string", "description": "search_history: only calls to this tool, e.g. \"Message\"; the built-in tool and an MCP tool recorded with its server prefix (mcp__agentmux__Message) alike. It matches the recorded name, not prose about it" },
      "role":             { "type": "string", "enum": ["user", "assistant"], "description": "search_history: only your own messages (assistant) or what you were told (user)" },
      "since":            { "type": "integer", "description": "search_history: Unix time in seconds (or milliseconds, like a hit's timestamp): only messages at or after it; sessions last written earlier are skipped WITHOUT opening them" },
      "until":            { "type": "integer", "description": "search_history: Unix time upper bound, seconds or milliseconds; sessions started later are skipped without opening them" },
      "max_sessions":     { "type": "integer", "description": "search_history: the most sessions to open, newest first (default 20, at most 100); more make the answer incomplete" },
      "limit":            { "type": "integer", "description": "search_history: the most hits before it reports truncated (default 50, at most 200). list, status: the most agents to return (the page says whether more were cut)" },
      "keep":             { "type": "string", "description": "compact: what to keep, for the summary: PR and task numbers, file paths you're editing, decisions, the next step (at most 2,000 characters; Claude, and an ACP harness whose compaction command takes one)" },
      "handoff":          { "type": "string", "description": "update with fresh: what the agent's new session must know, in its first message (at most 4,000 characters; empty: it reads its task list). fresh: what your next session must know, as its first message: task number, spec or file paths, open PRs, decisions, the next step (required; at most 4,000 characters). ready: what is in flight, what you wait on, the next step (about 10 lines, at most 1,500 characters)" },
      "fresh":            { "type": "boolean", "description": "update, with route or model on a model route: start a new session on the new model, with handoff as its first message, instead of resuming the conversation. Refused for harnesses that can't start fresh (a container agent can with Claude or Codex), before anything changes" },
      "more_time":        { "type": "boolean", "description": "ready: you are mid-push or mid-deploy and need up to 2 minutes in all; once" },
      "why":              { "type": "string", "description": "ready, with more_time: one line, shown to the person (\"finishing a push\")" },
      "lines":            { "type": "string", "description": "env_set: the whole new environment, one NAME=VALUE per line; # starts a comment; stored exactly as written. Give this, or set and/or unset" },
      "set":              { "type": "object", "additionalProperties": { "type": "string" }, "description": "env_set: variables to add or change, {NAME: value}; the others stay as they are" },
      "unset":            { "type": "array", "items": { "type": "string" }, "description": "env_set: names of variables to remove" },
      "step":             { "type": "string", "enum": ["plan", "stop", "apply", "rollback"], "description": "migrate_ids: plan (default), stop, apply or rollback" },
      "choices":          { "type": "array", "items": { "type": "object", "properties": { "uid": { "type": "string" }, "new_slug": { "type": "string" } }, "required": ["uid", "new_slug"] }, "description": "migrate_ids: the id to give an agent whose computed id is taken" },
      "pin_change":       { "type": "string", "enum": ["move", "forget"], "description": "ask_pin_change: move (accept the key or install last refused for the name) or forget (drop the pin)" },
      "pin_kind":         { "type": "string", "enum": ["lan", "wan"], "description": "ask_pin_change: lan (a key pinned to a name on the local network) or wan (an install pinned through the cloud)" },
      "pin_agent":        { "type": "string", "description": "ask_pin_change: the agent name the pin is for" },
      "pin_channel":      { "type": "string", "description": "ask_pin_change: the channel of a wan pin" },
      "pin_expect":       { "type": "string", "description": "ask_pin_change: what you saw in pins list: for move the refused key (its fingerprint) or install, for forget the pinned one; refused if it is not what srv holds now" },
      "host_agent":       { "type": "string", "description": "ask_go_ahead: the host agent (its id or slug) that was refused because it shares a folder with a container agent" },
      "container_agent":  { "type": "string", "description": "ask_go_ahead: the container agent (its id or slug) whose folder it shares" },
      "seats":            { "type": "array", "items": { "type": "object", "properties": { "agent": { "type": "string" }, "seat": { "type": ["object", "null"], "properties": { "role": { "type": "string", "enum": ["leader", "worker", "specialist", "platform_tester", "analyst", "super"] }, "qualifier": { "type": "string" }, "lead": { "type": "string" }, "area": { "type": "string" } }, "required": ["role"] } }, "required": ["agent"] }, "description": "set_seat: the seats to set, [{agent, seat}]; seat null clears an agent's seat (at most 64 per call). A lead is an agent on this machine (id or slug) or, for one on another machine on the LAN, Name@host as list shows it (AgentY@narko)" },
      "memory_mb":        { "type": ["integer", "string"], "description": "set_container_limits, and spawn or create with runtime container: the memory limit in MB, \"auto\" (the app-wide setting, then half of what Docker has), or 0 for no limit; leave it out to keep what is set" },
      "cpus":             { "type": ["number", "string"], "description": "set_container_limits, and spawn or create with runtime container: the CPU limit in CPUs (fractions allowed), \"auto\", or 0 for no limit; leave it out to keep what is set" },
      "clear":            { "type": "boolean", "description": "container_caches: remove the caches (and the container, which starts again at the agent's next message) instead of only reading their sizes; not for a container agent" },
      "include_inferred": { "type": "boolean", "description": "search_history: also search sessions found only by your working directory or account that your own record doesn't name (default false: they may be another agent's)" }
    },
    "required": ["action"]
  }
}"#;
Expand description

Agents: the other agents, what they are doing, opening them, and the caller’s own history (docs/specs/SPEC_MUXAPI_TOOL_CONSOLIDATION_2026_10_15.md §4.2, slice S4).

  • list is srv’s /agentmux/discovery, whose entries carry the block_id that Message broadcast and Stop agents target (fleet control, SPEC_MULTI_AGENT_FLEET_CONTROL_2026_08_20.md).
  • conversations is the cross-tier glance (SPEC_MUXSPECT_CROSS_TIER_CONVERSATION_VISIBILITY_2026_08_21.md Phase A): host and cross-channel previews, LAN and WAN liveness only.
  • search_history (SPEC_AGENT_HISTORY_SEARCH_2026_09_17.md) searches only the agent whose per-agent token this process carries, and refuses an agent: reading another agent’s conversation is governed by conversation_visibility and the transcript_request tier rules, and a search that reached other agents’ transcripts would be a second, ungoverned disclosure path around them.