how do I make the agent not interruptable?
# ask-ai
c
how do I make the agent not interruptable?
t
Thanks for reaching out, Guillaume. I'm an AI assistant and I'm here to help. Give me a moment while I research this topic.
I'd be happy to help you make an agent non-interruptible in LiveKit! You can configure the
allow_interruptions
parameter in a few different ways, depending on what works best for you: • Agent-Level Configuration: You can set
allow_interruptions=False
when creating the agent, which will apply this setting to all interactions. • Session-Level Configuration: If you want to control interruptions for specific sessions, use
allow_interruptions=False
in the
AgentSession
constructor. • Speech-Level Configuration: For more granular control, you can disable interruptions for particular utterances by setting
allow_interruptions=False
in methods like
say()
. • Function Call Context: To prevent interruptions during important tool executions, the
disallow_interruptions()
method comes in handy. Please feel free to reach out if you'd like me to walk you through some detailed examples or if you have any other questions—I’m here to help! Sources: basics/interrupts_user.py | README.md | livekit-agents/livekit/agents/voice/agent_activity.py | Turn detection and interruptions | LiveKit Docs