Orchestration Controls
Fine-grained control over a runTeam run. All optional; defaults keep behavior unchanged.
Inject team context
Section titled “Inject team context”Prepend the goal, roster, and this worker’s role to every worker prompt — helps workers stay aligned and makes multi-step runs easier to debug. Off by default; worker prompts stay byte-identical when omitted.
await orchestrator.runTeam(team, goal, { revealCoordinator: true })Approve before running
Section titled “Approve before running”Inspect the coordinator’s plan before any agent executes, and again between task rounds. These live on the orchestrator. Returning false aborts; remaining tasks are marked skipped.
const orchestrator = new OpenMultiAgent({ onPlanReady: async (tasks) => tasks.length <= 10, // gate the whole plan onApproval: async (completed, next) => next.length > 0, // gate each round})Cancel a run
Section titled “Cancel a run”Pass an AbortSignal; aborting stops the run in flight.
const controller = new AbortController()const run = orchestrator.runTeam(team, goal, { abortSignal: controller.signal })// controller.abort() from elsewhere to cancelConfigure the coordinator
Section titled “Configure the coordinator”Give the planner its own model, adapter, or extra instructions without touching the worker agents.
await orchestrator.runTeam(team, goal, { coordinator: { model: 'claude-opus-4-6', instructions: 'Prefer fewer, larger tasks.' },})Fan-out without dependencies
Section titled “Fan-out without dependencies”For MapReduce-style parallelism, use AgentPool.runParallel() directly. See patterns/fan-out-aggregate.
Shell & CI
Section titled “Shell & CI”Use the JSON-first oma binary. See the CLI reference.