Skip to content

Implement intelligent interruption handling logic#492

Open
SakashSrivastava wants to merge 1 commit intoDark-Sys-Jenkins:mainfrom
SakashSrivastava:feature/interrupt-handler-sakash
Open

Implement intelligent interruption handling logic#492
SakashSrivastava wants to merge 1 commit intoDark-Sys-Jenkins:mainfrom
SakashSrivastava:feature/interrupt-handler-sakash

Conversation

@SakashSrivastava
Copy link

@SakashSrivastava SakashSrivastava commented Feb 2, 2026

Summary

Implemented intelligent interruption handling that distinguishes between passive acknowledgements (filler words) and active interruptions based on agent speaking state.

Changes Made

New Files:

  • livekit-agents/livekit/agents/voice/interruption_handler.py`**: Core module for intelligent interruption detection
  • InterruptionHandler` class with configurable ignore words
  • Methods for text normalization and filler word detection
  • Handles mixed inputs (e.g., "yeah but wait")

Modified Files:

  • livekit-agents/livekit/agents/voice/agent_activity.py`**:

  • Added early checks in on_vad_inference_done to prevent audio breaks

  • Ultra-early filler word detection in _interrupt_by_audio_activity

  • Prevents calling interruption logic when transcript is empty or contains filler words

  • Added debouncing to prevent duplicate processing

  • examples/voice_agents/basic_agent.py`**:

  • Updated to use Deepgram STT/TTS and Groq LLM

  • Configured for testing interruption scenarios

  • livekit-agents/livekit/agents/ipc/supervised_proc.py`**:

  • Fixed Windows signal handling issue

Features Implemented

✅ Scenario 1: Agent ignores "yeah/ok/hmm" while speaking (no audio breaks, pauses, or stutters)
✅ Scenario 2: Agent responds to "yeah" when silent (treats as valid input)
✅ Scenario 3: Agent interrupts immediately for commands like "stop" or "no"
✅ Scenario 4: Agent handles mixed inputs like "yeah okay but wait" (interrupts due to "wait")

Configuration

The ignore list is configurable via environment variable:
export AGENT_IGNORE_WORDS="yeah,ok,hmm,right,uh-huh,aha,yep,yup,okay"

Proof

A short video demonstrating all required test scenarios was submitted via the official Google Form.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant