OmniCognition / MetaCog-Mem
A Hyperparameter-Free Metacognitive Memory Manifold for LLM Agents
Epistemically-typed points, edge-free geometric relations, and a
retrieval walk whose depth is governed by the propagation of uncertainty.
Abstract
We present MetaCog-Mem, a memory architecture for large-language-model
agents built on three commitments: (i) memory is a manifold of
epistemically-typed points — facts, thoughts, actions, and self-built
tools sharing one schema and one lifecycle — rather than a graph of
materialized edges; (ii) every threshold is either a mathematical constant
or emerges from the data (no tunable hyperparameters); and (iii) the
provenance of every datum is typed and audited, so generated content
can become content but never evidence (anti-laundering by
construction). Retrieval is a coordinated walk over the three point
kinds at once. Its central novelty is that walk depth is governed by the
propagation of uncertainty (GUM 1995) over the retrieved evidence chain:
a hard floor of three hops, an emergent σ-cap derived from the manifold's
own local resolution, and a deterministic keyword-coverage stop — no
fixed maximum and no learned controller. A single invocation runs the
walk to completion; an agent above it performs only breadth pivots —
optionally scoped to a discussion before escalating to the global
knowledge base, gated by a cheap batch pre-search so a non-probative
query never pays for a full walk, and targeted by tri-modal
(exact / fuzzy / regex) matching over the hierarchical tag namespace. On
the LoCoMo long-conversation benchmark the walk raises evidence
agent-recall from a static 0.31 (Recall@7) to ≈ 0.85, while a
keyword-oriented token-discipline pass cuts the worst-case per-query input
cost by 84 % (118k → 19k tokens). Relative temporal expressions are
resolved to absolute dates deterministically at both ingestion and answer
time. The system is implemented as a Python library and an MCP service;
all claims are reproducible from the included LoCoMo harness.
📖 Details — full documentation (click to expand)
1. Introduction
LLM agents that converse over long horizons need a memory that (a)
retrieves the evidence bearing on a question even when the question and
the evidence share no surface vocabulary, (b) reasons across several
hops without losing the thread, (c) consolidates redundancy on its own,
and (d) never silently promotes its own guesses to facts. Graph-of-edges
memories satisfy (a)–(c) at the price of materialized relations and a
thicket of tuning knobs; they rarely address (d).
MetaCog-Mem takes the opposite stance on each axis. Relations are not
stored — they are the geometric pull between points in a
keyword-embedding manifold (§2). The retrieval walk is not bounded by a
hand-set depth — it is bounded by the accumulated uncertainty of its own
evidence chain (§4). Consolidation is not scheduled — it fires from a
single Poisson floor that is parameter-free (§5). And provenance is
not advisory — a generated Observation raises a LaunderingError at the
type level (§2.3).
The remainder of this document specifies each component and reports the
LoCoMo evaluation. Module-level documentation lives in
metacog/README.md; the benchmark harness and the
full per-version results table live in
benchmarks/locomo/README.md.
1.1 Architecture at a glance
flowchart TB
subgraph IN["Continuous ingestion"]
MSG["messages user+agent<br/>async · timestamped"]
CODE["generated code<br/>push_code / capture"]
SK["skill JSON<br/>ingest_skill"]
end
subgraph MAN["Memory manifold — typed Points, no edges"]
FACT["FACT"]
TH["THOUGHT"]
ACT["ACTION / tool"]
end
IN --> MAN
MAN -->|hybrid RRF + HyDE| WALK["meta-cognitive WALK<br/>uncertainty-governed depth"]
WALK -->|keepup stream / answer| OUT["answer + reasoning chain"]
WALK -->|record_resolution| SLEEP["sleep(): collisions +<br/>latent skill distiller"]
SLEEP --> MAN
The manifold holds one kind of object — a typed Point. Everything else
is a process over it: ingestion feeds it, the walk reads it, sleep
consolidates it. There are no edges; relations are geometric proximity.
1.2 The three tool tiers
The tools that operate the memory are classified by role
(metacog/canonical_tools.py, test-guarded to partition the live tool set
exactly). This separates what the memory needs to run from what an external
agent should see, and is the axis along which the MCP surface is gated
(METACOG_SURFACE / build_app(surface=…)):