agent-mux
Cross-engine dispatch layer for AI coding agents. Use when you need to: launch a worker on Codex/Claude/Gemini, recover a timed-out dispatch, steer a running worker mid-flight, or coordinate multi-model work. Trigger on: agent-mux, dispatch, spawn worker, codex worker, profile dispatch, async dispatch, steer agent, recover timeout, multi-engine. --- # agent-mux One CLI, three engines (Codex, Claude, Gemini), one JSON contract. Worker identity lives in prompt files at `~/.agent-mux/prompts/` -- markdown with YAML frontmatter that sets engine, model, effort, timeout, and system prompt. No config files, no role tables. The prompt IS the worker. ## Quick Dispatch Three patterns cover 95% of dispatches. **Profile dispatch** (the standard path -- one flag resolves everything): ```bash agent-mux -P=lifter -C=/repo "Fix the retry logic in src/client/retry.go" 2>/dev/null ``` **Async dispatch** (fire, collect later): ```bash ID=$(agent-mux -P=scout --async -C=/repo "Find deprecated API usages" 2>/dev/null | jq -r .dispatch_id) agent-mux wait --poll 30s "$ID" 2>/dev/null agent-mux result --json "$ID" 2>/dev/null ``` **Structured dispatch via stdin** (canonical machine invocation): ```bash printf '%s' '{"profile":"lifter","prompt":"Implement the fix","cwd":"/repo"}' \ | agent-mux --stdin --async 2>/dev/null ``` Parse stdout JSON. Every result has `status`, `response`, `activity.files_changed`, and `metadata.engine`. Always check `status` first. ## Profile Roster