Skip to main content

Agents Playground

The Agents Playground provides an interactive testing environment where you can directly communicate with your AI agents during development. This feature enables rapid prototyping, testing, and debugging of your voice AI implementations without needing a separate client application.

Overview

Playground mode creates a web-based interface that connects directly to your agent session, allowing you to:

  • Test agent in real-time
  • Demonstrate agent capabilities to stakeholders

Enabling Playground Mode

To activate playground mode, simply set playground: True in your RoomOptions for JobContext.

Basic Implementation

from videosdk.agents import RoomOptions, JobContext, WorkerJob

async def entrypoint(ctx: JobContext):
# Your agent implementation here
# This is where you create your pipeline, agent, and session
pass

def make_context() -> JobContext:
room_options = RoomOptions(
room_id="<meeting_id>",
name="Test Agent",
playground=True # Enable playground mode
)

return JobContext(room_options=room_options)

if __name__ == "__main__":
from videosdk.agents import WorkerJob
job = WorkerJob(entrypoint=entrypoint, jobctx=make_context)
job.start()

Accessing the Playground

Once your agent session starts, the playground URL will be displayed in your terminal:

Agent started in playground mode
Interact with agent here at:
https://playground.videosdk.live?token={auth_token}&meetingId={meeting_id}

URL Structure

The playground URL follows this format:

https://playground.videosdk.live?token={auth_token}&meetingId={meeting_id}

Where:

  • auth_token: videosdk_auth that is provided in session context or in env file.
  • meeting_id: The meeting ID specified in session context.

Note: Playground mode is designed for development and testing purposes. For production deployments, ensure playground mode is disabled to maintain security and performance.

Got a Question? Ask us on discord