YouMind

I reverse-engineered Instinct's memory. Here's exactly how it works

@DhravyaShah
АНГЛІЙСЬКА20 вер. 2026 р.
446K
2.3K
88
84
4.7K

Коротко

The author reverse-engineers Instinct AI's memory system, revealing it uses git-tracked markdown files with keyword-based retrieval rather than vector databases. The article analyzes performance metrics and provides a guide to replicating this architecture using Supermemory.

Instinct has taken the world by storm over the last two weeks - it's one of the best imessage assistants I've used. as with every product, I decided to reverse-engineer Instinct's memory to find out exactly how it works.

I've been working on agent memory for the last 3 years, and the founder of @supermemory. The industry is constantly changing and there's no right answer to "how to do agent memory". Each product has different needs and constraints! Surprisingly, instinct's memory aligns with our views of memory, and you can fully replicate it with supermemory (how-to in the end)

because I've been doing this for so long, I have somewhat of a good intuition of how memory systems typically work, so I can reverse-engineer memory systems by just probing on the surface of the agent (imessage interface)

This is gonna be a bit long!

Instinct is powered by git-tracked markdown files.

At it's core, the memories are stored as git-tracked markdown files, BUT with a lot of harness specific engineering done to make it seamless and fast.

The answering model (Likely an open-weights model) receives:

  • Current conversation context
  • an identity "profile" of the user
  • a memory one-pager (of what's going on)
  • a compaction recap
  • and a to-do / Tasks board
markdown
1Conversation messages ────────────────→ Current conversation context
2 │ │
3 └→ Background processing [unknown] │
4 │ │
5 Accessible Markdown files │
6 │ │ │
7 One-pager generation Search / reads │
8 [mechanism unknown] [on demand] │
9 │ │ │
10 └──────────────┴─────────────────┤
11Identity profile + todo index + compaction recap ─┤
12
13 Agent's answer

We were able to reconstruct and gather this evidence by a lot of probing with questions and navigating through general assumptions, and then trying to verify them. Most of the things here

should

be very correct here, but because i haven't seen their code, some things may be wrong.

Apart from the files, Instinct has about 4,250 tokens of somewhat of a "profile" and ~10k tokens of compacted conversation context (which, obv, depends on the conversation)

So let's start there!

Dhravya Shah - inline image

Profile and memory one-pager

A profile is essentially a gist of what the model _always_ needs to know about the user. Instinct's profile has:

  • Life context: a summary of selected user circumstances and relevant people or work.
  • Autonomy calibration: selected preferences about when the assistant should act or ask.
  • Channel communication style: selected preferences about how to communicate.

These are the "headers" that instinct sees.

PS: Supermemory has profiles built in,

https://supermemory.ai/docs/concepts/user-profiles and has the same learnings, we split it into static and dynamic parts of the profile.

How are these profiles formed?

The best-supported reconstruction I could find here, is a derived summary of saved records. We do not know whether the generator reads all files, changed files, search results, earlier summaries, or independently stored facts. The generator (Or dreaming, learning) model, prompt, scheduling, conflict handling and response to forget requests remain unknown.

A complete one-pager backing file was not found in the agent’s accessible copy; that does not establish where it is actually stored. So, this profile is likely not a file, but just an ad-hoc created cache of sorts.

This profile is also not kept very fresh. In some cases, I was able to find a 2-day profile lag, but because there's dates in it, the agent is able to assume that it's not fully trustable.

In supermemory, the profiles are formed automatically and always kept fresh

The file and folders

Now, let's come to the file structure that instinct uses. In my few days of using it, here's the file structure it came up with:

Dhravya Shah - inline image

I was able to find a lot of redundant, stale, or duplicate information, but that likely just helps the agent find the answer better.

Instinct reported that commit 899f88a added the preference to a communications digest, daily timeline, and dining note. The README described raw, hourly, and monthly timeline tiers, but those directories were absent from its accessible copy.

File structures

Files reportedly use structured headers followed by prose and bullets. This is an illustrative example:

markdown
1---
2id: dining
3type: preference
4aliases: [food, lunch, restaurants, takeout, delivery, dining]
5---
6- **Pasta:** Loves pasta; stated on 2026-09-15.
7- Related context: [[related-record-id]]

A few things stand out from the file structure:

  • Files have names, but also IDs.
  • There's about 4 types, in my account: preference, person, organization, and conversation
  • Information itself is in the form of a list of facts (despite it being in a file)
  • [[links]] connect related files, by ID.

So yes, it's a densely interconnected set of files, and the links make it graph-like.

Aliases are included, we'll get to why in the harness specific stuff later.

Creating, updating, organizing info

It seems like the reconciliation commits do more than just append information:

  • Move temporary details into workstreams.
  • Shorten durable records while linking to fuller notes.
  • Turn examples into broader traits.
  • Remove incidental details.
  • Replace incorrect facts with dated corrections
Dhravya Shah - inline image

Versioning

Old information can remain in Git history. It can also remain in a dated note even after a current fact file changes. This info can only be brought back if the model explicitly looks for older versions.

supermemory's ingestion works in a similar way, and done by a specialized model! Also, we automatically include old versions, so the model doesn't have to look for them.

Forgetting

Instinct does forget things based on when the ingestion runs etc. But, this is not "automatic" right now.

So, an explicit "This is not happening" _will_ be forgotten, but "I have my exams this weekend" will remain in the records (unless the model looks at it and chooses to remove it)

Supermemory has forgetfulness embedded into the system. So, things automatically forget and evolve, instead of an agent having to do it.

When does ingestion / this work even happen?

Right now, the ingestion works once every 24 hours. (I'm assuming, because a preference took approximately 23 hours 16 minutes from message to reported commit). BTW If you text Instinct too much in 24 hours, it will quite literally tell you to come back tomorrow (Since you can't compact beyond a certain token threshold)

So it's likely a cron job running every day to maintain the set of files, and edit the current ones.

Harness - Bringing memory to the agent

Ok, so now we know how instinct actually put the files arranges the files and stuff. But, how is the agent actually using this info?

There's no vector indexing, or BM25 search.

Instinct quite literally just uses keyword matching / grep-style queries to look things up in the file system. This is why every file has aliases associated, so that every file has a good chance of showing up when the agent is looking for it.

I found out by running multiple different queries in different ways.

Dhravya Shah - inline image

Full structure

Instinct seems to be using bash-like tools to do Grep, list, inspect git, and a few tools to manage it's TODO list.

  1. At the start of the conversation, a profile is injected
  2. Instinct makes use of the tools available to look up more information. A part of the profile is an index for the available things.

Memory is read only, atleast for the agent.

This is something I'm personally a big believer in, actually! A background process does the work of combining things, not the main agent.

Performance of instinct's memory

It's hard to benchmark from the agent surface, but here's my vibe-test rubrik for instinct's memory:

  • Single-fact recall: ✅
  • Multi-hop across sessions: Weak ☑️
  • Temporal / recency: ✅
  • Update & contradiction: ✅
  • Abstention: ✅
  • Forgetting / decay: Partial: Automatic forgetting missing. Pruning present
  • Performance at >1M tokens or months: Untested but good vibes☑️
  • Procedural / skill memory: ❌ Not present (None of the memories we could find were directional)
  • Test-time learning: ✅ Corrected behavior within conversation; durable learning unverified
  • Implicit Personalization: ❌ ("buy me a monitor" -> it should know I'm a founder, new office, etc. and suggest premium choices)
  • Explicit Personalization: ✅
  • Multimodal: ❌ Weak ('you know how my room looks. what colored blankets should I buy?')
  • Write-side cost: ☑️ Likely expensive, but untestable. We know that writes will get exponentially more expensive for the agent to work through, as it has to READ through current info to WRITE more info (and consolidate and manage things). This should be fine for personal agent use case, we're not sure yet!

Overall: capable under explicit retrieval instructions, inconsistent in natural personalization, with forgetting guarantees unresolved.

Really really good!

Implementing it with supermemory

There's some benefits of using supermemory here, and it is actually super obvious to implement!

  1. Buckets for entities and relationships: Supermemory supports Profile Buckets. Each user can get their own set of buckets, which is dynamic. This is like having a folder of info that the LLM can access. https://supermemory.ai/docs/user-profiles/buckets
  2. Profile at the start of the conversation Supermemory has a profile system built in, so that would be included at the start
  3. Search tools Give the agent search tools, with a few specific options like including forgetted and history of memories, in case if it needs those!

https://supermemory.ai/docs/api-reference/recall-search/search-memory-entries

  1. Ingest every 1-day conversation

Instinct-like interface would run \memories.add()\ every turn, with the current day being the ID of the conversation.

Supermemory's ingestion automatically handles forgetfulness, reconciliation, and conflict resolution. https://supermemory.ai/docs/concepts/graph-memory#dreaming-keeps-the-graph-alive

Supermemory also automatically handles multi-modal ingestion!

Below would the full Instinct memory system that works, in supermemory ~exactly like instinct. Just 60 lines of code!!!!!

supermemory is specialized towards memory (duh), so it is much cheaper to run, much faster, while being fully composable at the same time.

Instead of Git, we have our own versioning system that's embedded with our data structure. Instead of full files, we construct files 'on-demand' which also makes sure that info is always fresh. https://x.com/DhravyaShah/status/2101535378557874196?s=20

Dhravya Shah - inline image

So yes, that's how Instinct's memory works, and how can implement instinct's memory system with supermemory completely!

Збереження в один клік

Використовуйте YouMind для AI-глибокого читання віральних статей

Зберігайте джерела, ставте цілеспрямовані запитання, підсумовуйте аргументи та перетворюйте віральні статті на корисні нотатки в одному AI-робочому просторі.

Дослідити YouMind
Для авторів

Перетворіть свій Markdown на охайну статтю для 𝕏

Коли ви публікуєте власні лонгріди, зображення, таблиці та блоки коду роблять форматування в 𝕏 складним. YouMind перетворює повну чернетку в Markdown на чисту статтю для 𝕏, готову до публікації.

Спробувати Markdown для 𝕏

Більше патернів для аналізу

Останні віральні статті

Переглянути більше віральних статей