{
 "schema_version": 1,
 "generated": "2026-10-31",
 "id": "langchain-ai-langgraph--give-an-agent-memory-across-sessions",
 "repo": "langchain-ai/langgraph",
 "repo_url": "https://github.com/langchain-ai/langgraph",
 "repo_slug": "langchain-ai-langgraph",
 "title": "Give an agent memory that lasts across sessions",
 "page_title": "How to give an agent memory that lasts across sessions with Langgraph",
 "summary": "Combine short-term working memory and long-term memory so an assistant remembers users between conversations.",
 "who": "A builder of a support or tutoring assistant that forgets every user the moment a session ends.",
 "problem": "Stateless agents make users repeat themselves and cannot build on past conversations.",
 "outcome": "An agent with working memory for the current task and persistent memory it reads back in later sessions.",
 "steps": [
  "Install with `pip install -U langgraph`",
  "Read the Comprehensive memory guide for short-term and long-term memory",
  "Keep in-progress reasoning in short-term memory and save durable facts to long-term memory",
  "Start a new session for the same user and confirm the agent recalls what it stored",
  "Trace a few runs in LangSmith to check what is written to and read from memory"
 ],
 "agent_prompt": "Using langchain-ai/langgraph, give my <assistant> short-term memory for the current conversation and long-term memory keyed by user, following the Comprehensive memory docs. Demonstrate it remembering a fact from a previous session.",
 "agents": [
  "claude-code",
  "codex",
  "cursor"
 ],
 "difficulty": "Intermediate",
 "time": "1 hour",
 "basis": "readme",
 "caveat": "LangSmith is a separate LangChain product; the README does not state its pricing, so check before relying on it in production.",
 "category": "Software and DevOps",
 "tags": [
  "Software and DevOps"
 ],
 "lang": "python",
 "requirements": [
  "Python and pip",
  "An LLM provider for your agent's model calls",
  "Optional: a LangSmith account for tracing and the LangSmith Deployment platform",
  "For JavaScript or TypeScript, the separate LangGraph.js library"
 ],
 "risk": "none",
 "seen_in_the_wild": false,
 "mentioned_publicly": false,
 "risks": [],
 "best": false,
 "score": 0.8,
 "evidence": [],
 "url": "https://dedupedai.com/use-cases/langchain-ai-langgraph/give-an-agent-memory-across-sessions/",
 "md": "https://dedupedai.com/use-cases/langchain-ai-langgraph/give-an-agent-memory-across-sessions/index.md",
 "disclaimer": "Deduped lists open-source repositories that belong to other people. We do not own, maintain, audit, or vouch for any of them, and a repo appearing here is not an endorsement or a safety check. The use cases, steps, and prompts are written by AI and may be incomplete, outdated, or just wrong. Where a use case is marked \"Seen in the wild\", we link to public posts where someone described something similar, but we have not verified those posts and the use case itself is still our AI's own write-up. Use all of this at your own risk. Only run code, commands, or agents on systems and accounts you are authorized to use, and read the code and every command before you run it, especially anything that touches credentials, files, or the network. Nothing here is professional, security, legal, or financial advice. All trademarks and project names belong to their respective owners, and their use here does not imply affiliation. Content is provided as is, without warranties of any kind. Found a mistake, a safety problem, or something you want removed? Email hello@dedupedai.com and we will look at it promptly.",
 "api": "https://dedupedai.com/api/v1/usecases/langchain-ai-langgraph--give-an-agent-memory-across-sessions.json",
 "api_version": "v1"
}
