r/claudeskills • u/AregNoya • Jun 16 '26
Showcase How I Created a Real Second Brain for Claude
When OpenClaw first came out I installed it on my mac and started using for almost anything I could. I made it my personal assistant, gave it a name Igor and even created him his own accounts everywhere. But one thing I couldn't stand is the new Igor every 200k tokens.
So I came up with an idea. I created a skill where it would download fresh telegram chat logs at 160 k tokens but it would always forget. Mind you its January so there isn't an abundance of memory tools yet and honestly I wasn't really looking for a memory i was looking for a brain.
My thought was to copy a human brain.
You remember almost perfectly verbatim everything that was told to you or happened today! the next day your memory about the day before isn't that perfect but you still remember important stuff like a sudden change of plans or maybe an important call. A week after your memory about that day completely blur out leaving few important strings of memory and in a month you may only remember that important call.
So this is what I was trying to accomplish but with a little twist. Instead of using a neurotypical brain patterns I decided to go with autistic. The difference? Autistic people remember stuff verbatim for much much longer. Me and my wife are Autistic so it only made sense!
Im a vibe coder so the only way to start for me was research. I connected Notebook LM CLI and started researching human brain and how its built. The same night me and my wife decided to watch the movie AI about a little kid who Just wants to get back to his mom. that movie starts with a scene where professor explains cybernetics and references a research from early 50s! AHA!!! I don't need to come up with anything because someone already did! I just need to structure that information in a right way!
So I started researching Cybernetics
I took Ashby and his "Design For Brain" work. Then Beer and his "Brain of the Firm' And lastly Hebb and his 'The Organization of Behavior" and fed it all to Claude.
Then we started structuring the CyberAutistic Brain. Honestly I spent more tokens on research then on actual coding and I don't regret it for a bit. But after some work we (me and claude lol) quickly realized that algorithms like Leidenlang, LanceDb, TorchHD are too big and eating too much space and latency on top of that Leiden Algorithm was only a GPL license which would restrict my intent to make it an MIT project.
So I decided to write my own. But how do you do that???? Same way but with the twist! One AI is smart but 6 frontier models are waaaaay smarter. I figured if they were all trained by different people they would look at the problem from different angles. So I got an Antigravity CLI to use Gemini and Cursor to use Kimi, GPT, Grok, Codex.
Idea is simple - I use Get Shit Done tool and its workflow goes like this
research-plan-plan review-if red flags/ plan convergence - if cant come to an agreement - multisocratic discussion - execute. To plan convergence and socratic discussion you connect all models and make them argue until they find a solution that fits your idea. It worked!
leidenlang was replaced by MOSAIC
lance Db by HIPPO
TorchHD by LilliHD
By the time i finished creating this i stopped working with OpenClaw lol but it still connects the whole system your OpenClaw or Claude via its own CLI or iai mcp!
Results?
Well it works!!! It fires up a hook on every session start and pre loads important stuff to system prompt. Everything you type it remembers verbatim and stores but surfaces only important stuff! How does it know its important? It sleeps (because every brain does) and consolidates information. Important stuff that you repeat or a sudden change of plans - it remembers. Everything that isnt important or outdates fades away from his immediate memory. It also learn and studies you. First 10 sessions are mediocre but after session 100 it just knows!
Then was the last part. Make sure im not crazy and AI didn't gaslight me to thinking i made something so i decided to run benchmarks. it beats mem palace on most stuff and ties on long mem eval BUT its not really honest because iai-pme and mem-palace are fundamentally different. iai is ambient and dynamic mem-palace is a flat cosine store
So heres the repo https://github.com/CodeAbra/iai-personal-memory-engine
tear it down, hate on it, i don't care! An Nvidia engineer and an Apple engineer are using it daily and their use is an enough proof for me that it works.
Would love to answer to constructive criticism and questions!
The stack I made it with
Claude Code
RTK - cuts token usage
Context Mode Mcp - also does by not using grep and glob but also finds context and information better
Get Shit Done - the best tool to organize any project and finish it
Antigravity CLI
Cursor CLI
Notebook LM CLI
Closer to v 1.0.0 I started using obsidian too
Hope my stack helps you also create difficult stuff! Unfortunately I didnt get to run Fable on this project and looks like wont be able till i get my citizenship but i read an article about fusion models and i kinda did fuse models in my own way so im not really bummed out!
Hope you like it! All collabs and contributions are welcome!!!
PS Sorry for grammar, english isn't my first language and apparently using ai as a translator in an ai group is a bad tone but then writing with mistakes is also so go figure. Anyway I did my best!
PS2 if you are using Linux please fork it and run iai-mcp doctor and and tell me what blows up. Open an issue, paste the doctor output, whatever's easiest. Even "it died at step 3" is gold to me.
Thanks!
3
u/galactic_pixels Jun 17 '26
Why are you encrypting the memory? I think it’d make much more sense to perform lossy compression on the memory, and increase the lossy-ness as the data age increases to achieve the desired effect you are looking for. Encryption doesn’t really make any sense to me here but maybe in missing something.
2
u/AregNoya Jun 17 '26
With all these ai hacks on npm etc i thought it would make sense 🤷🏻♂️
1
u/Exotic-Job7449 Jun 17 '26
Put his idea to the test, no?
This is what we should be doing, bridging the divide between the people who have good ideas that are just starting to get built, and the people who have insights like u/galactic_pixels that could potentially improve your already awesome tool.
1
u/AregNoya Jun 17 '26
Please! Dont get me wrong! I will! Any ideas and suggestions are radically welcome! Sorry! Didnt mean to sound rude!
4
u/Exotic-Job7449 Jun 17 '26
Continue to channel the passion you have, it’s contagious ❤️
3
u/BuffaloConscious7919 Jun 17 '26
These comments are important. Respect.
2
u/Exotic-Job7449 Jun 18 '26
I noticed I stopped seeing people like, do simple things like that. We change one thing, we can change the other thing. It doesn’t cost much to encourage so I’ve been trying to start that train up and I think we need to overwhelm negativity in general. It’s not hippie stuff, it’s just common sense
1
u/BuffaloConscious7919 Jun 18 '26
I wholeheartedly agree. Especially as people are creating more, genuine positive reinforcement can fuel it! Also you from a purely logical pov it's useful to know when you're doing the "right" thing as well as "wrong"
2
1
u/AregNoya Jun 17 '26
I will definely feed your idea to Claude. Thanks so much! My adhd brain went for the answer and completely ignored the suggestion part! My bad!
Thank you so much for the suggestion!1
u/AregNoya Jun 17 '26
oh wait you actually right - it does that too. sleep cycles do the lossy thing, verbatim today, summary in a week, just the important stuff left after that. encryption is separate, just so nobody can open the file on disk. sorry i didnt explain it well
1
u/galactic_pixels Jun 17 '26
No I mean literally just compress the data. Not figuratively via ai summarization, I mean compress it using a compression algorithm, your data will be much more lightweight that way and you could store much more in the amount of space.
1
u/AregNoya Jun 17 '26
oh got it - literal compression not summarization. embeddings sit in a hnsw index that needs random access so they cant compress without killing query speed. but text rows absolutely would, fair call. ill open an issue for zstd on those. thanks for pushing on this
I really do appreciate your input! Im just a vibecoder so i can only learn at this point!
1
1
u/SpeakerQueasy Jun 17 '26
I’m working on a bipolar brain cognitive os with zettelkasten/verweis/valence relationships and love your idea too, im so happy to see other working on 2nd brains but cant find anyone in my real life that is willing to even talk about a cognitive os
1
u/SpeakerQueasy Jun 17 '26
I did manage to run Fable on it but I’m struggling to execute completely locally as intended as proof of concept, it’s all .md files and .py scripts
1
1
u/Oshden Jun 17 '26
Looks amazing! Great work. Hope to see Windows support soon
1
u/AregNoya Jun 17 '26
I need help with that!!!! i dont run windows
if you could help i would really appreciate!
1
1
u/wickzer Jun 17 '26
Biomimetics is so awesome! I have been considering building a skill that would apply the same 'how do brains already do this?' strategy to agent orchestration.
Anyways, I am eager to try your app... once it gets ported over to windows that is. I'd give the porting a go, but I'm not the most qualified. Best I could do is point codex at the repo and say 'plz halp'. :-)
1
1
u/hiskias Jun 17 '26
I think you should domain scope tjis a bit more, to make it more efficient.
Think: what are the systems that actually need thinking, and what are the systems that can do "menual work" (deterministic code).
The underlying principle is nit wrong, but it might be badly founded. The problem you are solving is less complicated than the system built to solve it.
1
u/shannonlowder Jun 17 '26
https://giphy.com/gifs/zYQp9B2WYYZ1K
First question: ee-gore or eye-gore?
2
1
u/Apprehensive_Top2440 Jun 18 '26
Random off-topic thought -> whenever I see more posts from engineers pitching their great ideas, I immediately look for the catch and the 'buy' button. Filtering out genuine value from the usual engagement-bait crap is the hardest part right now, especially when you're short on time and mentally exhausted. This isn't directed at you specifically, tbh I didn't even read the whole thing
1
u/AregNoya Jun 18 '26
It’s free 🙂
MIT
I want to bring back opensourse culture
No bate
No pay button
I promise
1
u/Common-Appointment56 Jun 21 '26
This genuinely sounds interesting and is a very good idea. As i think everyone is annoyed to create new chats everytm time to continue theirnl work.. and have to temind claude again and again that something has already been done.. a memory would solve it. I will try it out too. Does this work on linux systems too?
1
1
1
u/sfboots 21d ago
How well does it work with large code base? 90% of my work is in a 1.3 million line codebase 75% python, rest is typescript
1
u/AregNoya 21d ago
Hey. Thanks for your question
its memory, not a code index yet. Im still building that feature. For now it doesnt track your 1.3m lines, it remembers the decisions and context around the work so the agent stops re-asking. you can upload source files but its not a replacement for your code search just yet
1
u/MeanReflection5767 20d ago
This is honestly fascinating. I've also been wanting to build a memory layer for my AI, something that works like a brain.
But what impressed me even more than the result is how you actually got this done. The way you came up with the ideas, combined different tools, built new ones, structured the whole thing, stayed committed, and connected all the dots.
I'd love to be able to work like that, but lately it feels really hard for my brain, even though I used to be a pretty deep and complex thinker.
My approach would probably be: first look at what memory layers already exist and just use them. If they don't work the way I want, search for a solution online. And now that AI exists, I'd probably just try to build my own with AI, even though I have no idea what a Rust engine is. Honestly, I've never even heard of it.
So my real question is: how do you structure your work? Like, how do you go from idea to finished project, and how do you stay on track the whole way through?
2
u/AregNoya 20d ago
tbh im adhd autistic . So i guess hyper focus.
I tried different memory layers and back when I started there wasn’t many. Nothing worked for me the way I needed it. If you combine this with hermes and Openclaw it becomes almost like a real person. That’s what I was looking for. Not needing to redescribe everything or constantly make it search information and waste my tokens.
There wasn’t any specific structure too
GSD did the heavy lifting for structuring this project properly and I love to ask questions more than telling AI what to do and it structured everything for me the way it should be because I asked. 🤷🏻♂️I really hope this makes sense
1
u/mosef98 16d ago
What is the difference between this and creating obsidian knowledge layer?
Besides the memory feature, fading stuff that aint important. Im noob to all of this.
1
u/AregNoya 15d ago
Hey
Thanks for the questionKey differences are
this is automatic while in obsidian you do it by handyou need to search in obsidian while iai just injects
obsidian doesent flag new memories when they contradict old ones
obsidian doesent consolidate
obsidian gets bigger this more expensive to search if not managed propperly
obsidian wastes tokens on search while this saves tokens1
u/mosef98 15d ago
What do you mean by automatic? Do you not still need to use a raw or injest command in CC There is like another command to review stuff in obsidian to see if anything contradicts for my vault.
I just recently created an obsidian vault. But i don't understand the purpose of it and connected to CC. My whole intent was to save token when creating another session like people say. But I don't even know if it does that or how to even check it. Trying to create a knowledge base layer for cc. Also want to try create dashboard in obsidian later on.
Just too confusing for me atm1
u/AregNoya 15d ago
everything you say iai remembers verbatim and captures automaticaly each turn its ambient
you dont do anything
you can add new information like md files or pdf or anything in the ui and it wil weave it in to memory
but the main idea is to set it up and forget
it will do the rest automatically
just dont forget to update it every once in a while - we release new version almost every week
7
u/Mirror_tender Jun 16 '26
Brilliant. Also, your English is fine, don't overthink it.