<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/building-agents-with-langgraph-part-3-4-rag-and-long-term--qt1mvqing" -->

---
title: Building Agents With LangGraph Part 3/4: RAG and Long-Term…
description: Part 3 of a 4-part LangGraph series covering how to add Retrieval Augmented Generation (RAG) and long-term memory to a Python AI chatbot. RAG is implemented...
canonical: https://daily.dev/posts/building-agents-with-langgraph-part-3-4-rag-and-long-term--qt1mvqing
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: Building Agents With LangGraph Part 3/4: RAG and Long-Term… | daily.dev
og:description: Part 3 of a 4-part LangGraph series covering how to add Retrieval Augmented Generation (RAG) and long-term memory to a Python AI chatbot. RAG is implemented...
og:url: https://daily.dev/posts/building-agents-with-langgraph-part-3-4-rag-and-long-term--qt1mvqing
og:image: https://api.daily.dev/og/posts/qT1mVQINg.png
og:image:alt: Building Agents With LangGraph Part 3/4: RAG and Long-Term…
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Building Agents With LangGraph Part 3/4: RAG and Long-Term…

**[Software Mansion](https://daily.dev/sources/swmansion)** · 6 min read · 0 upvotes · 0 comments

## Summary

Part 3 of a 4-part LangGraph series covering how to add Retrieval Augmented Generation (RAG) and long-term memory to a Python AI chatbot. RAG is implemented using LangChain's WebBaseLoader, RecursiveCharacterTextSplitter, HuggingFace embeddings, and an InMemoryVectorStore. Long-term memory across conversation threads is achieved using LangGraph's InMemorySaver checkpointer and InMemoryStore, with thread_id-based session resumption. Code examples and GitHub links are provided throughout.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://swmansion.com/blog/building-agents-with-langgraph-part-3-4-rag-and-long-term-memory-ed34d4d96972>

## Similar posts on daily.dev

- [Building Agentic RAG with LangGraph and OpenSearch](https://daily.dev/posts/building-agentic-rag-with-langgraph-and-opensearch-9inxh7ahs) · BigData Boutique blog · 4 upvotes · 0 comments
- [Medium](https://daily.dev/posts/medium-ollye3mqw) · Medium · 1 upvotes · 0 comments
- [RAG Explained Simply with a Real Project](https://daily.dev/posts/rag-explained-simply-with-a-real-project-pgy15jzg7) · freeCodeCamp · 23 upvotes · 1 comments

---

Tags: [#python](https://daily.dev/tags/python), [#rag](https://daily.dev/tags/rag), [#langchain](https://daily.dev/tags/langchain), [#langgraph](https://daily.dev/tags/langgraph)

[View this post on daily.dev](https://daily.dev/posts/building-agents-with-langgraph-part-3-4-rag-and-long-term--qt1mvqing)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"TechArticle","headline":"Building Agents With LangGraph Part 3/4: RAG and Long-Term…","url":"https://daily.dev/posts/building-agents-with-langgraph-part-3-4-rag-and-long-term--qt1mvqing","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/building-agents-with-langgraph-part-3-4-rag-and-long-term--qt1mvqing"},"datePublished":"2026-08-02T07:15:36.785Z","dateModified":"2026-08-02T07:41:09.423Z","description":"Part 3 of a 4-part LangGraph series covering how to add Retrieval Augmented Generation (RAG) and long-term memory to a Python AI chatbot. RAG is implemented...","image":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/cd7b9f36efae72aac1d50f82283153f6?_a=AQAEuop","thumbnailUrl":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/cd7b9f36efae72aac1d50f82283153f6?_a=AQAEuop","isAccessibleForFree":true,"articleSection":"Software Mansion","inLanguage":"en","publisher":{"@type":"Organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180}},"author":{"@type":"Organization","name":"Software Mansion","logo":"https://media.daily.dev/image/upload/s--sOx0vaVZ--/f_auto,q_auto/v1785654908/logos/swmansion?_a=BAMAMicg0","url":"https://daily.dev/sources/swmansion"},"commentCount":0,"discussionUrl":"https://daily.dev/posts/building-agents-with-langgraph-part-3-4-rag-and-long-term--qt1mvqing","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":0},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":0}],"keywords":"python,rag,langchain,langgraph","timeRequired":"PT6M"}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"Software Mansion","item":"https://daily.dev/sources/swmansion"},{"@type":"ListItem","position":3,"name":"Building Agents With LangGraph Part 3/4: RAG and Long-Term…"}]}
```

