Skip to main content
Processors extend the agent’s capabilities by analyzing and transforming audio/video streams in real-time. They can access incoming media, publish transformed streams back to the call, and (in plugin implementations) feed detection results or external data to the LLM. Common use cases:
  • Video analysis — Pose detection, object recognition, scene understanding
  • Media transformation — Video effects, avatars, filters
  • State injection — Plugin-specific patterns for feeding detection results to the LLM (not automatic in core)

Class Hierarchy

All processors inherit from the abstract Processor base class:

Base Processor

All processors must implement name. The close() method is inherited from Component with a no-op default — override it to release resources. The attach_agent() method is optional.

Video Processor

Receives video tracks from participants. The agent provides a shared VideoForwarder that distributes frames to all processors.

Video Publisher

Outputs a video track to the call (e.g., AI-generated video or avatars).

Video Processor + Publisher

For processors that receive video and output transformed frames (e.g., object detection with annotations).

Audio Processor

Receives audio data from participants. Audio is delivered as PcmData chunks.

Audio Publisher

Outputs an audio track to the call.

Usage

Pass processors to the agent at initialization:
For complete examples including YOLO pose detection and object detection, see Building Video Processors.