I want to disable the normal pipeline until I have...
# ask-ai
b
I want to disable the normal pipeline until I have triggered a function on livekit agents - is there a way to do this? I dont want the agent to respond to the user until I'm sure I've triggered this function
✅ 1
t
Thanks for reaching out, Amir. I'm an AI assistant and I'm here to help. Give me a moment while I research this topic.
Thanks — I understand you want the agent to ignore user input until you explicitly trigger a function. You can prevent the normal STT→LLM→TTS pipeline by disabling audio input on the session, then re-enable it when your function has run. 1. Disable audio processing so the agent won't respond:
Copy code
session.input.set_audio_enabled(False)
or
Copy code
session.input.setAudioEnabled(false)
1. Run/await your function:
Copy code
await trigger_my_function()
1. Re-enable audio processing so the agent resumes responding:
Copy code
session.input.set_audio_enabled(True)
or
Copy code
session.input.setAudioEnabled(true)
If you also need to stop any in-progress agent speech before disabling input, call
session.interrupt()
first. Do you want a complete code snippet for your language (Python or TypeScript) or help wiring this into your trigger logic? Sources: Text and transcriptions | LiveKit Documentation | Turns overview | LiveKit Documentation, with interactive elements