Ai Assistant Conversation Memory Setup
# support
s
What is the easiest way to create conversation memory for my assistant?
v
The easiest way to create conversation memory for your AI assistant is to save each user's conversation history in your own database after every interaction, then retrieve and inject this history into the assistant's prompt for future sessions. For example, you can include previous call logs in your API request like this:
Copy code
json
{
  "model": {
    "provider": "openai",
    "model": "gpt-4",
    "messages": [
      { "role": "system", "content": "You are a voice assistant managing a call with a customer. Utilize the following previous call history to deliver more personalized and contextual responses." },
      { "role": "system", "content": "Previous call history: [Include formatted call logs, outcomes, and significant details from past interactions with this customer]" }
    ]
  }
}
This approach is not built-in and must be implemented externally through your own programming and database management. Sources: - [Vapi Documentation Example: Inbound Support](https://docs.vapi.ai/examples/inbound-support) - [Discord Channel Discussion](https://discord.com/channels/1211482211119796234/1334393915071135825)
p
Conversation is "remembered" in
messages
or similar property, like AI example.
s
Hi Pigeon, thanks for the reply, but not sure what you mean. Could you explain?
p
Well, VAPI sends data to LLM and LLM sends data to vapi, so each AI and human message is stored in that data
Like this:
Copy code
const completion = await client.chat.completions.create({
    model: "gpt-4.1",
    messages: [
        {
            role: "developer",
            content: "Talk like a pirate."
        },
        {
            role: "user",
            content: "Are semicolons optional in JavaScript?",
        },
    ],
});
s
Ah okay got it! But is there a straightforward guidance on how to set up this memory for my assistant? I'm not a developer, but I've been using ChatGPT to help me set up some things with my assistant through make.com. What I would like to do is store a summary of the conversation so if the caller calls in again, it can pull the previous conversation summaries to personalize the experience. I ran into a few issues where the call gets cut off while the assistant is taking down information for a project and when the caller calls back a minute later, the assistant has no recollection of ever speaking to that caller. So trying to solve this problem.
v
Hey, Could you please schedule a brief call at your convenience so we can discuss this matter in detail? Kindly use the following link to book a suitable time: .
5 Views