Voice agent booking failures and the "You're booked" that wasn't
Voice agent booking failures include the date the caller corrected, the double booking from a retry and the booking never made. Rules in a LiveKit agent stop the bad call before it runs.
Amiril
Vapi's guide to testing voice assistants warns that a call can sound fine while the task fails, "for example when the assistant says 'You're booked' and nothing was booked". Nobody on the call can tell, and there's no wrong entry in the calendar for anyone to find later. Other voice agent booking failures do leave one: a caller corrects the day and the agent books the old one, or a timed-out request is sent again and the appointment lands twice. Both show up as a booking tool call that shouldn't have run, and Amiril's SDK can refuse that call before it reaches your calendar.
Where voice agent booking failures start
Many voice agent booking failures begin with a platform setting that its own docs describe. Vapi tool calls have an async flag. A Function tool set to async: true gets an immediate Success. back, and Vapi's troubleshooting page says it "does not use the webhook's eventual response as the tool result". Leave async off the booking tool. With it on, the model hears success before your calendar has done anything.
Retell booking errors can multiply through the retry setting. A Retell custom function times out after 2 minutes by default, and max_retry can send it again up to 5 times on any failure, timeouts included. Retell's docs warn that "each retry repeats the request, so your endpoint may process it more than once", and only the last attempt's result reaches the agent. Keep max_retry at 0 for any function that writes, or a slow endpoint that saved the appointment and answered late saves it again on each retry.
Cekura's page on testing function calls sorts the ways a voice agent's tool call goes wrong into six forms. They include a misheard argument, an action narrated but never made and a double write, where "an interruption or retry fires the booking tool twice". The examples of voice agent booking failures below use a salon's LiveKit phone line with find_slots, book_appointment and find_bookings tools.
The retry that turns into a double booking
After a timeout, nobody knows whether the calendar saved the appointment before the connection failed. In a post on bookings that never reach the calendar, Evgenii Doronin names both wrong answers. "Retrying immediately can create a second booking. Declaring failure can also be wrong if the first appointment already exists." His fix is on the server, with a durable reference for each booking and a check of uncertain outcomes before any second write. On a hosted calendar you can't change, the agent is the only place left to make that check.
When book_appointment raises, because the calendar client timed out or returned an error, the Amiril SDK records the call as failed. This rule then refuses another booking for the same time until the agent has looked up the caller's bookings after the failure:
@id("look-before-retry")
@sentence("A booking for this time failed earlier on this call and may already be in the calendar")
block (
agent == "front_desk",
tool == "book_appointment"
)
when {
book_appointment[status == "error", same == "start"]{}
&& !(find_bookings{} && book_appointment[status == "error", same == "start"]{} -> find_bookings{})
};
In the pattern, status == "error" counts only earlier bookings that failed, and same == "start" only those for the same start time as this one. The arrow asks for a find_bookings call after the latest of those failures. A lookup made before the failure doesn't count. Tell the agent in its instructions to call find_bookings after any failed booking. The rule is for the calls where the model forgets and goes straight back to book_appointment.
LiveKit's function tool docs say an interruption doesn't cancel a running tool, which keeps running in the background until it returns. LiveKit's post on async tools adds that when the caller talks over the agent, the tool's result is discarded. So a caller who cuts in on "let me book that for you" can leave the model without the result, and the next "yes, book it" sends a second write for a slot that is already taken. Once the first booking has gone through, this rule blocks any other booking for that time on the same call:
@id("one-booking-per-slot")
@per("start")
@sentence("This slot was already booked earlier on this call")
block (
agent == "front_desk",
tool == "book_appointment"
)
when {
book_appointment{}
};
@per("start") makes the empty pattern book_appointment{} match only earlier bookings with the same start on the call. A pattern counts only calls that returned without an error unless it says otherwise, so a failed booking is left to look-before-retry, and a booking still running in the background doesn't count until it returns. For the interruption itself, LiveKit recommends calling disallow_interruptions() at the start of any tool that writes.
The date the caller corrected
In Where Voice Agents Actually Break, from October, a caller pauses to correct Tuesday to Thursday and the agent still records Tuesday. Sometimes the Tuesday booking has already started before the caller finishes. In another version the agent does search again for Thursday, then books the Tuesday time it heard first, because that one is still sitting in the conversation.
@id("slot-from-latest-search")
@sentence("{start} is not one of the times the last slot search returned")
block (
agent == "front_desk",
tool == "book_appointment"
)
unless {
any(latest(find_slots{}).result.slots, it == call.args.start)
};
latest(find_slots{}) is the newest search on the call, so once the agent has searched Thursday, Tuesday's times stop counting. The same rule catches a time no search returned at all, like the Sunday slot in our post on monitoring a LiveKit booking agent. It compares strings, so the tool's docstring should tell the model to pass the start time exactly as find_slots gave it. A Tuesday booking after a Thursday search gets the model this reply in place of the tool's result:
The call to book_appointment was not performed. Rule slot-from-latest-search blocked it: 2026-12-08T16:15 is not one of the times the last slot search returned (find_slots.latest.result.slots 2026-12-10T10:00 and 2026-12-10T16:15). Do not retry this call with different arguments or achieve the same outcome another way; tell the user it was not performed.
The values in parentheses are what the rule read. From them the model can tell the caller Tuesday wasn't booked and offer Thursday's two times. When the caller picks one, that booking is a new request, and the rule lets it through.
When the agent books Tuesday before the caller finishes, or never searches again, the caller may well say so. "No, I said Thursday" is what one of Amiril's checks listens for, a caller saying they already gave something, and the run joins an issue with every other call where that happened.
"You're booked" with nothing booked
Amiril's voice agent monitoring catches the narrated booking by how the call ended. On the agent's page in Amiril, fill in What counts as success, which for this line is a booking that went through. Each call then shows Succeeded or Did not succeed. Amiril groups calls with similar summaries into run topics. When calls in a run topic usually succeed and three of them don't, Amiril opens an issue for those three, and a single failed call you confirm gets one too. Run topics where callers only asked about prices can be marked No outcome expected, so they stay out of the count.
The grounding check covers the variant where the agent confirms a time that came from nowhere. Amiril reads every call for a time, a date or a phone number the agent stated that no tool result or earlier message contains, and a failed grounding check starts an issue at Critical severity. Both read the call's traces, and the monitoring post has the few lines of OpenTelemetry setup that send them from a LiveKit agent.
Wiring the rules into the LiveKit agent
The SDK checks each tool call against its own copy of your published rules. Wrap each function tool with it, under LiveKit's @function_tool:
from amiril import plain
from livekit.agents import function_tool
def booking_tools(sdk_agent: plain.Agent) -> list:
@function_tool
@sdk_agent.tool
async def find_slots(service: str, day: str) -> dict:
"""List the free start times for a service on a day (YYYY-MM-DD)."""
return {"slots": await calendar.free_slots(service, day)}
@function_tool
@sdk_agent.tool
async def book_appointment(service: str, start: str, customer_name: str, customer_phone: str) -> dict:
"""Book a service at a start time, passed exactly as find_slots returned it."""
return await calendar.book(service, start, customer_name, customer_phone)
@function_tool
@sdk_agent.tool
async def find_bookings(customer_phone: str) -> dict:
"""List the bookings already held under a phone number."""
return {"bookings": await calendar.bookings_for(customer_phone)}
return [find_slots, book_appointment, find_bookings]
calendar stands for your own booking client. The rules name the agent front_desk, which is what LiveKit calls a FrontDesk agent class in its traces, so the SDK agent is plain.Agent("front_desk"). amiril.init(handle_sigterm=False) goes in the setup_fnc you pass to AgentServer. The entrypoint starts the session inside the SDK's run and marks a turn after each batch of tool calls:
async with sdk_agent.run(session_id=ctx.room.name) as run:
session.on("function_tools_executed", lambda _event: run.turn())
await session.start(agent=FrontDesk(booking_tools(sdk_agent)), room=ctx.room)
await closed.wait()
closed is an asyncio.Event set from the session's close event, as in the booking guardrails post. The turn marks let a rule see the earlier calls, such as the search slot-from-latest-search reads.
The rules read the tool names and arguments of this example, so rename find_slots, start and the rest to match your own tools.
Shadow before Enforce
A new rule starts in Shadow. It checks every call and records what it would have done, and every booking still goes through. Test on past calls replays a rule over the last 24 hours, 7 days or 30 days of your agent's real calls and lists each one it would have fired on. For slot-from-latest-search that list is how you'd learn your calendar returns times with seconds on them and the model drops them, before a single caller is refused. When the list holds only bookings you meant to stop, switch the rule to Enforce. The SDK picks the change up within about a minute, with no redeploy.