https://retellai.com/?utm_source=discord&utm_medium=seo logo
I need to know how I can make the AI agent remembe...
# ❓・ai-evy-support
s
@AI Evy I need to know how I can make the AI agent remember the previous call conversations that it had with the same caller, or I mean the same phone number that called few minutes and hours before?
a
Thanks for tagging me @samsoley.. I'll look through relevant sources and get back to you shortly.
### Answer To make your AI agent remember previous conversations with the same caller, you need to implement conversation history in your backend system [(1) ]() . Here's the approach: 1. **Use call summaries and dynamic variables**: You can use the call summary that the
call_analyzed
webhook returns, store it somewhere associated with the phone number, and then use the inbound dynamic variables webhook to supply it as a variable into the agent . 2. **Retrieve call recordings**: The
call_ended
/
call_analyzed
hooks will deliver the same call info as the get call API call, and you can grab the recording URL from those . 3. **Pass conversation history through dynamic variables**: The recommended approach is to pass some summarized or key pointed version of the conversation history as part of the prompt by using dynamic variables [(2) ]() . The quality depends on how well you extract the important points in the summary and pass it to the LLM prompt . 4. **Storage solutions**: For storing past conversations, you can use tools like Getzep, which has user memory through knowledge graphs, or build your own solution with tools like Weaviate or Haystack . The key is that Retell AI doesn't automatically maintain conversation history across calls - you need to implement this functionality in your backend by capturing call data, storing it associated with phone numbers, and injecting relevant context back into new calls through dynamic variables [(1) ]() [(2) ]() .
​ To learn more, see the sources I considered: [[1] Discord message from @archdesignconcept_00787 on 2025-01-20](https://discord.com/channels/1186424376300679209/1294891368505937952/1330819130978340947) [[2] RAG from past conversations with same user?](https://discord.com/channels/1186424376300679209/1292040673226391592) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.