When a voice agent calls a tool, the caller hears nothing. The LLM has decided to look up an order or search for flights, the request is out to some API, and until the result comes back there is no text to send to TTS. On a web page you would show a spinner. On a phone call there is no spinner, so the caller just hears silence and starts to wonder if the line dropped.
This post is about how I think about that silence: when to fill it, what to say, and what to do when the tool is slow enough that the conversation should keep going without it. The code is TypeScript, and the last part uses the tool helpers in LiveKit's Node.js Agents SDK, which I checked against @livekit/agents 1.11.0.
In a normal voice agent turn, the delay the caller feels is roughly end-of-turn detection, plus the LLM's first token, plus TTS time to first audio. When I worked on latency for Quick Start AI's voice agents, getting that path from about 2 seconds down to around 800 ms made a clear difference in how the calls felt. A tool call sits in the middle of that path. The model streams out a function call instead of words, your code runs it, and only then does the model get a second chance to produce text the caller can hear.
So a 3 second CRM lookup doesn't add 3 seconds to a fast turn. It adds 3 seconds of nothing, which is a very different experience. People on a phone treat a long gap as a sign that something broke. They say "hello?", they repeat the question, or they hang up. If the repeat gets transcribed as a new turn, the model might also call the same tool a second time, which is a problem I'll come back to.
There is also a quieter failure inside the framework itself. Many voice stacks have a "user went quiet" timer that asks "are you still there?" after some seconds of silence. If that timer doesn't know a tool is running, the agent can ask the caller if they're still there while the caller is the one waiting. LiveKit fixed exactly this case in its Python agents in August 2026 (PR #6937), so the away timer no longer arms while a tool runs. It's worth checking whatever you use for the same bug.
I find it easier to stop treating every tool call the same way and sort them by how long they usually take.
Fast calls finish in a few hundred milliseconds. A Redis read, a lookup in your own Postgres, a quick internal service. For these, say nothing extra. Adding "let me check that for you" before a 200 ms lookup makes the turn longer, because the filler itself takes about a second to speak.
Medium calls take one to a few seconds. Third-party APIs, a calendar availability check, a RAG query that hits a vector store and a reranker. These are the ones that need a short spoken line, but only if the call actually turns out to be slow.
Long calls take ten seconds or more. Flight searches, payment processing, anything that waits on another company's system. A single filler line isn't enough here. The agent should tell the caller what's happening and keep talking with them while the work runs in the background.
The mistake I see most often is speaking a filler phrase every time a tool starts. The better rule is to start a timer when the tool starts, and only speak if the tool is still running when the timer fires. If the tool finishes first, the timer is cleared and the caller never hears the filler.
Here's a small framework-free version. speak is whatever pushes text into your TTS, and callerIsSpeaking comes from your VAD or STT state.
export async function runWithFiller<T>(
work: () => Promise<T>,
opts: {
afterMs: number;
line: string;
speak: (text: string) => void;
callerIsSpeaking: () => boolean;
},
): Promise<T> {
const timer = setTimeout(() => {
// Skip the filler if the caller has started talking.
if (!opts.callerIsSpeaking()) opts.speak(opts.line);
}, opts.afterMs);
try {
return await work();
} finally {
// If the work finished first, the filler never plays.
clearTimeout(timer);
}
}
A value around 700 to 1,000 ms for afterMs is a reasonable place to start, but tune it from your own call logs instead of trusting my number. One edge case is worth handling: the filler can start playing right before the result arrives. In that case let the filler finish and queue the real answer after it. Cutting off your own agent mid-word sounds worse than waiting one more second.
A filler line should be neutral. "One moment while I check that" is fine. "Great, your appointment is booked" is not, because the tool hasn't returned yet and it might fail. If the LLM generates the filler, it will sometimes guess the outcome, so I prefer fixed strings for fillers, or a strict instruction when the model writes the progress message.
This matters more with long calls. If the agent tells the caller "I found a flight for 289 dollars" from a partial result and the final booking comes back at a different price, the agent now has to walk back something it said out loud. On a text chat you can edit a message. On a call, the caller already heard it.
For tools that take many seconds, blocking the whole turn is the wrong shape. The agent should give a status, go back to listening, and deliver the result when it arrives. LiveKit's Node.js SDK has two helpers on the tool's RunContext for this, and they map closely to the two problems above.
ctx.update(message) reports progress. The first call is special: the SDK treats that message as the tool's immediate result, hands control back to the session, and keeps your execute() running in the background. Whatever execute() finally returns is delivered later as a deferred reply, and later updates are only voiced when the session is idle, so they don't talk over the caller. The default template that wraps each update also tells the model the task is still running and not to make up information that isn't in the message.
ctx.filler(source, options, fn) handles the acoustic part. It waits until the session has been continuously idle for delay milliseconds, then speaks the filler through AgentSession.say, with no extra LLM round trip. With interval set it can fire again after a cooldown, and maxSteps caps how many times. Agent speech, user speech and update() reset the wait, so the filler doesn't race a real turn.
import { llm } from '@livekit/agents';
import { z } from 'zod';
export const findFlights = llm.tool({
name: 'find_flights',
description: 'Search flights for the caller. Can take 10 to 30 seconds.',
parameters: z.object({
from: z.string(),
to: z.string(),
date: z.string().describe('YYYY-MM-DD'),
}),
flags: llm.ToolFlag.CANCELLABLE,
onDuplicate: 'reject',
execute: async ({ from, to, date }, { ctx, abortSignal }) => {
// The model gets this as the immediate result; the call keeps running.
await ctx.update(`Searching flights from ${from} to ${to} on ${date}.`);
const result = await ctx.filler(
(step) => ['Still looking, one moment.', 'Almost done.'][step],
{ delay: 5000, interval: 8000, maxSteps: 2 },
() => searchFlights({ from, to, date }, abortSignal),
);
return `Found ${result.count} flights. Cheapest: ${result.cheapest}.`;
},
});
searchFlights is your own function. The important detail is that it receives abortSignal, which brings us to the last part.
Once a tool runs in the background, the caller can change their mind while it's still running. "Actually, make that Friday" should stop the Thursday search, and a hang-up should stop everything.
In the LiveKit SDK, marking a tool ToolFlag.CANCELLABLE lets the model cancel a running call through a built-in lk_agents_cancel_task tool, which aborts the abortSignal passed to execute(). That only helps if your code passes the signal down to fetch or your HTTP client. If it doesn't, the SDK logs a warning that the tool is still running after the cancel deadline and "likely does not honor the abort signal."
onDuplicate covers the repeat problem from earlier. With 'reject', if the model calls find_flights again while one is running, it gets a message saying the same tool is already running instead of starting a second search. 'confirm' asks the model to call again with an explicit confirmation if it really wants a duplicate, and 'replace' and 'allow' are the other options.
For anything that writes data, like a booking or a payment, I'd still add an idempotency key on the API side, built from the call ID and the action. The framework can stop most duplicate calls, but the system that charges the card should be the last line of defense.
None of this is useful if you can't see where the silence happens. For each turn I'd log when the caller stopped speaking, when the tool started and ended, when any filler played, and when the first real answer audio went out. An average latency number hides the one turn where a tool took four seconds and the caller sat in dead air, so look at the slow tail per tool. That tells you which tools belong in which of the three buckets, and the buckets tell you what the agent should say while it waits.