Prompts in between message history
# support
j
Say I want the agent to ask 3 questions. After agent asks first question, then user responds—I want to pause the call and send a custom system message to the agent to ask the second question and then resume the call. Is this possible via the API?
v
@jnetic_ Yes, it is possible to implement this flow using the VAPI. You can design the call logic to include pauses and send custom system messages to the agent at specific points in the call. When the agent asks the first question and receives a response, you can trigger a pause in the call and send a system message with instructions for the next question. After the agent receives the message and is ready to proceed, you can resume the call for the second question. This would involve a combination of call control commands and possibly webhook notifications to manage the call flow and agent instructions. If you need assistance with the specific API calls or setting up this workflow, please let me know, and I can provide more detailed guidance or direct you to the appropriate resources.
You can continue this conversation by mentioning me in the message.
Got it. Tagging @User for additional help.
j
@Sahil any thoughts?
s
I think you can do it via Squads.
j
Can you pause / resume the call via api
s
@jnetic_ you cannot pause and resume the call instead using squads/tools delay the assistant response. It can go like this: If user says 'please wait' then continuously call tool untill users says 'resume' Obv you can craft better language and broader sentences here.
j
I see. The point is to have more control over message responses and control over the conversation. Which is badly lacking..
s
You have full control over responses, what's lacking for you?
j
No. You dont have control if you cant control flow of the conversation
Your only control is the agents prompt
If you cant pause conversation as dev and prevent/promote certain agent responses in context and at the right time—and need to depend on the user to say ‘pause’ — that is lack of control
s
the conversation flow is based on your prompting.
First you can use phone call provider bypass feature by then you can control when and how to connect with vapi during the call and even can create a inttegration using code/twiml and vapi do check this https://github.com/VapiAI/advanced-concepts-phone-call-provider-bypass
Second checkout live call control feature if these can help https://docs.vapi.ai/calls/call-features
j
I guess what I mean by conversation flow is to be able to pause and resume it and be able to prompt each agent response dynamically based on user input and latest conv history. Because vapi is live voice and not async text message chat—ability to pause/resume is needed to achieve this level of control for each/all messages from agent. Squads are also very limited without pause/resume
Can the call control message be a backchannel/silent system message for the agent?
So for example, maybe user says ‘ I want ice cream’ and you have another agent listening for inappropriate messages that then sends a backchannel message to main agent to tell it to ignore and get back on track with main prompt
Another use case for pause/resume is that I might want to integrate interactive UI during the call to say show users a multiple choice form during conversation and then resume based on answer
Right now the fact that you just have a single prompt for agent without message level control and pause/resume—makes it very limiting
Not relevant as im using just websdk
s
Yeah to use Vapi for this usecase you can check advance phone call provider bypass and control the call as you required.
you can do this using your single assistant prompt and let user know either get back on context or some generic message.
j
Im using web calls so not relevant for me
This is very limiting
s
yeah as of now but in future there will be options of more controls.
j
Please provide this soon. There needs to be message by message controls for production use cases involving many edge cases that need to be handled. Single prompt is way too limited
And play/pause for the calls with it is needed
s
sure.
j
Will likely stop using vapi if this isnt supported soon
2 Views