Hey everybody, how do you instruct the
# general-english
v
Hey everybody, how do you instruct the voice agent to execute a tool at the start of the call ? Not a
serverMessage
, but a tool-call, that is being added to the agent, like an API call to my server, that way I can attach the customer phone and the vapi call id in my database ? I've tried prompting the agent but to no avail
k
Define and add a custom tool to your assistant, then prompt the agent to invoke it at call start with needed data like phone and call ID.
Check with call
c9586924-c25e-48fa-818a-d20217e4fb47
for example @Kings_big💫
k
Looking into it
b
I believe we are trying to solve the same thing
basically, I have to start talking for the system to go and try to execute tool usage
its working fine after i say something or respond to "first message"
same for you?
v
Yes. I've managed to trigger the tool call once, after the user says " Hello ", or replies back to the agent
b
yeah same...i cant find anything in the docs
the behavior of the system out of the box for outbound calling makes sense, because people say hello and start the flow
but for inbound calling, where the user doesnt say anything....the system just sits
v
btw many tools are using https://www.kapa.ai in their discord to add a "developper-support" ai agent fed on their docs. Any plans to add this feature @Shubham Bajaj ? would be great to ask questions like this
b
i did another pass at the docs, but cant find anything
btw do you have this same issue with tool call response?
v
Nope. I successfully implemented a tool call response that VAPI can interpret
b
But does it wait for you to say something post tool call to proceed?
s
@Virgile @bleeisblee
fyi
Use the firstMessage functionality with instructions to execute the tool: - Configure your assistant with a first message that instructs it to execute the tool - Set firstMessageMode to "assistant-speaks-first-with-model-generated-message" - Make sure your prompt/system message clearly instructs the assistant to execute the tool at the beginning of every call. cc: @Kings_big💫
v
@Shubham Bajaj @Kings_big💫 I feel like this functionality is only available through the API. I am a web developer but I'm mostly using the dashboard to setup Vapi. I don't generate agents on the fly. I generate one single agent through the dashboard. Is the firsMessageMode option usable through the dashboard?
b
Agree with @Virgile. Is it fair to assume that using the SDK to create a assistant does not create it in the dashboard?
if I can understand the best practice here, advanced assistant configs you can host on a server : https://docs.vapi.ai/server-url#retrieving-assistants
s
No it's available through dashboard only.
No its create the assistant for your account, so it will be visible in the dashboard as well.
b
Which doc should I follow to do this?
I’ll admit I’m a bit confused now!
2 Views