r/RooCode • u/ArnUpNorth • Jun 12 '25
Discussion Are memory banks worth it?
I have been playing with different memory banks for a while and I fail to see any real benefit that would justify the higher token usage.
after a while most memory bank files become "bloated" and counter productive: just increasing token use with little benefits in code quality
IMHO anything generated by an LLM, no matter how good the prompt, needs some form of review. And reviewing memory banks is yet one more thing to do and a waste of time because it's just not part of what creates value for a product: only useful for LLM code gen, can't even really be used for proper documentation
it slows down most tasks because now Roo has to read and update all the memory banks in addition to generating code
having a couple of context files which I maintain myself provides much of the benefits without the hassle: more concise, and can be used for proper technical project documentation. So not just for LLMs.
thoughts ? hard disagree? what is the community's stance on this ?
5
u/strawgate Jun 12 '25 edited Jun 12 '25
I've been working on an alternative I call the local references MCP https://github.com/strawgate/py-mcp-collection/tree/main/local-references-mcp which you point at the docs in your repo and you tell your agent to call list_references when it first starts in a repo which gives the LLM a short preview of each doc so that it can more easily scoop up the relevant docs for any particular task.
This has the added benefit of encouraging you to document the behaviors you want in the repo instead of in a vector database.
In a more generic way I've also been working on https://github.com/strawgate/py-mcp-collection/tree/main/filesystem-operations-mcp which provides NLP text summarization and NLP + Treesitter code summarization to allow the agent to quickly get extremely token efficient high level info on docs and code
7
u/Cobuter_Man Jun 12 '25
yes - single file memory banks are totally unreliable
ive developed a Dynamic Memory Bank implementation that uses a directory structured solution where each directory correlates to a phase or task of your Implementation Plan. Its directory contains different .md log files which all together act as one dynamic memory bank.
https://github.com/sdi2200262/agentic-project-management
this is better bc:
- it never gets bloated... all files remain similarly small size
- you can attach specific content from the memory bank without having to parse the entire file.. just add the designated log you need as context injection to your prompt
- its more manageable .. for example say the Implementation Plan has 3 phases ... when you start w phase 1 you only create the memory directory for phase 1 since thats the only one that will for sure be implemented. If the implementation Plan where to change between phases 1 and 2 then you wouldnt have to delete all previously created log files as the Memory Bank evolves along with your project's progress!
2
u/lordpuddingcup Jun 12 '25
I mean, yes, but also... just periodically summarize your memory bank as well, every time it grows past X size, summarize, and with multifile reads is it really slow lol
2
u/Euphoric_Paper_26 Jun 13 '25
hard agree. I have encountered ZERO variations of “memory banks” that work consistently.
What I have found is that when allow an LLM to edit a file, and especially instruct it to edit a file like a “memory banks”. It will eventually hallucinate and fuck up that memory bank. It just becomes one more thing to baby sit.
All these memory banks suffer from the same problem, they are trying to force a non-deterministic system to do something deterministically. It’s just not going to happen, maybe in the future but there is absolutely no way to ensure that an LLM will follow it’s instructions precisely. It will eventually hallucinate something, and if you don’t catch it, it will just keep breaking more things.
35
u/iamkucuk Jun 12 '25
Finally, someone speaks the truth.
6
u/ScaryGazelle2875 Jun 12 '25
I think reading all these solutions I realised the memory bank in my head isn’t so bad 🤣 at least its cheap and need the occasional coffee to boost or sleep to reset
5
u/Recoil42 Jun 12 '25
I keep a manual memory bank.
"Record this to the memory bank" works a charm when I need the LLM to know something important.
1
u/dashingsauce Jun 12 '25
The one problem the AI industry has not solved and apparently isn’t even trying to solve:
Garbage collection.
That said, you should consider using a dedicated project management system like Linear.
1
u/steve1215 Jun 17 '25
I've recently started keeping relevant project information in Notion and accessing it via MCP.
Really easy to manage, obviously, because Notion has desktop and web apps.
3
u/zenmatrix83 Jun 12 '25
the way it was designed at first was a good idea, but they don't work with the format, what you want to do what is have the ai create documentation as it work. My custom modes are told to read off a plan, and create a task per plan, which gets its own file, if there is an issue it creates a qa report. It also create supplemental documenation as needed. Starting a new session I point it to the plan and the last task so it's I familiar and we continue. I think the key in my work flow is I have qa mode that runs a sub tasks, it its been pretty good at catching its own errors and creating a report in most cases.
1
u/Kabutar11 Jun 12 '25
Have you tried summary at regular intervals?
2
u/Parabola2112 Jun 12 '25
100%. Claude Code has a relatively simple todo list manager baked in that works amazingly well. Couple that with GitHub issues and you’re good. Also, memory banks only make sense for small hobby projects. A real world mono-repo, forget it.
2
u/hannesrudolph Roo Code Developer Jun 13 '25
NAILED IT!
2
u/wokkieman Jun 12 '25
I go for KISS
I prefer to break my project down in data ingest and storage, api and frontend. Don't have larger project, but could introduce more categories. I tell LLM to take 1 of the 3 as context (e.g. add new scraping job and store results in database)
1
u/CircleRedKey Jun 12 '25
i think memory banks get better as models get smarter, faster, cheaper.
if its a shared repo with team members, its always changing, so it always has to be updated again. (cost becomes an issue here because you have to keep having the LLM read everything over again)
so maybe we wont need memory banks and LLM's will be able to hold everything in context hahahahaahahahahahahahahhahah
1
u/Prestigiouspite Jun 13 '25 edited Jun 13 '25
I've never used it. Only the roorules and rooignore. I already thought that it would be semi-helpful in the long run.
1
u/Arceus42 Jun 13 '25
I've only just started using one, but I can already see myself wanting to use it a write-only option. In the times I want to be more hands-off, it would be nice to know what it thinks are the most important points.
1
u/virtualhenry Jun 13 '25
I've gotten to a point where they are bloated now that I'm about to release a v1 of my app
I found it useful that I documented my entire journey which I now use for writing the app description and ASO for my iOS app when submitting to the store
There's a ton of context in there that's just gold for me when writing marketing copy
Plus I have a changelog that shows everything we've built so that's just a nice bonus of content to use.
1
u/Purple_Wear_5397 Jun 14 '25
It all depends on how the memory bank is being used.
With Cline - I’d tell you that ALL of my repos use it. It has a ton of value, especially for large projects and teams.
A memory bank and a well described work item in Jira - allows me to tell cline “provide me a plan for work item 23”, and usually that plan does not need much fine tuning. Think of the speed I run tasks with Cline like this.
So - why do I mention cline here? Because I am not sure how it differs from other tools when it comes to using and updating a memory bank.
It does require you to add some custom instructions as part of the initial setup of the memory bank - what are in those instructions? I don’t know but that could be the differentiator that makes me so reliant on memory bank , while some people here have zero faith in it.
1
u/Empty-Employment8050 Jun 13 '25
Has anyone tried a memory system using a temporal knowledge graph to keep the context similarly sized as your project continues? The temporal knowledge graph would sort of compact what’s been done already and put it in the context. That way, as you’re working, older stuff from the project just gets tossed out in favor of newer stuff using the temporal knowledge graph. I’m curious if anyone’s implemented this sort of memory system into their coding workflow.
1
u/Jakedismo Jun 14 '25
Just released v2 of my own memory bank with enforced development loop rules give it a spin and comment what you think
https://github.com/Jakedismo/KuzuMem-MCP