RoomOptions
RoomOptions
is a configuration class that defines how an AI agent connects to and behaves within a VideoSDK meeting room. It serves as the primary interface for customizing agent behavior, meeting connection parameters, and session management settings.
Introduction
The RoomOptions
class is the central configuration point for VideoSDK AI agents, providing comprehensive control over how agents join meetings, interact with participants, and manage their sessions. This configuration is passed to the JobContext
during agent initialization and influences all aspects of the agent's behavior within the meeting environment.
Core Features
- Meeting Connection: Configure room ID and authentication for VideoSDK meetings
- Agent Identity: Set display name and visual representation
- Session Management: Control automatic session termination and timeouts
- Media Capabilities: Enable vision processing and meeting recording
- Development Tools: Playground mode for testing and development
- Error Handling: Custom error handling callbacks
- Avatar Integration: Support for virtual avatars
Basic Example
from videosdk.agents import RoomOptions, JobContext
# Basic configuration
room_options = RoomOptions(
room_id="your-meeting-id",
name="My AI Agent",
playground=True
)
# Create job context
context = JobContext(room_options=room_options)
Parameters
Parameters that you can pass with RoomOptions
:
Parameter | Type | Default | Description |
---|---|---|---|
room_id | Optional[str] | None | Unique identifier for the VideoSDK meeting |
auth_token | Optional[str] | None | VideoSDK authentication token |
name | Optional[str] | "Agent" | Display name of the agent in the meeting |
playground | bool | True | Enable playground mode for easy testing |
vision | bool | False | Enable video processing capabilities |
recording | bool | False | Enable meeting recording |
avatar | Optional[Any] | None | Virtual avatar for visual representation |
join_meeting | Optional[bool] | True | Whether agent should join the meeting |
on_room_error | Optional[Callable] | None | Error handling callback function |
auto_end_session | bool | True | Automatically end session when participants leave |
session_timeout_seconds | Optional[int] | 30 | Timeout for automatic session termination |
signaling_base_url | Optional[str] | None | Custom VideoSDK signaling server URL |
Additional Resources
Playground Mode
A testing environment to experiment with different agent configurations
Vision Integration
Enable agents to receive and process video input from the meeting
Recording Capabilities
Record agent sessions for analysis and quality assurance
Avatar
Use Avatar for visually engaging AI Voice Agent
Got a Question? Ask us on discord