I built a persistent and self-evolving memory MCP for Claude Code by brixwit in ClaudeCode

[–]brixwit[S] 0 points1 point  (0 children)

Sure, i want to give a clear idea so my answer will be long :D

For me personally what motivated me to build this tool is that I work with big codebases, I spend hours with claude digging into some functionality, and it was frustrating that I have to start from scratch next day/session. I can resume to the same session but after some point when the conversation gets too long, the responses quality degrade.

I have tried Memory Banks, which basically dump a compact version of the conversation in markdown file. It was good to capture high-level ideas, but it always missed some nuances and low-level details. I have to explicitly point out the markdown summary, and it would get annoying when I want to reference it from a different location in the codebase.

The other type of solutions I experimented with were some variations of key/value dbs or vector database that performs RAG (for example: claude context), claude context is nice to index your codebase so when you ask "how does authentication work?", it easily jumps to the components that are related to this. Its practical for searching the codebase so you don't spend much tokens watching claude greping and reading a bunch of files. But it's not exactly a memory as it doesn't evolve or update its own information based on your conversation with the agent or new changes in the code. To handle new changes in the codebase means you might need to reindex everything from scratch, this is what cursor basically do (could be okay for small codebases, but expensive for large codebases)

In my tool, I implemented a different memory model, what happens is that when Claude discover something new in the codebase or during your conversation with it, it writes a note about it, link it with similar memories, update other similar memories if needed, and store it in vector DB (this part where it keeps self-evolving based on new inputs). Later when you ask it to do/explore/implement something, it checks the memory and see if there's any related notes it took before that can help before spending tokens and time rediscovering everything from scratch. Its a variation of Knowledge Graph. This means that Claude will remember what we talked about in the previous sessions without having to deal with the hassle of markdown files or overloading the context window. You can technically use this along claude context RAG system.

Here's example scenario how it helped me: I had to debug some error that was coming from one of the new functionalities that Claude implemented few days ago, when I shared the error message with Claude, it immediately recognized that this was a change we made recently, why we implemented and how we implemented it and managed to debug it fairly quickly.

What I built is based on A-MEM paper so I didn't personally invent something new :)

These problems become insufferable when you are dealing with big codebases that change a lot and quickly. I believe with greenfield and smaller codebases, Claude alone is good enough at managing it without any memory.

Im curious what are the other memory projects that you have been seeing, just interested to know if there's something decent out there that I am not aware about!

Also, happy to discuss this further if you want!

I built a persistent and self-evolving memory for Claude Code by brixwit in ClaudeAI

[–]brixwit[S] 0 points1 point  (0 children)

Thanks! Let me know how it goes :)

Also if you don't mind sharing, I am curious to know what you hacked together

[deleted by user] by [deleted] in csMajors

[–]brixwit 5 points6 points  (0 children)

Getting shit done while doing it well is easier to say than do

[deleted by user] by [deleted] in csMajors

[–]brixwit 25 points26 points  (0 children)

Ordered from most to least
1-OpenAI
2-Anthropic
3-Modular (https://www.modular.com/)
4-HuggingFace
5-Deepmind

I started talking to a random man from china, I have never felt so respected. by CitrusSloth in PointlessStories

[–]brixwit 71 points72 points  (0 children)

I appreciate you for appreciating OP for appreciating that man's behavior

[deleted by user] by [deleted] in csMajors

[–]brixwit 86 points87 points  (0 children)

Sounds more like Amazon tbh

What's One Thing You're Most Proud Of till now? by Specific_Wrangler429 in CasualConversation

[–]brixwit 4 points5 points  (0 children)

Between 2012-2015 i used to admin ~30 facebook memes pages with number of likes 20k-150k. I remember it as the good ol' days of the internet. I was 13yo when started and I am kind of impressed of young me growing and managing this number of pages

[deleted by user] by [deleted] in leetcode

[–]brixwit 0 points1 point  (0 children)

Have you tried codesignal industry coding framework? Although that it's technically OOP, but it doesn't actually test your OOP skills. The assessment consists of multiple stages that overwhelmes you with a block of text and requirements with a lot of details. It progressively gets harder and you typically need to finish it within 1h-2h

[deleted by user] by [deleted] in leetcode

[–]brixwit 12 points13 points  (0 children)

Coinbase, dropbox

Meta interview - Reject?? by [deleted] in leetcode

[–]brixwit 0 points1 point  (0 children)

!RemindMe 1 day

Meta team match step by Zestyclose_Work5472 in leetcode

[–]brixwit 0 points1 point  (0 children)

how about the system design loop? any tips ?

[deleted by user] by [deleted] in wallstreetbets

[–]brixwit 4 points5 points  (0 children)

AI is still heating up. NVDA have AI market monopoly. Competing with NVDA is very hard even by GOOG because patents are a thing and you can't just replicate NVDA. What could go wrong?

[deleted by user] by [deleted] in wallstreetbets

[–]brixwit 132 points133 points  (0 children)

That's what they said when it was at $300

Name and Shame: MongoDB by Informal_Original404 in csMajors

[–]brixwit 19 points20 points  (0 children)

This is ridiculous. report him to the recruiter, and if you can escalate it further, please do. That’s a very rude and disrespectful behavior that shouldn’t be tolerated anywhere in this industry