How farzad-r/agentic-longterm-memory works
Project type and purpose
• This is a Python-based AI agent project demonstrating multiple approaches to long-term memory for chatbots. It provides:
• A terminal chatbot (src/chat_in_terminal.py)
• A Gradio UI chatbot (src/chat_in_ui.py)
• Memory back-ends using SQLite and a Vector DB (Chroma)
• Integration with external LLMs (OpenAI via LangChain)
• Tutorials and course code (langgraph/)
• A research prototype (letta/)
File structure
• Top-level directories:
• config/ – YAML configuration
• src/ – main application entry points, DB setup, utilities
• langgraph/ – course and website tutorials around LangGraph memory systems
• letta/ – alternative memory model implementation
• src/ breakdown:
• chat_in_terminal.py & chat_in_ui.py – user-facing frontends
• prepare_*.py & check_*.py – DB provisioning and inspection scripts
• utils/ – core logic: memory managers, system prompt builder, search manager, SQL & vector DB managers, user & chat history managers
• Key config files: requirements.txt, config/config.yml
README insights
• Purpose: explore agentic long-term memory (semantic, episodic, procedural)
• Tech stack: Python, OpenAI, LangChain, LangGraph, SQLite, Chroma, Gradio
• Visual assets: eight schema PNGs in images/ showing default LLM behavior, memory concept, 3 chatbot architectures, and LangGraph pipelines
Essential details to capture
• The pipeline from user input → system prompt assembly → memory retrieval/insertion → LLM call → response post-processing
• Each memory subtype and how it reads/writes to its backing store
• Config management and how scripts initialize databases before runtime
• Extension points: course examples and LettA implementation