In chat/voice agent before a tool call how to conf...
# ask-ai
l
In chat/voice agent before a tool call how to configure agent so that it can speak the filler response?
t
Thanks for reaching out, Munim. 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 configure a chat/voice agent to speak a filler response before a tool call! You have two great options to choose from: • Preemptive Filler Response: This approach lets the agent quickly acknowledge the user (for example, saying "Let me think about that") right after they finish speaking. It uses a lightweight LLM to create this filler response asynchronously during the
on_user_turn_completed
event. • Tool Call Detection: Here, you override the
llm_node
method to spot when a tool call begins. As soon as it's detected, the agent can respond with a predefined filler like "Sure, I'll check that for you." Both methods will need a TTS plugin so the agent can actually speak the filler response. If you'd like, I’m here to walk you through the details or help with the implementation—just let me know! Sources: External data and RAG | LiveKit Docs | livekit-agents/livekit/agents/voice/agent_activity.py | agent.py | Agent speech and audio | LiveKit Docs
l
how to make sure it says filler before it will call a tool? does livekit provides any extra support for this?
t
I’m glad you asked about how to have the agent say a filler response before calling a tool! LiveKit makes this easy with a thoughtful approach: • Fast Pre-Response: You can use a lightweight LLM to quickly generate a friendly acknowledgment like "Let me think about that" right after the user finishes speaking. This happens asynchronously during the
on_user_turn_completed
event, so your user gets instant feedback without any delay. • Tool Call Detection: When a tool call is detected in the
llm_node
method, LiveKit can trigger a warm filler response such as "Sure, I'll check that for you" right as the tool call starts. Plus, LiveKit supports verbal status updates during longer tool workflows and even structured output for more expressive filler responses. If you'd like, I’m here to help you step through implementing these features—just let me know! Sources: livekit-agents/livekit/agents/beta/workflows/email_address.py | External data and RAG | LiveKit Docs | Tool definition and use | LiveKit Docs