A LiveKit receptionist checks an external system and falls silent while the request runs. The caller starts speaking again, the original result arrives late, and the agent now has two incompatible versions of the request.
Slow tool calls need both a technical execution policy and a conversational policy. Making a network call asynchronous does not, by itself, define what the caller should hear.
Separate waiting from the business action
A read-only availability lookup can often be abandoned and repeated. Creating a booking is different: the remote system may commit the change even if the local task is cancelled.
Classify each tool before adding interruption behaviour:
| Tool type | Main design question |
|---|---|
| Read-only lookup | Can an obsolete result be ignored safely? |
| Record creation | How do we detect a completed write after timeout? |
| Multi-step change | How is partial completion reconciled? |
The current LiveKit async-tool guidance describes background execution and cancellation controls. Check the documentation for your installed SDK before adopting an example. Framework cancellation cannot reverse a transaction already accepted by another system.
Give every invocation a request identity
For a fictional appointment flow, attach a conversation reference, operation reference, and request version to the lookup. If the caller changes the service or date, the integration should know that an earlier availability result is stale.
Do not let a late result overwrite the newest request merely because it completed last. A useful result contract includes the operation identity, status, relevant values, and whether the request still matches the current conversation state.
For writes, maintain an operation record independent of the call's lifetime. The office may need to reconcile the outcome after the caller disconnects.
Explain the wait without promising success
A short status message can say that the receptionist is checking availability. It should not imply that a slot is held or a booking confirmed.
LiveKit's tool-loop design guidance discusses keeping callers informed during slow work. Use purposeful messages and avoid repeating them on a fixed timer regardless of what is happening.
If the wait exceeds the agreed limit, switch to a truthful fallback. Capture the request for follow-up, or explain that the result remains unconfirmed. The uncertain-timeout article covers remote writes in detail.
Test the interaction, not just the API response
Use a controlled slow dependency. Test a caller correction, interruption, repeat request, disconnect, and eventual late response. Check which result the agent uses and which action the backend ultimately saves.
Keeping a conversation responsive adds state-management work. For a small pilot, a bounded synchronous lookup with a clear fallback may be easier to verify than several background tasks. Choose based on the required workflow rather than a preference for concurrency.
Slow-tool questions
Does cancelling a task cancel a booking?
Not necessarily. Reconcile against the external system's actual result.
Should every slow tool run in the background?
No. Start with tools whose lifecycle and obsolete-result handling you can define.
What should a debugging trace include?
Record request version, timestamps, external reference, and final state. That is useful evidence for a LiveKit review.