Overview
Every DAG run emits typed lifecycle events on the global event bus. Subscribe to them programmatically or receive them via SSE / webhooks.
Event Types
| Event | Payload |
|---|---|
| `lane:start` | `{ laneId, dagId, timestamp }` |
| `lane:complete` | `{ laneId, status, costUsd }` |
| `token:delta` | `{ laneId, token, totalTokens }` |
| `cost:update` | `{ laneId, incrementalUsd, totalUsd }` |
| `verdict:issued` | `{ laneId, verdict, guidance }` |
| `human-review-required` | `{ laneId, reason, context }` |
Subscribe
import { getGlobalEventBus } from '@ai-agencee/ai-kit-agent-executor'
const bus = getGlobalEventBus()
bus.on('lane:complete', ({ laneId, status, costUsd }) => {
console.log(`Lane ${laneId} → ${status} ($${costUsd.toFixed(4)})`)
})