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:
| Pillar | What it does |
|---|---|
| Provenance write-gate | An untrusted source (a web page, a tool result) cannot author or overwrite your identity, preferences, or corrections. Write path & gate. |
| Per-origin isolation | Owner facts and per-channel/peer facts are scoped, so one principal's memory never surfaces in another's recall. |
| Hybrid recall | BM25 keyword search plus a model-free HRR vector lane for the misses. Recall & ranking. |
| Decay + trust | Recency/usage decay and source-trust fold into one score; permanent facts never decay. Decay & lifecycle. |
| A real memory graph | Records carry typed edges that drive supersession and contradiction handling. The link graph. |
| Self-improving | A nightly reflection confirms beliefs, merges duplicates, and evicts noise; behavior changes are proposed for your approval. See below. |
The flow, end to end#
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 GCEach 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:
Write path & gate
→The provenance gate, threat-scan, same-origin dedup, and slot supersession that guard every write.
Recall & ranking
→BM25 plus the model-free HRR vector lane, trust and decay in the score, and fail-closed origin filtering.
The link graph
→The 20+ typed edge kinds, what the store mints vs. what an LLM extracts, and why traversal is v2.
Decay & lifecycle
→The importance-scaled decay formula, the three tiers, reinforcement, and the archive-then-prune sweep.
Maintenance
→Extraction, consolidation, and the nightly dream — the self-improving passes that run off the hot path.
The memory vault
→The Obsidian-style markdown mirror — MEMORY.md and daily notes you can read and edit by hand.
Records & origins
→Segments, tiers, importance, and the origin tag that isolates owner from channel peers.
API, tools & MCP
→The library facade, the four agent tools, the MCP server, the eval harness, and config.
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
Around Tideline#
Memory is the core of Brigade's intelligence layer, and a few neighboring systems lean on it or complete the picture:
Self-improvement
→The human-gated propose → eval → approve → apply → revert loop that turns memory telemetry into better behavior.
Loop engineering
→Autonomous loops that drive an agent toward a goal under hard guards, stopping only on independent done-checks.
AI-slop detection
→The deterministic anti-slop gate that rewrites generic, low-effort output before it ever ships.
Carrow handoff
→Move a live task between models with zero context loss — the cross-model continuity that keeps a thread intact.
Try it as a library
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 });npm run bench scores recall@k / MRR / nDCG@k on deterministic gold sets. See API, tools & MCP.