Overview
The Builder API lets you construct DAGs programmatically with full TypeScript inference — no JSON required. The result can be serialized to the standard DAG JSON format.
Example
import { DagBuilder } from '@ai-agencee/ai-kit-agent-executor'
const dag = new DagBuilder('My DAG')
.lane('analyse', { agentFile: 'agents/01-business-analyst.agent.json' })
.lane('backend', { agentFile: 'agents/03-backend.agent.json', dependsOn: ['analyse'] })
.lane('frontend', { agentFile: 'agents/04-frontend.agent.json', dependsOn: ['analyse'] })
.barrier('hard', ['backend', 'frontend'])
.lane('e2e', { agentFile: 'agents/06-e2e.agent.json', dependsOn: ['backend', 'frontend'] })
.build()
await orchestrator.runDag(dag)