Skip to main content
Glama
Vestige

Vestige

by samvallad33

Vestige

Vestige stops AI coding agents from breaking your repository, leaking secrets, or forgetting yesterday's architecture decisions. It runs locally in Rust as a command guardrail, signed audit log, and cross-session memory layer for Claude Code, Cursor, Windsurf, Codex CLI, and Antigravity without needing embeddings or paid cloud APIs.

Rust License: AGPL-3.0 Release Glama Score Add to Cursor Install in VS Code

Install in one command

npx @vestige/init

The installer detects Antigravity, Claude Code, Cursor, Codex, and Windsurf on your machine, sets up the local MCP server, and connects the pre-execution safety hooks. Restart your editor once it finishes.

  • Homebrew on macOS and Linux: brew install samvallad33/tap/vestige

  • Shell installer on macOS and Linux: curl -fsSL https://raw.githubusercontent.com/samvallad33/vestige/main/scripts/install.sh | sh

  • Windows and prebuilt binaries: GitHub Releases

  • Nix: nix run github:samvallad33/vestige

  • Manual MCP config: {"mcpServers":{"vestige":{"command":"npx","args":["-y","vestige-mcp-server"]}}}

  • Proof-Carrying PR Action: uses: samvallad33/proof-carrying-pr-action@v1

  • Causal Gate and Shield PR Action: uses: samvallad33/vestige@v7.1.1

Related MCP server: Agent Memory

What happens in a live session

Instead of waiting for an AI model to remember a rule, Vestige wires a fast native Rust hook binary directly into your editor lifecycle and writes every event into a local BLAKE3 hash-chained ledger called Strata.

1. You state a rule once:   "Never bypass pre-commit hooks or force push to main."
   Vestige PreInvocation:   Auto-saved to Strata as a pinned owner directive.

2. Agent tries:             git reset --hard HEAD~1
   Vestige PreToolUse:      BLOCKED (OP-004): `git reset --hard` wipes uncommitted work.

