helpful-salesclerk-77327
08/04/2025, 5:44 AMtall-airline-16756
08/04/2025, 5:44 AMtall-airline-16756
08/04/2025, 5:44 AMmin_endpointing_delay (default is 500ms), the agent considers the turn complete.
• Turn Detector Plugin: Enhances VAD by understanding conversational context. It can wait longer before responding if it predicts the user will continue.
• InactivityHandler: An optional feature that triggers an agent message after a set period of silence, which is customizable.
For example, if there is a long pause, the InactivityHandler can prompt the user with a message.helpful-salesclerk-77327
08/04/2025, 5:47 AMtall-airline-16756
08/04/2025, 5:47 AMfrom agent_extensions.handlers import InactivityHandler
# Set up the InactivityHandler with a 10-second timeout and a friendly message
inactivity_handler = InactivityHandler(
timeout_seconds=10,
inactivity_message="Are you still there?"
)
# Kick off the handler with your agent
inactivity_handler.start(agent)
# Behind the scenes, it keeps an eye on activity and sends a message if things go quiet
What’s happening here:
• Initialization: You tell it how long to wait with timeout_seconds, and what message to send with inactivity_message.
• Activity Tracking: It watches for when the user starts talking and resets the timer so it doesn’t interrupt.
• Inactivity Handling: If no one says anything within the timeout, it gently checks in with your message.
It’s a handy way to keep your app feeling responsive and make sure users don’t get left hanging.
Sources: agent_extensions/agent_extensions/__init__.py | Example Applications | livekit/livekit_composite | DeepWikihelpful-salesclerk-77327
08/04/2025, 12:45 PMtall-airline-16756
08/04/2025, 12:45 PM