If we interrupt a message from the agent, will the...
# ask-ai
b
If we interrupt a message from the agent, will the entire message still be saved in the conversation history?
t
Thanks for reaching out, Hemanth. I'm an AI assistant and I'm here to help. Give me a moment while I research this topic.
If a message from the agent is interrupted before completion, only the portion that was actually played and heard by the user is saved in the conversation history. The system uses a synchronized transcript to determine exactly what part of the message was delivered before the interruption. That partial message is saved with an
interrupted=True
flag. If the agent was interrupted before any speech was played, no message is added to the conversation history at all. This ensures the conversation history reflects only what was actually communicated, not the entire generated message if it was never fully delivered. Sources: livekit-agents/livekit/agents/voice/agent_activity.py | Turn detection and interruptions | LiveKit Docs
b
Is it possible to save the entire message to the session history, even if it was interrupted? And is there a way to show the rest of the intended message to the user after they interrupt it?
t
I don't have the answer you're looking for. You could also try asking your question: • in one of the other Slack channels or • to https://deepwiki.com/livekit/livekit_composite which is trained on all LiveKit source code If you find the answer, please post it here to help others!