Interface: CrewConfig
Defined in: packages/orchestration/src/crew/types.ts:44
Properties
agents
agents:
CrewAgentConfig[]
Defined in: packages/orchestration/src/crew/types.ts:46
Agents to register with the crew
budgetTotal?
optionalbudgetTotal?:number
Defined in: packages/orchestration/src/crew/types.ts:70
Total budget for all agents combined (USD)
coordinator?
optionalcoordinator?:Baleybot<undefined,Record<string,never>>
Defined in: packages/orchestration/src/crew/types.ts:64
Custom coordinator Baleybot. When provided, replaces the built-in coordinator entirely.
The bot must have orchestration tools (createTicket, dispatch, etc.) configured —
use createCoordinatorTools() or add them manually.
coordinatorInstructions?
optionalcoordinatorInstructions?:string
Defined in: packages/orchestration/src/crew/types.ts:68
Custom instructions appended to the coordinator's system prompt. Ignored if coordinator is set.
coordinatorModel?
optionalcoordinatorModel?:string|ModelConfig
Defined in: packages/orchestration/src/crew/types.ts:66
Coordinator model (defaults to auto-select via Baleybot). Ignored if coordinator is set.
name?
optionalname?:string
Defined in: packages/orchestration/src/crew/types.ts:58
Stable name for this crew. Defaults to a generated id.
The key the dev panel lists the crew under, so it should be something the
developer chose ('support') rather than derived. A generated fallback
works and gives up the one property that matters across a hot reload:
re-declaring the same crew replaces its row instead of adding a second.
Optional because a crew never needed identity before — nothing asked it who it was. The panel does.
onCoordinatorStreamEvent?
optionalonCoordinatorStreamEvent?: (event,agentName) =>void
Defined in: packages/orchestration/src/crew/types.ts:150
Called for every streaming event from the coordinator agent. Enables real-time SSE streaming of the coordinator's response — text deltas, tool calls, reasoning, etc.
Parameters
event
BaleybotStreamEvent
agentName
string
Returns
void
Example
const crew = createCrew({
agents: [...],
onCoordinatorStreamEvent: (event, agentName) => {
if (event.type === 'text_delta') {
res.write(`data: ${JSON.stringify({ type: 'text_delta', content: event.content })}\n\n`);
}
},
});
onWorkerStreamEvent?
optionalonWorkerStreamEvent?: (runId,event,agentName) =>void
Defined in: packages/orchestration/src/crew/types.ts:131
Called for every streaming event from worker agents. Enables real-time UI updates — e.g., parsing canvas tags from agent output, showing thinking indicators, displaying tool progress.
Parameters
runId
string
event
BaleybotStreamEvent
agentName
string
Returns
void
Example
const crew = createCrew({
agents: [...],
onWorkerStreamEvent: (runId, event, agentName) => {
if (event.type === 'text_delta') {
parseCanvasTags(event.content, agentName);
}
},
});
proactiveIntervalMs?
optionalproactiveIntervalMs?:number
Defined in: packages/orchestration/src/crew/types.ts:85
Interval for proactive update checks in ms (default: 10000)
proactiveUpdates?
optionalproactiveUpdates?:boolean
Defined in: packages/orchestration/src/crew/types.ts:83
Enable proactive status updates from coordinator (default: true)
schedulerIntervalMs?
optionalschedulerIntervalMs?:number
Defined in: packages/orchestration/src/crew/types.ts:81
Scheduler heartbeat interval in ms (default: 5000 — faster than Orchestrator's 30s)
stores?
optionalstores?:object
Defined in: packages/orchestration/src/crew/types.ts:103
External persistent stores for tickets and runs. When provided, Crew uses these instead of in-memory stores. Enables persistence across server restarts (e.g., Neon, Supabase).
runs
runs:
RunStore
tickets
tickets:
TicketStore
Example
const crew = createCrew({
agents: [...],
stores: {
tickets: new NeonTicketStore(orgId, db),
runs: new NeonRunStore(orgId, db),
},
});
ticketDefaults?
optionalticketDefaults?:Partial<TicketConfig>
Defined in: packages/orchestration/src/crew/types.ts:112
Default values merged into every ticket created by the coordinator. Useful for tagging tickets with a groupChatId for Realtime filtering.
workerTools?
optionalworkerTools?:boolean
Defined in: packages/orchestration/src/crew/types.ts:79
Lend every agent collaboration tools — request_help, get_team_context —
for the duration of each dispatched run (default: false).
Agents are registered as given: the tools ride along in
ProcessOptions.additionalTools, so an agent keeps its model, system
prompt, tools and sandbox, and a tool it was built with wins a name clash.