Skip to Content
ArchitectureSymphony Bus

Symphony Bus

The Symphony Bus (src/lib/symphonyBus.ts) is the real-time messaging system that lets all participants — human or AI — communicate. An intent from the Conductor is broadcast, and the ensemble of Virtuosos reacts, harmonizing outputs into a single multi-modal result.

It is implemented as a custom EventTarget-based bus with task lifecycle management, commission chaining, and telemetry hooks.

Events

EventFired when
task:startA Virtuoso begins a commissioned task
task:progressIntermediate progress (streaming chunks, sub-steps)
task:successThe task completed and produced a result
task:errorThe task failed
commission:chainA completed task commissions a follow-up task on another Virtuoso

Task lifecycle

Commission chaining

Commission chaining is how multi-step orchestration happens without central micromanagement: a Virtuoso finishing a task can commission another specialist with its output as input. For example:

  1. Visionary analyzes frames → emits task:success
  2. Result chains to the Analyst via commission:chain for synthesis
  3. The Critic evaluates the synthesis; on rejection, the chain retries with feedback
  4. The Chronicler formats the approved result for export

Usage

import { symphonyBus, Events } from '@/lib/symphonyBus' symphonyBus.addEventListener(Events.TASK_SUCCESS, e => { const task = (e as CustomEvent).detail console.log(`${task.virtuoso} finished:`, task.result) })

The useSymphony hook (src/hooks/useSymphony.ts) wraps subscription and cleanup for React components, and powers the Orchestra Visualizer — the live panel of glowing orbs showing each active Virtuoso’s status.