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

Neural Breakdown with AVB · Beginner ·🔍 RAG & Vector Search ·6mo ago
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
Watch on YouTube ↗ (saves to browser)
Sign in to unlock AI tutor explanation · ⚡30

Related AI Lessons

The Future of RAG: Dead, Evolving… or Becoming the Brain of AI?
Learn about the future of RAG, from its current state to emerging trends like Agentic RAG and multimodal AI
Medium · Machine Learning
Smart Routing, Transfer Family Ingestion, and Voice Chat — Permission-Aware RAG v4.2
Learn about the latest features in Permission-Aware RAG v4.2, including Smart Routing, Transfer Family Ingestion, and Voice Chat, and how to apply them in your projects
Dev.to · Yoshiki Fujiwara(藤原 善基)@AWS Community Builder
Most Companies Doing GenAI Are Really Just Doing RAG: RAGOps Explained for analysts
Learn why RAGOps is becoming the preferred approach for GenAI projects and how it differs from agent-based approaches
Medium · RAG
RAG - Sliding Window, Token Based Chunking and PDF Chunking Packages
Learn about RAG chunking mechanisms, including Sliding Window, Token Based, and PDF Chunking, to improve your AI model's text processing capabilities
Dev.to AI

Chapters (10)

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
Up next
Watch this before applying for jobs as a developer.
Tech With Tim
Watch →