Tideline

Tideline — long-term memory

Where a transcript is what an agent just said, Tideline is what it knows — durable facts about you and your work, written under a trust gate, recalled by meaning, decayed when stale, reconciled over time, and self-improving under your sign-off. It is the model-agnostic memory engine that backs Brigade, and it is built to be lifted out as its own package, brigade-tideline.

What makes it different#

Tideline is built to survive the three ways naive "vector store" memory breaks — poisoning, cross-principal leakage, and brittle exact-match recall:

PillarWhat it does
Provenance write-gateAn untrusted source (a web page, a tool result) cannot author or overwrite your identity, preferences, or corrections. Write path & gate.
Per-origin isolationOwner facts and per-channel/peer facts are scoped, so one principal's memory never surfaces in another's recall.
Hybrid recallBM25 keyword search plus a model-free HRR vector lane for the misses. Recall & ranking.
Decay + trustRecency/usage decay and source-trust fold into one score; permanent facts never decay. Decay & lifecycle.
A real memory graphRecords carry typed edges that drive supersession and contradiction handling. The link graph.
Self-improvingA nightly reflection confirms beliefs, merges duplicates, and evicts noise; behavior changes are proposed for your approval. See below.

The flow, end to end#

tideline
WRITE     add() → write-gate (trusted vs untrusted × protected segment) → dedup → storeRECALL    query → BM25 + HRR vector → trust × decay score → origin filter → context blockMAINTAIN  extract (post-turn) → consolidate (30m) → nightly dream → decay GC

Each record carries a segment, a tier, an importance, a typed set of links, and an origin — the full schema is on Records & origins.

How it works#

The engine, one deep page at a time:

Self-improving, under your sign-off#

Tideline gets better over time in two lanes. Lane A is the nightly dream: facts auto-evolve — repeated beliefs are confirmed, duplicates merge, decayed noise is evicted, all deterministically and reversibly. Lane B is behavior: changes to preferences, skills, or prompts are never autonomous — they are proposed from memory telemetry, optionally gated by an eval, and applied only after you approve, with a clean revert. The full loop is on Self-improvement.

Auto-recall fails closed

Before each turn, auto-recall injects only origin-matched facts. For an unidentified peer it injects nothing — so operator memory can never leak into an untrusted conversation.

Around Tideline#

Memory is the core of Brigade's intelligence layer, and a few neighboring systems lean on it or complete the picture:

Try it as a library

tideline.ts
import { Tideline } from "brigade-tideline"; const memory = Tideline.open("/path/to/workspace");memory.add({ content: "I keep a strict vegetarian diet.", segment: "preference" });const block = memory.context("dietary restrictions", { maxChars: 800 });
Recall quality is measured, not asserted — npm run bench scores recall@k / MRR / nDCG@k on deterministic gold sets. See API, tools & MCP.