Interface: OrchestratorConfig
Defined in: packages/orchestration/src/orchestrator.ts:63
Properties
budgetTotal?
optionalbudgetTotal?:number
Defined in: packages/orchestration/src/orchestrator.ts:102
USD every run this orchestrator starts may spend together, counted from
the runs it recorded in this process plus what its running runs have
spent so far. A run that reaches it fails (RunBudgetExceededError,
scope total) and no run starts after (BudgetExhaustedError).
concurrency?
optionalconcurrency?: (ticket,agent) =>ConcurrencyScope[]
Defined in: packages/orchestration/src/orchestrator.ts:86
Limits beyond each agent's maxConcurrent, per run (e.g. [{ scope: \org:${orgId}`, limit: 4 }]`).
Parameters
ticket
agent
Returns
customPricing?
optionalcustomPricing?:Record<string,ModelRates>
Defined in: packages/orchestration/src/orchestrator.ts:71
defaultModel?
optionaldefaultModel?:string
Defined in: packages/orchestration/src/orchestrator.ts:70
Default model ID for cost estimation (e.g. 'gpt-4o', 'claude-sonnet-5')
heartbeatMs?
optionalheartbeatMs?:number
Defined in: packages/orchestration/src/orchestrator.ts:90
How often a running run heartbeats, renews its slots and checks for a cross-instance cancel. Default 30s.
keepAlive?
optionalkeepAlive?: (run) =>void
Defined in: packages/orchestration/src/orchestrator.ts:110
Called with every run the orchestrator starts — scheduler, dispatch,
dispatchOnce, a resumed question — as a promise that settles (never
rejects) when the run does. On serverless, pass the platform's
waitUntil (@vercel/functions), so a run a web request dispatched
finishes after the response instead of freezing mid-step.
Parameters
run
Promise<void>
Returns
void
registryOptions?
optionalregistryOptions?:AgentRegistryOptions
Defined in: packages/orchestration/src/orchestrator.ts:77
Options for the agent registry (e.g. DB-backed concurrency counting)
schedulerIntervalMs?
optionalschedulerIntervalMs?:number
Defined in: packages/orchestration/src/orchestrator.ts:73
Scheduler heartbeat interval in ms (default: 30000)
slotLeaseMs?
optionalslotLeaseMs?:number
Defined in: packages/orchestration/src/orchestrator.ts:88
Slot lease without renewal. Default 15 minutes.
slots?
optionalslots?:SlotStore
Defined in: packages/orchestration/src/orchestrator.ts:84
Where concurrency slots are held — every agent's maxConcurrent and the
concurrency scopes. Default: this process's memory. On serverless, pass
a shared store (PostgresSlotStore from @baleybots/postgres) so a limit
binds across instances and a crashed instance's slots expire.
spend?
optionalspend?:SpendStore
Defined in: packages/orchestration/src/orchestrator.ts:95
Where run costs are recorded so budgets see every instance's spend
(PostgresSpendStore). Default: this process's memory.
stores
stores:
object
Defined in: packages/orchestration/src/orchestrator.ts:65
Where tickets and runs live: the in-memory pair, SupabaseTicketStore / SupabaseRunStore, or @baleybots/postgres's.
runs
runs:
RunStore
tickets
tickets:
TicketStore
ticketDefaults?
optionalticketDefaults?:Partial<TicketConfig>
Defined in: packages/orchestration/src/orchestrator.ts:75
Merged into every createTicket call (metadata key by key).