Overview
Pipeline idle detection monitors activity in your pipeline and can automatically cancel tasks when no meaningful interactions are occurring. This helps prevent pipelines from running indefinitely when a conversation has naturally ended but wasn’t properly terminated.How It Works
The system monitors specific “activity frames” that indicate the bot is actively engaged in the conversation. By default, these are:BotSpeakingFrame- When the bot is speakingUserSpeakingFrame- When the user is speaking
Idle detection only starts after the pipeline has begun processing frames. The
idle timer resets whenever an activity frame (as specified in
idle_timeout_frames) is received.Configuration
You can configure idle detection behavior when creating aPipelineWorker:
Configuration Parameters
Timeout in seconds before considering the pipeline idle. Set to
None to
disable idle detection.Frame types that should prevent the pipeline from being considered idle.
Whether to automatically cancel the pipeline task when idle timeout is
reached.