agents icon indicating copy to clipboard operation
agents copied to clipboard

Resume false interruption behavior broken

Open yiphei opened this issue 2 weeks ago • 9 comments

Bug Description

I just upgraded livekit agents from 1.2.18 to 1.3.3. Now, the resume false interruption behavior is completely broken. This is the behavior when, if the user does a false interruption (e.g. says "mhmm"), the agent resumes the speech. In 1.3.3., if the user does a false interruption (e.g. says "mhmm"), the agent speech simply stops and does not resume

Expected Behavior

when the agent is speaking, if the user does a false interruption (e.g. says "mhmm"), the agent resumes the speech.

Reproduction Steps

Step 1

Run this code. This is basically the code from https://docs.livekit.io/agents/start/voice-ai/#agent-code but with the agent_false_interruption event logging

from dotenv import load_dotenv

from livekit import agents, rtc
from livekit.agents import AgentServer, AgentSession, Agent, room_io
from livekit.plugins import noise_cancellation, silero
from livekit.plugins.turn_detector.multilingual import MultilingualModel
from livekit.agents import AgentFalseInterruptionEvent

load_dotenv()


class Assistant(Agent):
    def __init__(self) -> None:
        super().__init__(
            instructions="""You are a helpful voice AI assistant.
            You eagerly assist users with their questions by providing information from your extensive knowledge.
            Your responses are concise, to the point, and without any complex formatting or punctuation including emojis, asterisks, or other symbols.
            You are curious, friendly, and have a sense of humor.""",
        )


server = AgentServer()


@server.rtc_session()
async def my_agent(ctx: agents.JobContext):
    session = AgentSession(
        stt="assemblyai/universal-streaming:en",
        llm="openai/gpt-4.1-mini",
        tts="cartesia/sonic-3:9626c31c-bec5-4cca-baa8-f8ba9e84c8bc",
        vad=silero.VAD.load(),
        turn_detection=MultilingualModel(),
        resume_false_interruption=True,
    )

    @session.on("agent_false_interruption")
    def _on_false_interruption(event: AgentFalseInterruptionEvent):
        print(f"\n{'-' * 50}False interruption{'-' * 50}\n")
        print(event)
        print("-" * 120)

    await session.start(
        room=ctx.room,
        agent=Assistant(),
        room_options=room_io.RoomOptions(
            audio_input=room_io.AudioInputOptions(
                noise_cancellation=lambda params: noise_cancellation.BVCTelephony()
                if params.participant.kind == rtc.ParticipantKind.PARTICIPANT_KIND_SIP
                else noise_cancellation.BVC(),
            ),
        ),
    )

    await session.generate_reply(
        instructions="Greet the user and offer your assistance."
    )


if __name__ == "__main__":
    agents.cli.run_app(server)

Step 2

Do a false interruption. The easiest way to do this is to ask the agent "Tell me a very long long story". Then, you interrupt with "mhmm".

Operating System

MacOS Sequoia 15.7.1

Models Used

No response

Package Versions

"livekit-agents[cartesia,deepgram,openai,silero,turn-detector,google,elevenlabs,hume,inworld,assemblyai,mistralai,speechmatics]>=1.3.3",
    "livekit-plugins-noise-cancellation>=0.2.5",
    "silero>=0.4.1",

Session/Room/Call IDs

No response

Proposed Solution


Additional Context

No response

Screenshots and Recordings

No response

yiphei avatar Nov 21 '25 02:11 yiphei