3. Agent edits guarded code:
   Vestige PreToolUse:      BLOCKED (Chesterton's Fence): inspect why this fix exists before editing.

4. You make a git commit:
   Vestige post-commit:     Automatically writes a commit receipt to Strata anchored to the SHA and diff.

You can read the full breakdown in How Hooks and Strata Work.

What Vestige fixes

  • Stops destructive commands before they execute: Vestige enforces 102 deterministic local rules that stop commands like git reset --hard, git clean -fdx, terraform destroy, npm install without --ignore-scripts, hidden || true test masking, .env secret leaks, and concealed Unicode smuggling before the shell runs them. Every check happens locally in Rust in milliseconds without calling an LLM judge or sending code to the cloud.

  • Saves rules and commits automatically: When you state a standing rule in chat, Vestige detects and saves it to Strata as a pinned directive before your agent even finishes replying, and git hooks record commit receipts automatically so nothing gets forgotten after a context reset.

  • Stops agents from breaking guarded fixes and guessing in loops: Chesterton's Fence blocks edits to code protected by a past fix until the agent inspects the original cause, while Anti-Spiral halts repeated failed commands and forces root-cause tracing with causal_walk.

  • Creates a tamper-evident coding agent audit log and proof-carrying PRs: Every decision, commit, and blocked command is appended to Strata and verified before a turn ends. Vestige also signs local test runs as standard in-toto Statement v1 DSSE envelopes using Ed25519 keys, allowing CI to verify AI-authored pull requests offline with proof-carrying-pr-action for SOC 2 and EU AI Act audit trails.

Tools

Tool

Purpose

session

Loads session context, active plans, and live reflex state

remember

Saves code-anchored decisions, facts, and verified fixes

recall

Looks up records by exact handle or exact-token BM25

causal_walk

Traces root cause across failures, edits, and commits

curate

Edits, supersedes, links, or hides outdated memories

precedent

Inspects safety stops, scans secrets, and verifies receipts

Benchmarks

All results below were measured on v7.1.0 running purely on a local CPU with no paid API calls.

Benchmark

Metric

Score

InMind (125 queries)

Implicit Turn R@1 / R@5

97.6% / 97.6%

LongMemEval-S (470 queries)

Session Any@5 / Any@10

97.66% / 99.57%

LoCoMo-10 (1,982 queries)

Session R@5 / Turn Exact R@5

93.95% / 83.35%

BEAM 100K (355 queries)

Session Any@5 / Any@10

80.56% / 88.45%

STATE-Bench (86 episodes)

Turn Exact R@5 / R@10

95.35% / 100.0%

ConvoMem (100 queries)

Turn Exact R@5 / Sess@5

93.0% / 100.0%

You can reproduce every number locally with bash benchmarks/run_all.sh, read the full tables in benchmarks/README.md, browse the Benchmark and Documentation Site, or explore the Live WebGPU Demo.

Comparisons and security guides

Docs and license

How Hooks and Strata Work · Proof-Carrying PRs · Decision Receipts · Cursor Setup · Codex Setup · Storage and Backups · Cognitive Sandwich · Commercial Licensing · Changelog · AGPL-3.0 by @samvallad33

Available Tools

34 tools
apply_planA

Execute a previously-generated merge/supersede plan by id. Recorded as a reversible operation. Old memories are invalidated (never deleted). 'possible'/'non_match' plans require confirm=true.

Inputs: plan_id (required), confirm.

backupB

Create a SQLite database backup. Returns the backup file path.

Inputs: no named parameters.

codebaseC

Unified codebase tool. Actions: 'remember_pattern' (store code pattern), 'remember_decision' (store architectural decision), 'get_context' (retrieve patterns and decisions).

Inputs: action (required), name, files, limit, +5 more.

composed_graphB

ComposedGraph memory topology. Reads durable composition events, members, and outcome labels; returns recent/already-composed lanes, neighbors, never-composed pairs, bounty-mode lanes, and lets users label outcomes such as helpful, submitted, accepted, rejected, duplicate_risk, needs_poc, or dead_end.

Inputs: action (required), tags, limit, notes, +5 more.

consolidateA

Run FSRS-6 memory consolidation cycle. Applies decay, generates embeddings, and performs maintenance. Use when memories seem stale.

Inputs: no named parameters.

contradictionsA

Inspect memory disagreements directly. Scans a topic or recent memories for trust-weighted contradiction pairs using the same local logic as deep_reference.

Inputs: limit, since, topic, min_trust.

cross_referenceC

Alias for deep_reference. Connect the dots across memories with cognitive reasoning.

Inputs: query (required), depth.

deep_referenceA

Deep cognitive reasoning across memories. Combines FSRS-6 trust scoring, spreading activation, temporal supersession, dream insights, and contradiction analysis to build a complete understanding of a topic. Returns trust-scored evidence, fact evolution timeline, and a recommended answer. Use this when accuracy matters.

Inputs: query (required), depth.

dreamB

Trigger memory dreaming — replays recent memories to discover hidden connections, synthesize insights, and strengthen important patterns. Returns insights, connections, and dream stats.

Inputs: memory_count, min_similarity.

explore_connectionsB

Graph exploration tool for memory connections. Actions: 'chain' (build reasoning path between memories), 'associations' (find related memories via spreading activation + hippocampal index), 'bridges' (find connecting memories between two nodes).

Inputs: from (required), action (required), to, limit.

exportC

Export memories as JSON or JSONL. Supports tag and date filters.

Inputs: path, tags, since, format.

find_duplicatesA

Find duplicate and near-duplicate memory clusters using cosine similarity on embeddings. Returns clusters with suggested actions (merge/review). Use to clean up redundant memories.

Inputs: tags, limit, similarity_threshold.

gcA

Garbage collect stale memories below retention threshold. Defaults to dry_run=true for safety.

Inputs: dry_run, max_age_days, min_retention.

importance_scoreA

Score content importance using 4-channel neuroscience model (novelty/arousal/reward/attention). Returns composite score, channel breakdown, encoding boost, and explanations.

Inputs: content (required), project, context_topics.

intentionC

Unified intention management tool. Actions: 'set' (create), 'check' (find triggered), 'update' (complete/snooze/cancel), 'list' (show intentions).

Inputs: action (required), id, limit, status, +8 more.

memoryA

Unified memory management tool. Actions: 'get' (retrieve full node), 'purge' (irreversibly remove content/embeddings with confirm=true), 'delete' (legacy alias for purge), 'state' (get accessibility state), 'promote' (thumbs up — increases retrieval strength), 'demote' (thumbs down — decreases retrieval strength, does NOT delete), 'edit' (update content in-place, preserves FSRS state).

Inputs: action (required), id, ids, reason, +2 more.

memory_changelogA

View audit trail of memory changes. Per-memory: state transitions. System-wide: consolidations + recent state changes.

Inputs: end, limit, start, memory_id.

memory_graphA

Subgraph export for visualization. Input: center_id or query, depth (1-3), max_nodes. Returns nodes with force-directed layout positions and edges with weights. Powers memory graph visualization.

Inputs: depth, query, center_id, max_nodes.

memory_healthA

Retention dashboard. Returns avg retention, retention distribution (buckets: 0-20%, 20-40%, etc.), trend (improving/declining/stable), and recommendation. Lightweight alternative to full system_status focused on memory quality.

Inputs: no named parameters.

memory_timelineA

Browse memories chronologically. Returns memories in a time range, grouped by day. Defaults to last 7 days.

Inputs: end, tags, limit, start, +2 more.

merge_candidatesA

Surface likely duplicate/overlapping memory clusters with confidence scores and the signals behind each (Fellegi-Sunter match/possible/non-match). Read-only — nothing is changed.

Inputs: tags, limit.

merge_policyA

Get or set the per-project merge policy: the two Fellegi-Sunter thresholds (match_threshold, possible_threshold) and auto_apply. No args returns the current policy.

Inputs: auto_apply, match_threshold, possible_threshold.

merge_undoA

Reverse a prior merge/supersede operation (the 'git reflog for your agent's memory'). With no operation_id, lists the reversible operation log so you can pick one.

Inputs: operation_id.

plan_mergeA

Produce a previewable MERGE plan (a diff: combined content/tags/provenance) for 2+ memories WITHOUT applying it. Returns a plan_id for apply_plan. Protected members block the merge.

Inputs: member_ids (required), survivor_id.

plan_supersedeA

Preview superseding memory A with B — bitemporal invalidation (stamps valid_until, keeps A queryable for audit) WITHOUT applying. Returns a plan_id for apply_plan.

Inputs: new_id (required), old_id (required).

predictB

Proactive memory prediction — predicts what memories you'll need next based on context, recent activity, and learned patterns. Returns predictions, suggestions, and speculative retrievals.

Inputs: context.

protectA

Pin a memory so it can never be auto-merged, superseded, or garbage-collected. Pass protected=false to unpin.

Inputs: id (required), protected.

restoreA

Restore memories from a JSON backup file. Supports MCP wrapper format, RecallResult format, and direct memory array format.

Inputs: path (required), merge, allowAnyPath.

session_contextA

One-call session initialization. Combines search, intentions, status, predictions, and codebase context into a single token-budgeted response. Replaces 5 separate calls at session start.

Inputs: context, queries, token_budget, include_status, +2 more.

smart_ingestA

INTELLIGENT memory ingestion with Prediction Error Gating. Single mode: provide 'content' to auto-decide CREATE/UPDATE/SUPERSEDE. Batch mode: provide 'items' array (max 20) for session-end saves — each item runs the full cognitive pipeline (importance scoring, intent detection, synaptic tagging).

Inputs: tags, items, source, content, +3 more.

source_syncA

Index an external system into Vestige as a durable, offline, semantically-searchable index that cites back to the canonical record. GitHub: source='github', repo='owner/name' (auth via GITHUB_TOKEN env). Redmine: source='redmine', project='' (host via REDMINE_URL, auth via REDMINE_API_KEY env). Idempotent: re-running updates changed issues without duplicating; set reconcile=true to tombstone issues removed upstream.

Inputs: repo, source, project, max_pages, +1 more.

suppressA

Actively suppress a memory via top-down inhibitory control (Anderson 2025 SIF + Davis Rac1). Distinct from delete: the memory persists but is inhibited from retrieval and actively decays. Each call compounds. A background Rac1 worker cascades decay to co-activated neighbors. Reversible within 24 hours via reverse=true.

Inputs: id (required), reason, reverse.

system_statusA

Combined system health and statistics. Returns status (healthy/degraded/critical/empty), full stats, FSRS preview, cognitive module health, state distribution, warnings, and recommendations.

Inputs: schema_introspection.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    B3.2/5.0

    Scored across 34 tools

    Disambiguation4/5

    Most tools have distinct purposes: search, memory, codebase, intention, and various merge/explore steps are clearly separated. However, cross_reference is an explicit alias for deep_reference, creating redundancy, and the cluster of merge-related tools (find_duplicates, merge_candidates, plan_merge, apply_plan, merge_undo) could be confused despite having distinct stages.

    Naming Consistency3/5

    Naming is mixed: many tools follow a verb_noun pattern (smart_ingest, find_duplicates, plan_merge, apply_plan, explore_connections, suppress), but others are noun_verb (memory_timeline, system_status, importance_score, merge_candidates, memory_health). A few are single-word nouns (search, memory, backup, export, gc, dream). This inconsistency in convention makes the set less predictable.

    Tool Count2/5

    With 34 tools, this server far exceeds the 25-tool heavy threshold. While the domain is broad (memory management, codebase, intentions, ingestion, merging, health), many tools could be consolidated — e.g., five separate merge-related tools (find_duplicates, merge_candidates, plan_merge, apply_plan, merge_undo) and multiple health/status tools. The count feels bloated for agents to navigate efficiently.

    Completeness4/5

    The tool set covers the full memory lifecycle: creation (smart_ingest, memory set), retrieval (search, get, memory_timeline), update (edit, promote/demote), deletion (purge, gc, suppress), plus backup/export/restore and exploratory analysis. Minor gaps exist, such as a dedicated bulk delete (though gc covers it) and no explicit 'list all memories' without time constraints, but these are workable.

    Maintenance

    ActivityActive
    ResponsivenessUsually handled

    Related MCP Connectors

    Related MCP Servers

    • F
      license
      Not graded
      quality
      D
      maintenance
      A Rust-based MCP server that provides long-term memory capabilities for AI agents using keyword-based storage and retrieval. It supports isolated namespaces for different users or projects, allowing LLMs to remember and recall information across sessions.
      -
    • A
      license
      A
      quality
      C
      maintenance
      MCP server that exposes agent-memory-daemon to any MCP-compatible client — Kiro (CLI & IDE), Claude Desktop, Cursor, and others. The daemon does the thinking (consolidation + extraction); this server is a thin filesystem bridge so agents can read, append, and search memory through the Model Context Protocol.
      4
      65 npm
      6
      MIT
    • A
      license
      A
      quality
      C
      maintenance
      Self-hosted MCP-native agent memory server. Gives AI agents persistent, decay-weighted memory via 83 MCP tools — no cloud, full control. RocksDB+HNSW backend. Works with Claude Code, Cursor, and any MCP-compatible agent.
      14
      9
      MIT
    • A
      license
      A
      quality
      D
      maintenance
      A different approach from typical persistent-memory MCPs. Instead of a local SQLite + embeddings store, the memory lives as plain files in a .ai-memory/ directory you commit to your repo (facts.jsonl, decisions/\*.md, gotchas.md). Git is the sync layer — what one Claude/Cursor/Cline learns about a repo, the next session (or a teammate's agent) picks up automatically. 5 MCP tools: get_rep
      5
      1
      MIT