SOPHIA XT
Open · MIT · open-core

Sophia MemoryPermanent, private memory for any LLM — that scales by disk, not RAM

Drop a permanent, encrypted memory layer behind any model. It stores facts once, recalls only the relevant ones, and keeps each call flat at ~20 tokens instead of re-sending the whole transcript. Runs on CPU. Memory grows on disk, not RAM.

View on GitHub
$ pip install sophia-memory
100%
Recall@1 of old facts
~20
Tokens per call (flat)
DISK
Scales by
MIT
License

What it is

Memory that doesn't forget — and doesn't balloon.

Permanent memory

Facts persist across sessions — they don't fall out of a context window.

Encrypted at rest

The memory store is encrypted on disk. Private by default.

Runs on CPU

No GPU required. The memory layer is a lightweight library, not a model.

Behind any LLM

Drop it in front of OpenAI, Anthropic, a local model — provider-agnostic.

~20× fewer tokens

Recall a handful of relevant facts instead of re-sending the whole transcript.

Scales by disk, not RAM

Memory grows on disk. Your working set — and your bill — stays flat.

Why it's different

The two usual fixes both break. This one doesn't.

In long multi-turn tests, a sliding window forgets old facts and a strategy of stuffing the full history blows up the token count. Sophia Memory recalled old facts at 100% recall@1 while holding each call flat at ~20 tokens — ~20× fewer than re-stuffing history. These are measured proof-of-mechanism numbers from controlled long-context tests, not a SOTA leaderboard claim.

approachrecall of old factstokens / call
Sliding window (forgets)33% — drops old factsbounded
Stuffing full historyhigh, then blows upgrows every turn
Sophia Memory100% recall@1 of old factsflat ~20 / call

Memory scales by disk, not RAM — the working set stays flat as the store grows.

Compositional framework (CLM)

Route → specialist + memory → any LLM.

Memory is one piece of a larger compositional layer: a trainable Router picks the right Specialist Composer, which assembles the specialist together with recalled memory and hands the result to any LLM.

Router
pick specialist
Specialist + Memory
compose context
Any LLM
generate
layerwhat it doesavailability
RouterPicks the right specialist for an incoming request. open · MIT
Specialist ComposerAssembles specialist + memory, then hands off to any LLM. open · MIT
Memory layerPermanent, encrypted, disk-backed recall. open · MIT
Sealed specialist unitsProduction-trained domain experts. SOPHIA XT
Production-trained routerThe high-accuracy router head we ship in production. SOPHIA XT
Anchor-token harvestingThe data pipeline behind the specialists. SOPHIA XT

Open-core. The framework — Router, Specialist Composer, and the memory layer — is open under MIT. The proprietary layer (sealed specialist units, the production-trained router, and anchor-token data-harvesting) is SOPHIA XT's closed offering.

Quickstart

Install, add a memory, recall it.

1. Install
bash
pip install sophia-memory
2. Add → recall
python
from sophia import Memory

mem = Memory()                       # encrypted, on-disk, CPU-only
mem.add("My name is Dana. I prefer metric units.")
print(mem.recall("What's my name?"))  # -> the stored fact, not the whole history
3. Put it behind any LLM
python
from sophia import Memory, chat

mem = Memory()
mem.add("The project deadline is March 14.")

# chat() recalls the relevant memories and injects them into ANY LLM
answer = chat("when is the deadline?", memory=mem, model="gpt-4o-mini")
print(answer)  # "The project deadline is March 14."

You recall a handful of relevant facts and inject them into the call instead of re-sending the full transcript — that's where the ~20× token savings come from.

Give your LLM a memory that lasts.

MIT-licensed and free for any use. If it saves you tokens, a star or a coffee keeps the project moving.