How to build your own long-term Agentic Memory System for LLMs | Mem0 from scratch in DSPy

Neural Breakdown with AVB
18,672 views •

In this video we are using DSPy and QDrant Vector Database to create our own memory system from scratch! We are building the core components of Mem0 from the ground up, one step at a time. You'll learn about the Mem0 API, the basics of DSPy signatures and modules, generating embeddings, inserting and searching with vector databases (QDrant), and tool calling with dspy.React. Follow me on Twitter: https://x.com/neural_avb To join our Patreon, visit: https://www.patreon.com/NeuralBreakdownwithAVB Members get access to everything behind-the-scenes that goes into producing my videos - including code, slides, etc. Plus, it supports the channel in a big way and helps to pay my bills. I thank you for considering to support my journey making educational content! Check the publicly accessible repo here: https://github.com/avbiswas/mem0-dspy Patreon members get access to additional code materials. Videos to learn about DSPy: Learn about RAG Systems: https://youtu.be/OHh_SByRYmQ Learn about DSPy: https://youtu.be/_ROckQHGHsU Learn more Context Engineering: https://youtu.be/5Bym0ffALaU Check out Mem0 here: t.co/h3U8W1Lr5u Get Mem0 API Key - t.co/lmFqnI5CkV Mem0 Github - https://mem0.dev/github/avb Mem0 Paper: https://arxiv.org/abs/2504.19413 QDrant: https://qdrant.tech/ Self hosting Qdrant: https://qdrant.tech/documentation/quickstart/ DSPy: https://dspy.ai/ Timestamps: 0:00 - Intro 2:56 - The Basic Chatbot 6:16 - What the original Mem0 API looks like 10:04 - The Roadmap 12:11 - Extracting Memories from Conversations 21:17 - Embeddings & Vector DBs 27:03 - Evaluation Dataset 34:39 - Tool Calling 39:13 - Memory Upkeep CRUD Agent 45:46 - Testing

Keyboard shortcuts

On. Switch them off if they collide with your assistive tools; ? still opens this sheet.

Go to

Press g then the letter.

  • gh Latest
  • gs Sources
  • gm Media
  • gv Videos
  • gp Podcasts
  • gc Calendar
  • gd Decoder
  • gz Dataviz
  • ga Datasets
  • gb Blog
  • gk Markets
  • gj Careers
  • gn Prompt Notebook

On this page

  • / Focus search, where there is one
  • t Back to top
  • ? This list
  • Esc Close