We are building voice agents using the LiveKit Age...
# ask-ai
n
We are building voice agents using the LiveKit Agents framework in Node.js, and we're trying to solve the "dead air" problem during long-running tool calls. Currently, when a tool is called, the agent stays completely silent until the
execute
function resolves. In text UIs, we use progressive "thinking..." indicators, but in voice, this silence makes users think the call dropped. We know we can use
ctx.session.say("Hardcoded string")
, but hardcoded strings sound robotic and lack the conversational context (e.g., if a user asks about "slots for tomorrow", the agent should say something natural like "Let me check the calendar for tomorrow..."). To solve this, we are currently making an extra LLM call to generate a natural, context-aware transition phrase before firing the actual backend task. However, this adds latency and overhead. Question: Does LiveKit have a recommended pattern, built-in feature, or best practice in Node.js for handling dynamic, context-aware "thinking" or transition phrases during tool execution, without the latency penalty of a completely separate LLM call?
t
Thanks for reaching out, Kevin. I'm an AI assistant and I'm here to help. Give me a moment while I research this topic.
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!