Skip to content

Improved agent behavior for handling interruptions and acknowledgements#502

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

Improved agent behavior for handling interruptions and acknowledgements#502
antharya05 wants to merge 1 commit into
Dark-Sys-Jenkins:mainfrom
antharya05:feature/interrupt-handler-antharya05

Conversation

@antharya05
Copy link
Copy Markdown

In this task, I worked on improving how the LiveKit agent handles user inputs during conversation.

The main focus was to make the agent behave more naturally by distinguishing between passive acknowledgements (like "yeah", "ok", "hmm") and actual interruptions (like "stop", "wait").

Key improvements:

  • When the agent is speaking, it ignores passive acknowledgements and continues smoothly without stopping.
  • If the user gives a clear command like "stop" or "wait", the agent immediately interrupts.
  • Mixed inputs such as "yeah wait" are treated as interruptions since they contain intent.
  • When the agent is not speaking, even short inputs like "yeah" are treated as valid responses.

Approach:
I implemented a logic layer on top of the LiveKit event system to track whether the agent is currently speaking or not. Based on this state, user input is classified into ignore, interrupt, or respond categories.

The solution ensures smooth conversational flow and avoids unnecessary interruptions caused by backchanneling.

I have also included a short demo showing:

  • The agent ignoring "yeah/ok" while speaking
  • The agent responding when silent
  • Immediate interruption on "stop"
  • Handling of mixed inputs like "yeah wait"

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