rein
Multi-source cross-validated memory for AI agents
English | 中文
English
rein is a self-adaptive memory system for AI coding agents. It stores, recalls, and manages memories across sessions with embedding-based semantic dedup, data-driven decay (Kaplan-Meier survival curves), and a fully closed self-learning loop that replaces fixed parameters with learned values.
Current release: v1.5.5 (2026-11-12) — dependency security refresh: the lockfile moves to patched releases of openssl, zstd, rustls-webpki, webpki-roots, tokio and SQLite (rusqlite 0.41), and cargo audit is clean. Building from source now needs Rust 1.89 or newer; nothing else changes. v1.5.4 (same day): Anthropic works as an LLM vendor: chat requests are built per vendor, so an Anthropic model gets no temperature, no json_object mode and a real thinking switch, and rein providers status --probe no longer reports a valid Anthropic key as unauthorized. v1.5.3 (same day): the owner token (REIN_HTTP_TOKEN) resolves like provider keys: process environment first, then ~/.rein/secrets.env (rein keys set REIN_HTTP_TOKEN), so rein doctor and every other command agree with the running server without the token being exported into a shell. v1.5.2 (same day) fixed #5 and #6: embedding requests packed by size with failing texts isolated, so a store with a few very large memories converges in one run; a legacy UNIQUE on the OAuth client name repaired on open; internal error text no longer returned by OAuth and REST endpoints; read-only database open; merges that never shorten a memory. 2155 lib tests / 0 fail; clippy + fmt clean.
v1.4.1 (2026-10-10) — maintenance patch on the v1.4.0 runway automation line. Tantivy no longer leaves one segment per memory: the staged rebuild loads the corpus through a single writer with automatic merges disabled and compacts to one segment (a 10.6k-memory database rebuilds in 15 s instead of ~28 min; 10,651 segments → 1), and single inserts wait for their scheduled merges. Background warmup runs on a detached thread, so rein serve exits on SIGINT/SIGTERM during a rebuild instead of lingering until it finishes. The GUI's synthesis thumbs no longer show a vote as recorded when the server refused the write (auth = "public" with a public_url rejects every REST mutation) and show the refusal reason instead; the Connectors page explains the owner-only 401; the GUI's own doctor page no longer flags gui_runtime by probing itself; and #[op] validates literal REST paths at expansion time. 1900 lib tests / 0 fail; clippy + fmt clean; 2 codex review rounds (1 P2 closed, last round clean).
v1.4.0 (2026-09-04) — the runway automation line. The adaptive pipeline now records every stage in SQLite (adaptive_pipeline_last_run, surfaced by rein doctor, adaptive-status and rein gc); A12 publishes a Complete generation even when the store moved during a multi-hour calibration (activation stays fail-closed on the input epoch); the leave-one-out corpus build uses an inverted index with semantics identical to the pairwise reference (two hours down to eight seconds on a 9.7k-memory database, verified against the reference on real data); rein warmup backfills missing vec_memories rows and migrates the table atomically when the embedding model changes, with a vec_rows_provenance stamp that refuses mixed-model writes; and [hooks.claude] gives Claude Code prompt-time recall context that emits RecallComplete with a feedback id. config_version 4. 1887 lib tests / 0 fail; clippy + fmt clean; 26 adversarial review rounds (14 P1 + 43 P2 closed, last two rounds clean).
v1.3.0 (2026-07-15) — the self-supervised activation line
A12 recall-fusion weights can now calibrate without human feedback, fully fail-closed: structural leave-one-evidence-out families (canonical evidence / concept / episode), a SHA-256 family-disjoint split with a permanent activation holdout, a side-effect-free recall trace, paired-McNemar holdout gating, and a sealed parameter policy (schema 3) that steps recall_fusion:* adoption by at most 0.05 per refresh behind the judge structural trust gate. A SQLite schema-v4 input-epoch counter binds every calibration to the exact store state it was trained on; structural judge probes give zero-human-pair deployments an honest health gate; destructive dedup merges are floored at the static threshold with an exact false-merge safety bound. Released ≠ activated: everything ships shadow/fail-closed until live evidence passes the release gate. 1819 lib tests / 0 fail; clippy + fmt clean; 7 adversarial review rounds.