Other languages: Ukrainian | Russian
Turbo Quant Memory keeps project knowledge searchable without keeping full source text in the live prompt.
The strategy is simple:
- write locally
- retrieve compactly
- hydrate only when the task truly needs more context
| Layer | What it means |
|---|---|
| One local MCP server | A single stdio MCP server handles memory for every supported client |
| Project-first storage | Notes belong to the current repository by default |
| Curated global reuse | Cross-project knowledge appears in global only through explicit promotion |
| Compact-first retrieval | Agents should ask for the smallest useful answer before opening more |
There is no separate memory engine per agent. Clients share the same server contract and the same storage rules.
| Scope | Role | Default? |
|---|---|---|
project |
Repository-local knowledge and notes | default write target |
global |
Reusable cross-project knowledge | promotion only |
hybrid |
Merged read mode with a strong project bias | default read mode |
- Stores knowledge tied to one repository.
- Keeps decisions, lessons, handoffs, and patterns close to the codebase that produced them.
- Is the safest default for everyday work.
- Stores knowledge that is useful outside the original repository.
- Is populated only through explicit promotion.
- Preserves provenance back to the project note it came from.
- Merges
projectandglobalretrieval results. - Prefers
projecthits when both are similarly relevant. - Lets agents reuse proven patterns without losing repository specificity.
The current project identity resolves in this order:
- normalized
originremote URL - repository root path hash fallback
- explicit overrides
Supported overrides:
TQMEMORY_PROJECT_ROOTTQMEMORY_PROJECT_IDTQMEMORY_PROJECT_NAME
This makes project memory stable across sessions, while still allowing controlled overrides for unusual launch environments.
Storage is file-backed and local-first:
~/.turbo-quant-memory/
projects/
<project_id>/
manifest.json
notes/
<note_id>.json
global/
manifest.json
notes/
<note_id>.json
Notes and manifests are written atomically with a temporary file plus os.replace(...).
| Action | Result |
|---|---|
remember_note(..., scope="project") |
stores a typed project note |
direct write to global |
rejected |
promote_note(note_id) |
creates a reusable global copy with provenance |
deprecate_note(...) |
retires outdated knowledge without deleting history |
This keeps global small, deliberate, and resistant to cross-project contamination.
semantic_search supports project, global, and hybrid.
hybrid is the default and follows these rules:
- merge
projectandglobalcandidates - apply a strong project bonus
- prefer Markdown blocks over memory notes when matches are close
- break ties by project preference, then newer
updated_at, then stable identity
By default, retrieval searches both indexed Markdown blocks and persistent memory notes.
Every returned result keeps provenance visible. The compact envelope includes:
scopeproject_idproject_namesource_kinditem_idblock_idwhen the hit comes from Markdownsource_pathtitleheading_pathupdated_atscoreconfidenceconfidence_statecompressed_summarykey_pointscan_hydratenote_kindwhen the hit is a notepromoted_fromwhen the hit is a promoted global note
Default retrieval does not return raw excerpts or whole-file dumps. That boundary keeps token usage low and pushes fuller context into explicit hydration calls.
Hydration is explicit and bounded:
| Mode | Behavior |
|---|---|
default |
target item plus a small local neighborhood |
related |
target item plus a wider bounded neighborhood |
Rules:
- Markdown hydration stays file-local.
- Note hydration returns the full note body plus note metadata.
- Agents should hydrate only after compact retrieval is not enough.
Promoted global notes keep a promoted_from block that points back to:
- original scope
- source
project_id - source
project_name - original
note_id - original
source_path
This makes cross-project reuse traceable instead of opaque.
- write into
project - read through
hybrid - prefer the first clearly relevant
projecthit - hydrate only when confidence is low or more detail is required
- promote only reusable knowledge
- search
globalorhybridfor cross-project patterns - keep
globalhigh-signal and small
- Treat retrieved memory as tool data, not final authority.
- Preserve source boundaries and provenance.
- Avoid dumping large raw excerpts by default.
- Do not silently turn project-local notes into global guidance.
- Keep the system local-first and easy to deploy.
Turbo Quant Memory is designed to behave like practical working memory for AI coding agents:
- local by default
- compact on recall
- traceable on every hit
- explicit when opening more context
- conservative about what becomes reusable across repositories