Skip to content

Orchestration Controls

Fine-grained control over a runTeam run. All optional; defaults keep behavior unchanged.

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 })

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
})

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 cancel

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.' },
})

For MapReduce-style parallelism, use AgentPool.runParallel() directly. See patterns/fan-out-aggregate.

Use the JSON-first oma binary. See the CLI reference.