Voice Assistant Not Receiving Async Tool Responses
# support
s
I’m using a simple assistant with a single tool call. When I set sync=True, the tool call works as expected and the voice assistant receives the response. As soon as I switch to async=True, the tool call still happens (I can see on my backend that the request is received, parsed, and returned successfully), but the voice assistant never receives it and therefore can’t read it out loud. I assume that in async mode the response should act as a push notification—i.e., it should trigger the voice assistant to speak the result. Is that correct? For reference, here are the call IDs: Sync mode: b415ca6e-2d68-4b30-8231-7cd4b4ffd380 Async mode: f6514400-4b2f-4dd0-a661-5e68c86c7320 Thanks in advance for your help!
v
In async mode (
async: true
), Vapi does not automatically deliver tool responses to the voice assistant for speech.
The assistant continues the conversation without waiting for the tool result, and there is no built-in push mechanism to have it speak the result when your backend responds. If you want the assistant to read out the tool's response, use
async: false
(synchronous mode) instead. [See documentation](https://docs.vapi.ai/tools/custom-tools#server-response-format-providing-results-and-context) Sources: - [Custom Tools Server Response Format](https://docs.vapi.ai/tools/custom-tools#server-response-format-providing-results-and-context) - [Server Events Function Calling](https://docs.vapi.ai/server-url/events#function-calling)
a
When you set async=True, you're telling Vapi: "Make this tool call, but don't wait for the response - just continue with the conversation." This is useful when you want to trigger something on your server without making the user wait, but you don't necessarily need the response to be spoken back to the user. If you need the result to be presented to the user, you should use async=False, as you've observed it working properly in that mode.
s
@Shubham Bajaj Thanks—that makes perfect sense. Is there a way to invoke the voice agent from my backend so it can speak? For example, I have a use case where some tools run in the background while the voice agent is conversing with the user. I’d like my tool - or any other backend service - to send a request to the voice agent mid-session to trigger it to say something like: “I just got a notification that your XYZ task has completed, and here is the result.”
a
This should help