Is there any way VAPI Agent can gracefully complet...
# support
d
I want to have an ability into my voice agent so that it can understand when objective is met and then gracefully complete the call. Right now it seems VAPI Agent only support call termination based on Keyword which is not efficient one.
v
message has been deleted
@dl_amit Absolutely, I understand the need for a more dynamic and context-aware approach to call termination. VAPI can be programmed to recognize when an objective is met by analyzing the conversation and using certain triggers or conditions to determine the appropriate time to end the call. To achieve this, you would typically implement logic that keeps track of the conversation's progress and checks against predefined goals or objectives. Once the system detects that the objectives have been met, it can use the
say
method with the
endCallAfterSpoken
parameter set to
true
to gracefully end the call. For example, you could set up a system that listens for confirmation from the user that their issue has been resolved or their question has been answered. When that confirmation is detected, the VAPI could respond with a closing statement and then terminate the call. Would you like to proceed with setting up such a feature, or do you need assistance with a specific part of the implementation?
You can continue this conversation by mentioning me in the message.
d
I need more documentation help @User @User
@Vapi
v
@dl_amit Please ask support for more info on this.
s
@dl_amit Could you please provide an example with additional context? This would greatly enhance my understanding and enable me to assist you more effectively.
d
Lets say my objective of the outbound call is to agree for upsell. So the outbound vapi agent should track the conversations w.r.t to given objectives in its system prompt and then bring the call towards graceful completion once the objective is met.
s
@dl_amit this has been done through prompting which you can learn from here https://docs.vapi.ai/prompting-guide