AI Agents Forget Everything Between Sessions
Developers building AI agents are consistently frustrated by the lack of persistent memory. Agents frequently 'forget' information between sessions, requiring repeated explanations and hindering complex tasks. Current approaches relying on vector search and context windows prove inadequate for maintaining holistic context and temporal relationships.
SOURCES (60)
“Yeah the memory problem is a real one. It literally goes crazy at some point. I think the best solution is continuing with a new chat right now. But we will see what is going to happen in the LLM world soon.”
is there an agent memory, else than the memory of the same conversation? I found in a post linkedin that the agent has a memory of context, but the agent read the…
“Yeah, I understand the back-end. The front-end visualizations do not look like Obsidian.”
“Really good question, and honestly the hardest part, so I won't pretend it's fully solved. Two things help right now: you're in the loop (it shows you what it read before the Brain acts, so a bad read gets caught instead of silently acted on), and there's a live health indicator, kind of a thermometer, that flags when the model is truncating context or straining, so you can see when its input got cut instead of blindly trusting the output. "Confident but wrong" is the f”
“hi HN,While building Wolbarg (an open-source shared memory SDK for AI agents), I assumed PostgreSQL would be the obvious choice for memory storage.After benchmarking SQLite under realistic agent workloads, I was surprised by the results. For local-first and single-node deployments, SQLite handled far more than I expected while keeping the architecture much simpler.I wrote up the benchmarks, methodology, trade-offs, and where I still think PostgreSQL is the better choice.”
“I run several AI coding agents (Claude Code, Codex, OpenCode) across a few solo products. My problem: every session either lacked context or I pasted a giant knowledge file and wasted most of it. What worked was splitting knowledge by lifetime: - Current truth stays in each project repo and a small per-project brain folder. Agents read this first. Never the vault. - Durable knowledge (decisions, lessons, history, cross-project patterns) lives in a private Obsidian vault. Local-only git, no sync,”
“While writing an essay about AI memory and persistent context, I started wondering whether current AI memory systems are optimized for the right thing. Current AI systems already maintain forms of persistent context through saved memories, conversation summaries, user preferences, project notes, and similar mechanisms. These memories are primarily descriptive. They help the system remember facts about the user and previous interactions. But suppose future systems evolved in a different direction”
“Cortex is an institutional memory layer for teams and communities, allowing them to curate data which gets automatically organized so that agents can query it very efficiently using LLMs that can be hosted on consumer-grade hardware. Goal is to democratize the memory layer in community driven fashion. Cortex is open-sourced under Apache 2.0 and you are invited to use it. Checkout the Repository: https://github.com/mocaOS/cortex-app What are the Model Requirements? I want to state these things up”
“hey thanks, appreciate the kind words! We are quickly adding new integrations to support second brain/life context system. The idea is that all your info is available locally for your agents to search and take action with. For yourself, what sources/integrations would you need for yourself? It handles databases and relations. Lmk if you run into any issues.”
“This is a genuinely useful writeup, the four-bets framing (trust-the-LLM vs explicit-structure vs infra-first vs connectivity-first) is a clean way to cut through the marketing noise in this space. Your point that everyone converges on extract-store-retrieve despite wildly different vocab for it rings true: I've read through a bunch of these codebases and the actual diffs are mostly in where they put the intelligence, not whether the pipeline shape differs. One more data point if you ever ex”
“The 'facts worth remembering, not raw conversation history' framing in your post is the right instinct, and exposing it through MCP so the agent has agency over read/write is a good call too. The failure mode to watch once you scale this past a toy project is context bloat, if the agent pulls back 5-10 memories every turn you're paying a token tax for marginal recall, so you want some tiering (recent session stuff always included, everything else retrieved on-demand by relevance). On”
“Hey, thanks for the tips! I actually do use AI quite a bit, mostly for coding and at work. I already tried getting Claude to help me with the Obsidian setup, but it mostly gives me generic advice, and unfortunately it can’t access Reddit. What I’m really looking for is more like someone sharing or linking a post here about an efficient workflow, how to use it day to day, etc. As for YouTube, unfortunately my English isn’t great, that’s a big limitation for me.. so I end up with access to a lot l”
“each teammate's agent has its own context, so decisions made in one session never reach the others. one agent decides the api returns snake_case, another one confidently builds camelCase an hour later. multiply by machines and it gets worse, because nothing warns anyone about uncommitted work. what we tried: a shared rules file all agents read on start (good for conventions, useless for live decisions) and announcing changes in team chat (works until someone forgets, someone always forgets).”
“I'm exploring a conversational architecture called ANDE designed to solve a specific problem: alignment fatigue and identity drift in extended context windows. Standard LLM interactions inevitably degrade into repetitive validation, unprompted advice-giving, or hollow empathy loops. ANDE bypasses this by enforcing an explicit behavioral basin defined by structural constraints rather than conversational roleplay. The Mechanics Instead of steering responses via surface prompts, the system eval”
“For the code and ongoing-projects part, I’m building MemoRepo , a local-first dashboard for isolated repository spaces, codebase-memory-mcp indexing, immutable snapshots, and a read-only MCP gateway for coding agents. It’s not a general personal knowledge system, but it’s the kind of architecture I’d use for the code/project slice while keeping sensitive documents in a separate local store.”
“Probably something like knowledge graphs. But you may need a stronger system for inference, I am guessing you need LLMs. Consider investing in something like a dgx spark, or mac studio with at least 96gb ram”
“The lexical memory approach is interesting - most frameworks I've seen go straight for vector embeddings and call it done. Curious how you handle memory relevance over time, like does older context just fade out or do you have explicit expiry/pruning logic? Also the swarm-style sub-agent part: how do you coordinate writes back to the parent context when multiple sub-agents are running concurrently? That shared state problem is where most of these things get tricky in practice.”
“One architecture decision I keep seeing in business AI agents use a vector database as the agent's long-term memory. This usually starts with a good idea. Everything the agent learns gets embedded and stored, so over time it builds up a kind of "memory". it feels elegant because there's only place to look for information. The problem does not show up until the data starts changing. Someone asks. What is the current status of this order? Has this invoice been paid? Who approved”
“Yeah definitely a problem. This is something deterministic code must solve. Auto inject memory or force the tool call through some trigger that literally prompts it or injects it.”
“There's no settled winner, so the useful move is to define what "working" means for your setup before picking a system: write down 15 or 20 things you expect the model to remember and later recall, then check which approach actually surfaces them at the right moment. We build eval tooling so we think this way, but even a manual pass tells you more than the framework's marketing, because most memory systems store fine and fail on retrieval and contradiction handling. For a local”
“I’m struggling with a use case that I’m wondering if others have also encountered. Ideally, I’d like to be able to ask an AI model a question when I’m on the go, and for the model to answer by drawing on my vault. For all its faults, Notion AI is really effective for this. Does Obsidian have anything similar that feels even somewhat native? I tried setting up a MCP bridge with Cloudflare and an always-on computer, but Claude.ai (not Claude Code) seems to have trouble recognizing non-OAuth MCPs.”
“Memory as text for LLMs works well enough when the truth can be plainly stated and doesn't change, but I kept running into the same problem with LLM wikis, markdown, vector stores - I just didn't trust them, and I didn't trust my agent to properly state its evidence for a claim, its reason for changing something, or rebuild its semantic connections the same way between sessions from a text corpus. I found myself constantly asking my agents to re-verify what was already in my wikis”
“I went a different direction, I've tried to build a context management engine as a harness. The idea behind it was to support long running sessions, so I force feed based on the tool calls and repack the context based on it's associations and the agents actions. So if it greps or reads a file the harness will use that to predict the likely pieces of other context it needs and then push that through with the tool if it meets the threshold. Once enough chunks are in context and the window”
“And despite all of our desire for strong magic, memory is still a one way ticket. A model may commit something without being prompted but autonomous recall within context is still vaporous.”
“I'm building a platform where an LLM has to reference a large number of existing nodes. For example, when generating a DAG, it needs to know about many previously defined nodes and correctly reference them while constructing the graph. I'm trying to figure out the best way to provide this large amount of context while optimizing for latency, cost, and reasoning quality. Is context caching a good solution when most of the context remains the same across requests? Alternatively, would a Re”
“It seems that not only it is totally possible without incurring in unfeasible excessively narrow train data transfer bottlenecks but that several models have already been trained using this method. It mostly depends on how many GPUs join such kind of network. See here: https://psyche.network/runs submitted by /u/DevelopmentBorn3978 [link] [comments]”
“We moved our agent fleet's working memory off Markdown and onto TOON (Token-Oriented Object Notation) in December 2025 and just wrote up what 14 harnesses taught us. The honest numbers (tiktoken o200k, 100 uniform CRM records): - TOON 2,068 tokens vs row-object JSON 3,074 (**-33%**) vs pretty-printed 4,973 (**-58%**) - A tight Markdown *table* is nearly equal to TOON (-4%) — the win is vs JSON, not vs a hand-optimized table - **Columnar JSON beats TOON by ~4%** — we publish that too. TOON”
“Greplica is a context layer for your coding agents. It stores info about your current architecture, decisions, nuances etc from your code and sessions, and gives it to your agent before it starts exploring. This information is something that you would explain to a dev on how a particular thing works. Idea is if we are able to maintain this information, the agent will not need to grep through a 100 files to discover the same thing, and save tokens/time, and using prior decision history improve on”
“I’m building Greplica, an open-source memory layer for coding agents. The problem: every new coding-agent session starts almost from zero. Before doing useful work, the agent spends time grepping around, reading adjacent files, rediscovering architecture, inferring subsystem boundaries, and re-learning decisions that previous sessions already found. Greplica gives the agent a persistent engineering memory for the repo. It explores repo structure, code, and past coding-agent session transcripts l”
“I've been trying to come up with a solution for keeping extremely long ai sessions coherent. Sometimes there is too much substance to risk compaction. With so much buzz around diffusion going on it got me thinking, what if we treat the context like a progressive render, blurry>sharp. The practical way to make text "blurry" is compression. This is a "diffusion inspired" system which borrows the coarse-to-fine process, not the formal math. It uses semantic compression so”
“Project Release / Research Draft] Hierarchos at 232M Parameters: Preliminary Findings From a Recurrent Memory-Augmented Assistant Model Technical Report: July 2nd, 2026 Project: Hierarchos / KortexHOS Authors: Makhi Burroughs / netcat420, Lost Time, and the Hierarchos project team TL;DR: We built and trained Hierarchos , an experimental 232M-parameter recurrent, memory-augmented language model from scratch. It is not a GPT-3/3.5-class model, but it successfully proves that a hybrid non-Transform”
“Project Release / Research Draft] Hierarchos at 232M Parameters: Preliminary Findings From a Recurrent Memory-Augmented Assistant Model Technical Report: July 2nd, 2026 Project: Hierarchos / KortexHOS Authors: Makhi Burroughs / netcat420, Lost Time, and the Hierarchos project team TL;DR: We built and trained Hierarchos , an experimental 232M-parameter recurrent, memory-augmented language model from scratch. It is not a GPT-3/3.5-class model, but it successfully proves that a hybrid non-Transform”
“Built Makko after hitting the same wall repeatedly on our own 2D game project: AI art tools have no memory between sessions, so a "hero character" generated Tuesday and an "enemy" generated Friday never look like they belong in the same game. Small inconsistencies compound fast, by week three you're looking at a game that seems built by three different artists who never talked to each other. Built a way to hold reference images and style notes at the project level so ever”
“You can also @ specific databases or pages you want it to reference or pull data from.”
“For the past few months I've been using Obsidian not just as a notes app but as the actual long-term memory for Claude Code. Every session, the agent reads an index file, finds the right MOC (Map of Content), and only opens the 2-3 notes it actually needs — instead of me copy-pasting context every time or the agent guessing. The annoying part was everything I had to build around the notes to make that work reliably: - A navigation pattern so the agent doesn't try to load the whole vault”
“memo is a local-first memory for AI coding agents (via MCP), and it can store its memories inside your Obsidian vault — each memory is a plain Markdown file with frontmatter. The sqlite index is derived; if you hand-edit a note in Obsidian, your edit wins on the next reindex. Nothing leaves your machine (no cloud, no keys). So your agent's long-term memory becomes just… notes in your vault, that you can read, edit, link and graph like anything else. Search is hybrid semantic + keyword. Repo:”
“I have been working on Hister, a self hosted search engine that automatically indexes pages you visit, local files, and documentation, then keeps them searchable with stored offline previews. It also exposes an MCP endpoint, so local AI assistants can search your own indexed material instead of relying only on model memory, live web fetches, or separate integrations for every site. The goal is to make it useful as a private knowledge base for local LLM workflows. I am especially interested in fe”
“Curious what everyone is using today. Are you rolling your own with Pinecone/Postgres/pgvector? Using Mem0? Or just passing conversation history? I'm building a managed memory API because I kept solving the same problem repeatedly, but I want to know if I'm solving a real pain. Would love to hear your approach. submitted by /u/Realistic-Refuse9855 [link] [comments]”
“Fresh session. First message: "Goat" — one word, essentially no semantic retrieval signal. Second message: "Ce ai notat mă?" — ambiguous, no topic, no keywords. The prefetch daemon runs as the first step on every turn, before the LLM call, retrieving from episodic memory concurrently with context assembly — independent of what the user said. Result: source_tier: episodic results_found: 15 results_used: 10 tokens_l3: 1533 latency_search: 0.234s Retrieval was not driven by the”
“I'm trying to build a privacy-focused, local-first alternative to Recall.it inside Obsidian. My priorities are: Local AI (preferably Ollama) Open-source/free tools Semantic search AI chat with my notes Automatic summaries, tags, metadata, and backlinks PDF, YouTube, and website summarization Flashcards and study guides Works well with a very large vault I already use Obsidian with Dataview, Templater, YAML, and backlinks on Windows. What do you guys recommend. submitted by /u/Gad”
“I have been working on Greplica, a local memory layer for coding agents, and wanted to share the benchmark setup because the interesting part is not only token reduction. It is variance. The basic problem: every new coding-agent session starts cold. Before it can plan a change, it often has to rebuild a mental model of the repo: which files matter, which subsystem owns the behavior, what previous decisions constrain the implementation, and which paths are dead ends. That orientation step costs t”
“Been diving deep into agent memory architecture lately and stumbled on OKF - Open Knowledge Format - published by Google Cloud on June 12th. It's gotten way less attention than it deserves. The core idea is simple: instead of explaining your codebase/systems to an AI agent every single session, you build a .okf/ directory of markdown files with YAML frontmatter that any agent can read. One required field ( type ). No SDK, no schema registry, no vendor lock-in. Just files. What makes it inter”
“Hi folks, Bruno here, one of the two people building this. For years we got away with poor context because people fill gaps. If you didn't know what a column meant or where a database lived, you asked someone. You knew who to go to. That informal layer, who to ask and what things mean, carried us for years. Agents can't do that. An agent only knows what you hand it. It doesn't ask, it guesses. So what people carried in their heads now has to live somewhere a machine can reach: what y”
“There's been a lot of discussion here about giving LLMs persistent context across sessions. Most solutions I see are over-engineered: vector databases, embeddings, memory plugins. Here's what actually works for me as a solo developer. Two files: CHANGELOG.md An append-only architectural decision ledger. Single-line entries, newest at top. When you load this at session start, the model immediately knows your project's history, every decision, and why things are the way they are, witho”
“Hi all, I’m working on a research project exploring how stateless LLM-based chatbots handle long conversations and whether important earlier information is still reliably retained over time. My idea is to: Run a chatbot using an LLM API without any external memory system Introduce key facts early in a long conversation Continue with many unrelated messages (hundreds of turns) Later test whether the model can still correctly recall those facts at different intervals I’m planning to measure recall”
“The coding agent bottleneck: Long development sessions with AI coding agents inevitably lead to context degradation, which we call context rot. The model starts forgetting variables, misinterpreting file structures, and introducing silent bugs. The mechanics of context rot: As conversation history grows, LLMs struggle to pay attention to critical instructions due to the needle in a haystack problem. Attentional dilution causes the model to anchor on recent messages while ignoring global”
“One thing i am exploring is #Neo4j Graph Data Science. Imagine an AI coding agent that can detect bridge nodes, natural module boundaries, blast radius, stale documentation, and test protection before it edits code. submitted by /u/gXzaR [link] [comments]”
“For the past several months I have been building a personal assistant (codename Jarvis, yes, that Jarvis) as a side project. The part I am actually proud of is not the chat interface, it is the memory layer underneath it, so I wanted to write up the architecture and what building it taught me. The problem I kept running into Most LLM memory I tried, including my own first attempt, is fundamentally probabilistic: shove relevant chunks into context via vector similarity search and hope the model f”
“Most agent tools are terrible for prompt caching. Repeatedly reading files or dumping raw search outputs instantly invalidates your cache and burns tokens. I designed a specification for cache-compatible memory and context management tools to keep agent context lean and highly cached: - Shadow VFS (read_file, materialise_file): Tools return lightweight file pointers/previews. The AI only pulls full content into context when strictly needed. - Context Nodes (keep_alive): Promotes critical data to”
“I'm interested in how well the new dynamic memory system summarizes your history. Paste your summary in the replies and tell me if you think it's accurate. submitted by /u/TorchAndFlamePress [link] [comments]”
“Hey everyone - I’m building an open-source project called MemoryOps AI and would appreciate technical feedback from people working on LLM systems, agents, MLOps, or production AI infrastructure. The project is not a chatbot. It is a memory governance layer for AI assistants. The core idea is that AI memory should not just be: save user message → vector DB → retrieve later In production, memory needs stronger guarantees: Capture → Evaluate → Store → Retrieve → Rank → Compose → Update → Forget → A”
“I was building a voice-powered conference agent and ended up trying a different memory provider. The goal was simple: attendees could talk to an AI assistant throughout the event, while booth owners could later search past conversations to understand what people were asking about. There are already plenty of memory backends available, so the interesting part wasn't choosing one. It was integrating it without changing the agent itself. Hermes exposes memory through a provider interface, so in”
“Most managed memory/recall services for AI agents hide the ranking logic behind their API — you send queries, get results back, no visibility into how semantic and temporal relevance get weighted against each other. Fine until you need to debug why an agent retrieved the wrong context. Built this self-managed instead: two pgvector instances under your own control, one for semantic similarity, one structured around SVO-extracted tuples with timestamp and source ID as first-class fields. Both stor”
“I tried giving my agent long-term memory by just dumping conversation history back into the system prompt. Thought it was smart. Apparently not. It worked... until it didn't. When I was testing simple scripts in VS Code, passing the last 5-10 messages back into the model felt completely fine. The agent remembered what you said a few minutes ago, everything seemed stable. But once you move beyond basic demos and let an agent run autonomous loops over messy data for an hour, the context window”
“Last year I was building an AI assistant for a friend’s business. The agent was smart. It answered questions well. But every single new conversation, it started from zero. It didn’t know that this customer had complained twice about the same issue. It didn’t know that another user always wanted short answers. It didn’t know anything about anyone. I tried everything. Pinecone. Chroma. Weaviate. Rolling summaries. Injecting the full history into the prompt until the context window exploded. Nothin”
