Expand description
App API — high-level commands for programmatic control of AgentMux.
These commands orchestrate multiple low-level operations (CreateBlock, SetMeta, ControllerResync) behind stable, intent-based interfaces. Callers express what they want (“open an agent pane with AgentX”), not how to do it.
Functions§
- allocate_
agent_ workdir - Atomically allocate an agent working directory.
- build_
pane_ 🔒meta - Build the metadata map for a pane.open request, validating required args.
- extract_
digest_ 🔒text - Extract meaningful text from raw stream-json lines for digest summarization. Skips system/result events and raw stream_event deltas; extracts assistant text and tool call summaries.
- find_
agent_ 🔒block - Find an existing agent block in a tab by agent ID.
- invoke_
cli_ 🔒for_ digest - Invoke the Claude CLI with a prompt and extract the text response.
Uses
-p --output-format stream-json --verbose(non-interactive mode). - register_
agent_ 🔒kill_ process - register_
agent_ 🔒kill_ tree - register_
agent_ 🔒list - register_
agent_ 🔒open - register_
agent_ 🔒output - register_
agent_ 🔒process_ list - register_
agent_ 🔒send - register_
agent_ 🔒status - register_
agent_ 🔒stop - register_
agent_ 🔒tracked_ blocks - register_
app_ api_ handlers - Register all App API handlers on the RPC engine.
- register_
blockfile_ 🔒line_ count - register_
blockfile_ 🔒read_ range - register_
blockfile_ 🔒read_ state - register_
blockfile_ 🔒write_ state - register_
pane_ 🔒open - register_
session_ 🔒archive_ handler - register_
session_ 🔒digest - register_
session_ 🔒export_ handler - register_
session_ 🔒restore_ handler - resolve_
placement 🔒 - Translate
split_direction+split_reference_block_idinto the backend layout action triple. Returns(actiontype, targetblockid, position). Falls back to a plaininsertif direction/reference are missing. - resolve_
tab_ 🔒id - Resolve a tab ID: use the provided one, or fall back to the first workspace’s active tab.
- write_
agent_ 🔒config_ files - Write agent config files (CLAUDE.md, .mcp.json, etc.) to the working directory.