ai-agencee logoai-agencee
api

observability

Event Bus

Typed real-time event subscriptions for lane status, token streams, cost updates, and webhook triggers.

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

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