The key to building an agent with memory is to hav...
# general-english
j
The key to building an agent with memory is to have a well-structured database of call logs or summaries associated with client names and phone numbers. For both incoming and outgoing calls, the system can retrieve relevant information before the call starts and provide it upfront to a transient assistant. For incoming calls, when Vapi receives a call, it would immediately submit an assistant-request to your server. The server would then query the database using the incoming phone number, retrieve any previous call data, and use this information to build a transient assistant with the historical context preloaded. For outgoing calls, the process is similar. When initiating the call, your server would query the database using the number being dialled, retrieve the relevant call history, and build a transient assistant with this context before the call connects. This approach allows the assistant to be fully prepared with historical context before the conversation begins. The assistant can immediately leverage this information to provide a personalised interaction, ask relevant follow-up questions, or continue discussions from where they left off in previous calls. This method eliminates the need for the assistant to ask for identifying information in most cases, as it's preloaded with the relevant data. However, for situations where multiple individuals might use the same phone number, the assistant might still need to verify the caller's identity. If you've determined a verification step will be required prior to fetching call history, you could implement a tool to fetch it on demand while the assistant is on a call. This allows for a more dynamic approach, where the assistant can verify the caller's identity first and then retrieve relevant information as needed during the conversation.