Skip to content

feat(voice): surface backchannel opportunities and flush TTS before tool calls - #7150

Open
AinaLuc wants to merge 6 commits into
livekit:mainfrom
AinaLuc:feat/agent-backchannel-opportunity-event
Open

feat(voice): surface backchannel opportunities and flush TTS before tool calls#7150
AinaLuc wants to merge 6 commits into
livekit:mainfrom
AinaLuc:feat/agent-backchannel-opportunity-event

Conversation

@AinaLuc

@AinaLuc AinaLuc commented Sep 7, 2026

Copy link
Copy Markdown

Summary

  • Surface agent_backchannel_opportunity as a public event
  • Add Agent.on_backchannel_opportunity() for custom backchannel handling
  • Flush in-progress TTS as soon as an LLM tool call starts streaming

Testing

  • Added unit coverage for flush sentinel behavior and tool-call dispatch

@AinaLuc
AinaLuc requested a review from a team as a code owner September 7, 2026 08:38
devin-ai-integration[bot]

This comment was marked as resolved.

devin-ai-integration[bot]

This comment was marked as resolved.

AinaLuc and others added 4 commits September 8, 2026 10:07
Promote the previously-internal _AgentBackchannelOpportunityEvent to a
public AgentBackchannelOpportunityEvent, emitted on AgentSession and
dispatched to a new Agent.on_backchannel_opportunity() hook so agents
can react to mid-turn pauses with acknowledgment phrases.

Also fixes a race in AudioRecognition.update_vad(): the old VAD task
was cancelled after the new one was already created/assigned, so a
rapid update could have the old task's cleanup clobber the new
stream/channel. Introduces a generation counter so a stale VAD task's
events and cleanup are ignored once superseded.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@AinaLuc
AinaLuc force-pushed the feat/agent-backchannel-opportunity-event branch from 0ae5647 to 67cf0db Compare September 8, 2026 02:09
devin-ai-integration[bot]

This comment was marked as resolved.

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