Skip to main content
Back to Blog
Engineering

The Boardroom: Real-Time Multi-Agent Deliberation

PAK4L EngineeringFebruary 15, 20266 min read

Most AI tools are opaque. You submit input, wait, and receive output. The reasoning process is hidden — a black box. PAK4L's Boardroom flips this model: the entire deliberation process is streamed to your browser in real time via WebSocket.

Architecture

The Boardroom is built on three layers:

  • Backend orchestrator: Manages the agent lifecycle, batches execution waves, and emits events
  • WebSocket bridge: Streams events from the Python backend to the Next.js frontend with sub-second latency
  • React Boardroom panel: Renders agent avatars, typing indicators, and findings with smooth animations

Event Types

During a review, the Boardroom receives several types of events:

typescript
// Simplified event types
type BoardroomEvent =
  | { type: "agent_start"; agent: string }
  | { type: "agent_comment"; agent: string; text: string }
  | { type: "agent_finding"; agent: string; issue: Issue }
  | { type: "agent_mention"; from: string; to: string; text: string }
  | { type: "agent_complete"; agent: string; summary: string }

When an agent starts, its avatar appears with a typing indicator. As it analyzes the document, comments stream in character by character. When it finds an issue, the finding card slides in with severity coloring. If two agents identify conflicting assessments, you'll see @mention events as they reference each other's findings.

Token-by-Token Streaming

Agent comments aren't dumped all at once — they stream token by token, creating a natural "typing" effect. This is achieved by buffering LLM output tokens and flushing them to the WebSocket at regular intervals. The frontend maintains per-agent token buffers and renders them with a cursor animation.

The Boardroom isn't just eye candy. Users report that watching the deliberation helps them understand why certain issues matter, making the final report more actionable.

Quick Actions

Each finding in the Boardroom comes with a Fix button. Clicking it triggers the Smart Editor, which generates a specific text replacement for the identified issue. You can preview the change, accept it, or modify it before applying — turning findings into action without leaving the review interface.

Performance Considerations

With 15-20 agents generating events simultaneously, the WebSocket can carry hundreds of messages per second. We manage this through event batching (grouping multiple token updates into single frames), priority queuing (findings always take precedence over typing indicators), and client-side virtualization for long review sessions.

Ready to try PAK4L?

Upload a document and see multi-agent review in action.

Get Started Free