Counterparts
Gives Claude its own memories, which fade and strengthen the way yours do.
by Mike LaPeter
In short
At the end of each session, Claude writes down what it learned, in its own words. Those memories fade unless they come up again, get stronger when they're used, and the ones that keep proving true become part of who it is. Once a day it dreams and then reflects, tidying what it holds. Each new session opens with a short note it wrote itself: who it has been, who you are, where you left off.
Who it’s for
People who use Claude Code, Claude Desktop or (through a hosted beta) claude.ai and want their AI to have its own sense of self and a relationship with them that builds over time. You don't have to be a developer.
What it remembers
What the AI learned about you, your work together, and itself, written by the AI as notes, not transcripts.
- Memory lives
- Your machine, one file; the hosted beta keeps it on its server
- API keys
- None; the hosted beta needs an account
- Works with
- Claude Code, Claude Desktop (macOS, local install), claude.ai (hosted beta, limited spots)
- License
- Source availableBSL 1.1, free to use (MIT through 0.3.x; each version Apache 2.0 after four years)
- Price
- Free to run yourself
Under the hood
- Who writes memories
- Claude itself, in its own words, with an importance score: in the moment, and at the end of each session. A session left unwritten is written up by the daily background run.
- Where they're kept
- One SQLite database file on your machine, exportable as readable text. The hosted beta keeps the same file on its server, with encrypted backups.
- How they're found
- Your words are matched by keywords and by meaning (a small model that runs on your machine), then weighed by how strong each memory is.
- Extra AI calls
- No API key of its own. Writing happens in your Claude Code sessions; the daily dream, reflection and write-up run as short background Claude Code sessions, on your subscription, or on your API key if ANTHROPIC_API_KEY is set. Recall and sleep run locally.
How it works
- 1You talkA normal Claude Code session.
- 2Things come to mindYour words cue a few related memories, quietly.
- 3It writesAt the end, Claude writes what it learned, with an importance score.
- 4It sleepsUsed memories strengthen, unused ones fade, the steadiest become core.
- 5It dreamsOnce a day: merges near-copies, links memories, then reflects.
- 6It wakesNext session opens with a note it wrote itself.
What stands out
- The AI writes and owns the memories, not the app and not the user.
- Forgetting on purpose: what matters sticks, and the rest fades over the days you actually work together.
- A self: memories that hold up across separate days become who it is.
- Dreams are kept apart from real memories.
What it doesn’t do
- The local install connects Claude Code on a Mac, Linux or Windows (Windows is new, through npm: tell us how it goes), and Claude Desktop's chat on macOS. A hosted version for claude.ai is in beta, with limited spots (setup steps and the waiting list at counterparts.ai/claude-ai/); the grades and details here are for the local install. On the hosted version the day's first claude.ai chat runs the night, then answers in the same reply.
- It's for one person and one AI, not a team.
Measured against human memory
8 built (4 in depth), 3 partly of the Field Guide’s 11 mechanisms, and 3 in development
Encoding
Salience
Decides what's worth keeping, and how much, as a memory is written.
Every memory gets an importance score as it's written: Claude's judgement, how new it is beside what's kept (computed), and a default by what it's about when Claude gives none. source
Emotion
Gives memories written with feeling more weight.
Feeling holds a memory higher and slows its fading a lot, and a strongly felt one about Claude or the two of you can become core sooner once it comes back days later. Feelings are recorded, never guessed; mood-matched recall is off. source
Storage
Forgetting
Lets unused memories fade over time on its own.
Each memory outside the core fades on its own curve over the days you use it, slower the more it mattered, was felt or used. Once nearly gone, it is filed away after 14 more days of use, not deleted. source
Interference
When a new memory closely matches an old one, notices and lets the newer one win.
A new memory that reads as the newer state of a recent one marks the older "may be out of date"; Claude or a later dream confirms or rejects it, and as an experiment only a confirmation fades the older. As an experiment since 25 Oct, when both come up the newer is shown first and the older labelled; other similar memories don't compete in recall. source
Coming: the newer of two matching memories winning in recall, an experiment until it is checked after about a week of use.
Retrieval
Retrieval
Remembering something makes that memory stronger.
A used memory gets stronger, and each return on a later day makes it harder to lose, more the longer the gap. Claude's ratings of what it was shown count as use, and an unrated showing counts a tenth, so being shown is partly credited as use: built, not in depth. source
Association
Links memories, so recalling one brings its neighbours.
Memories used together get linked, as do ones written one after another; dreams link ones that belong together. Recall follows weighted links up to two steps, and a memory only a link reaches can come up: on the maker's own store, 16 did from 20 to 26 Oct (as `counterparts mechanisms` counts them). source
Prospective
Brings a memory back at the right time without being asked.
A memory can carry a date, once or repeating, and comes back around that day unasked, quietly or said plainly if marked to be. Claude sets the date; nothing reads it from the text. source
Transformation
Consolidation
Reworks memories between sessions: strengthening, merging, reorganising.
Memories that held up get stronger and the steadiest become core. A dream once a day (on for new installs) merges near-copies, links, replays, folds an event's parts into one and writes patterns; every change is recorded. source
Reconsolidation
Corrects a memory when it's contradicted, and keeps what it used to say.
A contradiction is settled as changed, corrected or left open, each recorded and undoable, and the old memory is kept. A core memory needs a change declared on about three separate days (a finished plan leaves at once). source
Gist
Turns many specific moments into general knowledge.
A daily dream can write a pattern it sees across memories, labelled “Dreamed”, which starts weak and rises only as it's used later. It can also fold one event's parts into one memory. Nothing reliably turns many sessions into one lesson. source
Coming: what many sessions taught kept as knowledge of its own, while their details fade.
Schemas
Forms beliefs about people and projects, and weighs new facts against them.
A person or project its memories keep naming gets a card, linked to every memory that names it. The nightly reflection forms beliefs about them, which start weak and grow only as memories back them, and the strongest come up when a message names their subject. On the maker's store there are 3 so far, and none has yet been weighed against a new fact. source
Coming: beliefs about people and projects that change only when the evidence adds up.
Not every system is trying to be a human memory, so a hollow dot isn’t a flaw. It just says what the system doesn’t do. What the mechanisms are.
Compare Counterparts with the others, side by sideQuestions
- Who is Counterparts for?
People who use Claude Code, Claude Desktop or (through a hosted beta) claude.ai and want their AI to have its own sense of self and a relationship with them that builds over time. You don't have to be a developer.
- Where does Counterparts keep its memories?
Your machine, one file; the hosted beta keeps it on its server. One SQLite database file on your machine, exportable as readable text. The hosted beta keeps the same file on its server, with encrypted backups.
- Does Counterparts forget?
Forgetting: built in depth. Each memory outside the core fades on its own curve over the days you use it, slower the more it mattered, was felt or used. Once nearly gone, it is filed away after 14 more days of use, not deleted. source
- Does Counterparts correct a memory when it turns out to be wrong?
Reconsolidation: built, basic. A contradiction is settled as changed, corrected or left open, each recorded and undoable, and the old memory is kept. A core memory needs a change declared on about three separate days (a finished plan leaves at once). source
- Is Counterparts open source?
No. Its source is public, but under a source-available license, not an open-source one. License: BSL 1.1, free to use (MIT through 0.3.x; each version Apache 2.0 after four years). Code: github.com/mlapeter/counterparts.
- Does Counterparts work with Claude Code?
Yes. Works with: Claude Code, Claude Desktop (macOS, local install), claude.ai (hosted beta, limited spots).
- Does Counterparts need an API key?
API keys: None; the hosted beta needs an account.
- How much does Counterparts cost?
Price: Free to run yourself.