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 agent session context:
Basic Implementation​
from videosdk.agents import AgentSession
def make_context():
return {
"meetingId": "<Meeting-ID>",
"name": "<Agent-Name>",
"playground": True
}
# Initialize the agent session with all components
session = AgentSession(
agent=VoiceAgent(),
pipeline=pipeline,
context=make_context
)
# Start the agent session
session.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