Open-source memory for any agent harness

Memory that earns its place.

Cortex decides when long-term memory is worth the prompt cost, retrieves a bounded evidence set, learns which memories and tool workflows actually help, and lets stale knowledge cool without deleting its history.

96.7%answer accuracy in the first 90-question paired synthetic live-model benchmark
21.7%fewer approximate memory-context tokens in the 0.2 local mixed-workload ablation
0hard-delete paths in the memory lifecycle
77automated scenarios passing on the current 0.3 development build

The problem was not storage.

An agent can keep writing notes forever and still have bad memory. The harder questions are whether a request needs memory, which evidence deserves context, whether it was useful after retrieval, and what should happen when it becomes stale or wrong.

Cortex turns those questions into an inspectable local system. The core works beside any agent harness, keeps its database on the agent’s host, and adds no extra model call to the normal recall path. Hermes remains the first reference adapter.

Health without graph literacy.

A memory graph is useful for exploration, but it should not be required for maintenance. The Brain dashboard turns review work into one plain-language decision at a time.

GUIDED REVIEW · 1 OF 12Which statement should Cortex use now?
Safe to use
MEMORY A

“The service listens on port 3000.”

Observed July 2
OR
MEMORY B

“The service listens on port 3001.”

Observed July 12
A is currentB is currentBoth are validNot sure

Every choice has a confirmation step. Cortex versions or archives the old belief, preserves provenance, and records an audit trail.

A bounded recall loop.

The hot path is deterministic so it can be measured, debugged, and replaced piece by piece.

01
Gate attention

Skip memory on social and self-contained turns; use deeper plans for durable, temporal, and multi-memory work.

02
Find evidence

Combine FTS5, transparent semantic features, and a bounded walk through explicit associations.

03
Budget context

Rank by relevance, time, source trust, utility, harm, and uniqueness; then stop at a small prompt budget.

04
Credit actual use

Retrieval alone earns almost nothing. Structured values, distinctive anchors, and later outcomes determine utility.

05
Repair over time

Version corrections, learn repeated tool workflows, consolidate duplicates reversibly, and track pruning regret.

Psychology as a constraint, not a costume.

P01

Bounded access

Working-memory research motivated small, task-sensitive recall—not a claim that tokens are human chunks.

P02

Activation

Recency and meaningful reuse affect accessibility, while harm and false positives push the other way.

P03

Association

Cues can bring related evidence into reach through explicit, capped graph activation.

P04

Reconsolidation

Corrections create versions and changed evidence makes dependent beliefs reviewable.

P05

Consolidation

Episodes stay raw while repeated evidence can become a stable fact or tool procedure.

P06

Adaptive forgetting

Low-value memories cool and archive to reduce interference, with restoration when pruning regret appears.

What the evidence says today

Much better recall in the first paired test. No demonstrated TTFT win—yet.

Across 90 paired synthetic questions against 500 memories, the additive Cortex condition answered 96.7% correctly versus 6.7% for Hermes’s bounded built-in snapshot. Time to first token was effectively tied. The original fixed-recall Cortex run used more prompt tokens; the 0.2 local ablation now cuts approximate memory-context tokens by 21.7% without reducing labeled answer availability in that sample.

Synthetic benchmarks are not a universal result. The repository includes raw aggregates, uncertainty, scripts, and explicit rules for what can and cannot be claimed.