Assistant with memory
# support
u
Having trouble following this guide https://docs.vapi.ai/examples/inbound-support Tbh really confused about the steps. Who is handling the { call object }? Can someone who's implemented this walk me through from start to finish?
v
Hi @.hardboiledfish, I'm an AI assistant for Vapi. I'll analyze available sources and get back to you shortly.
----------------------------- **While I generate an answer, here are some sources that might be helpful**: * [Inbound Support Example]() * [Inbound Calling]() * [Outbound Sales Example]() * [Dashboard]() -----------------------------
### Answer I understand that following the steps in the guide can be confusing. Let's break down the process described in the Inbound Support Example guide, specifically focusing on who handles the
{call object}
and the overall flow. 1. Creating an Assistant: First, you create an assistant by defining its behavior and capabilities in a JSON configuration. This includes setting up the transcriber to recognize specific keywords, the model to handle the conversation, and other details like the forwarding phone number and initial messages [(1)]() . 2. Buy a Phone Number: You'll then purchase a phone number that will be used to receive inbound calls. This number is linked to your assistant, allowing it to handle calls made to this number. 3. Configure Your Server URL: Your server will handle dynamic responses based on the caller's history or needs. When a call is received, Vapi sends a request to your server with a
{call object}
, which contains details about the call. Your server's response can then customize the assistant's behavior for that specific call. 4. Save the Conversation: At the end of each call, your server can save the conversation summary and other relevant data using the
{call object}
. This allows your assistant to reference previous interactions the next time the same caller phones. 5. Handle Incoming Calls: Each time a call is made to your number, the server checks if there is a stored conversation for that caller. If there is, it returns an assistant configuration that picks up where the conversation left off. If not, it starts with the default assistant configuration. The
{call object}
is handled by your server. When Vapi sends this object to your server, it includes data about the ongoing call. Your server processes this information to determine how the assi
stant should interact with the caller. This can include pulling up past conversation histories or modifying the assistant’s responses based on the context of the call. If you have any more specific questions about any step, feel free to ask!
s

https://www.youtube.com/watch?v=CvhonBxoJ00

u
Thanks, but this is really hard to understand too... this time it's language barrier The guy also doesn't show every step
s
You can ping @Gurleen he made that video he can help you out with it.
a
from your experience, wouldn't it be better/more efficient/faster to store the previous conversations in a vector db ?
s
It depends on the need. For example, we can add a little bit of information about the user in the system prompt so that it remembers the last conversation and stores the way older information in pinecone.
u
Can we clarify this a bit more https://docs.vapi.ai/server-url/events What is the {call object} ? In my pipeline, I'm checking whether if the number exist in the database, if it doesn't exist then launch a general assistant. If the number exists, then launch an assistant with the first message containing the person's name. (i.e. hi sam). I also want to fit a summary of the previous conversation in the context
a
you're absolutely right, the docs are missing a dedicated page on the call object @Sahil . That's why I went ahead and noted this down for myself (not sure where I found it). Also, I found that it never gets updated by any 'status-update' POSTS, it stays the same from the initial one coming in on the 'assistant-request' POST which is kind of weird. https://cdn.discordapp.com/attachments/1242213359600930857/1244183455915315200/VAPI_call_object.txt?ex=66542fa3&is=6652de23&hm=e328168ab9331c33f7f99dcb69935ddc093b08c215bb843238b9e61c8c2f278a&
some of these attributes (e.g. transcript, summary, recordingUrl, messages) actually also exist one level higher (on the message obj) and there they are updated as expected. So it's a bit confusing imo.
the only two pieces of information that I pull from the call obj are ``message->call->customer->phoneNumberId and message->call->customer->number (phone number of the incoming caller)`` as they're not available anywhere else. Apart from that I totally disregard the call obj. Hope this helps a bit 🙂 @.hardboiledfish
s
@AiBizBox, can you please make a PR and provide me with proper details about the documentation requirements and the issue you encountered while building your product?
a
not sure what a 'PR' is but I went ahead and created a feature request: https://vapi.canny.io/feature-requests/p/dedicated-doc-page-on-call-object
s
Thank you!
6 Views