Skip to content

feat: Intelligent Backchannel Interruption Handler - Pothamsetti Radha Krishna,NIT DURGAPUR#506

Open
rkpothamsetti wants to merge 1 commit into
Dark-Sys-Jenkins:mainfrom
rkpothamsetti:feature/interrupt-handler-krish
Open

feat: Intelligent Backchannel Interruption Handler - Pothamsetti Radha Krishna,NIT DURGAPUR#506
rkpothamsetti wants to merge 1 commit into
Dark-Sys-Jenkins:mainfrom
rkpothamsetti:feature/interrupt-handler-krish

Conversation

@rkpothamsetti
Copy link
Copy Markdown

Summary

  • Implements context-aware interruption filtering that distinguishes passive acknowledgements (yeah, ok, hmm) from active interruptions (stop, wait, no) based on agent speaking state
  • VAD-only interruptions deferred to STT when agent is speaking to prevent false-start pauses (no stutter)
  • Semantic interruption support for mixed inputs (e.g. "yeah but wait" still interrupts)
  • Configurable backchannel word list via AgentSessionOptions
  • Provider fallback: OpenAI -> Groq for LLM/STT/TTS

Files Changed

  • backchannel.py - New module for backchannel word detection with configurable ignore list
  • agent_activity.py - Integrated state-based filtering into the interruption pipeline
  • agent_session.py - Added configurable backchannel_words option to AgentSessionOptions
  • interrupt_agent.py - Main agent entry point with provider fallback logic
  • traces.py - Fixed OpenTelemetry import compatibility
  • requirements.txt - Updated dependencies
  • test_log.txt - Test proof log transcript
  • INTERRUPT_HANDLER_README.md - Full documentation

Logic Matrix

User Says Agent State Action
Yeah / Ok / Hmm Speaking IGNORE (no pause, no stutter)
Stop / Wait / No Speaking INTERRUPT (agent stops immediately)
Yeah / Ok / Hmm Silent RESPOND (treat as valid input)
Yeah but wait Speaking INTERRUPT (semantic detection)

Test Results

All 4 scenarios verified in test_log.txt:

  1. Backchannel while speaking -> IGNORED (no stutter)
  2. Active interrupt while speaking -> INTERRUPTED
  3. Backchannel while silent -> RESPONDED
  4. Mixed input -> INTERRUPTED (semantic detection)

…ble ignore list, VAD-to-STT deferral, semantic interruption support, and provider fallback (OpenAI to Groq)

Made-with: Cursor
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.

2 participants