# memrust - Doramagic AI Context Pack

> Positioning: a pre-install experience and judgment asset. It helps the host AI get off to a good start, but it does not mean the project has already been installed, run, or validated.

## Sufficiency Principle

- **Sufficiency over compression**: The AI Context Pack should be sufficient for the host AI to understand the project's value, capability boundaries, entrypoints, risks, and evidence sources before starting work; it may be layered, but it does not aim for the shortest possible summary.
- **Compression policy**: Compress only noise and duplication, never context that affects judgment or the quality of the work.

## How the Host AI Should Use This

You are reading the AI Context Pack that Doramagic compiled for memrust. Treat it as pre-work context: help the user understand who it fits, what it can do, how to start, what must be verified after install, and where the risks are. Do not claim that you have already installed, run, or executed the target project.

## Claim Consumption Rules

- **Fact source**: Repo Evidence + Claim/Evidence Graph; the Human Wiki only supplies salience, terminology, and narrative structure.
- **Minimum status for a fact**: `supported`
- `supported`: May be used as a project fact, but the answer must cite the claim_id and evidence path.
- `weak`: Usable only as a low-confidence lead; the user must be asked to keep verifying.
- `inferred`: Usable only for risk notes or open questions; must not be packaged as a project fact.
- `unverified`: Must not be used as fact; state clearly that evidence is insufficient.
- `contradicted`: Must show the conflicting sources and must not force a single version on the user's behalf.

## Who It Fits Best

- **AI researchers or builders of research-oriented Agents**: The README clearly centers on research, experiment, or paper workflows. Evidence: `README.md` Claim: `clm_0002` supported 0.86
- **Developers already using host AIs such as Claude/Codex/Cursor/Gemini**: The README or plugin config mentions multiple host AIs. Evidence: `README.md` Claim: `clm_0003` supported 0.86

## What It Can Do

- **Command-Line Startup or Install Flow** (Verify after install): The project documentation contains runnable commands; real use requires running them in a local or host environment. Evidence: `README.md` Claim: `clm_0001` supported 0.86

## How to Start

- `pip install memrust          # Python` Evidence: `README.md` Claim: `clm_0004` supported 0.86
- `npm install memrust-client   # TypeScript` Evidence: `README.md` Claim: `clm_0005` supported 0.86
- `curl localhost:7700/v1/recall \` Evidence: `README.md` Claim: `clm_0006` supported 0.86
- `claude mcp add memory -- memrust mcp --data-dir ~/.memrust --agent-id planner` Evidence: `README.md` Claim: `clm_0007` supported 0.86
- `claude mcp add memory -- ./target/release/memrust mcp --data-dir ~/.memrust` Evidence: `README.md` Claim: `clm_0008` supported 0.86
- `curl -X POST localhost:7700/v1/remember -H 'content-type: application/json' \` Evidence: `README.md` Claim: `clm_0009` supported 0.86
- `curl -X POST localhost:7700/v1/recall -H 'content-type: application/json' \` Evidence: `README.md` Claim: `clm_0010` supported 0.86
- `curl -X POST localhost:7700/v1/ingest -H 'content-type: application/json' \` Evidence: `README.md` Claim: `clm_0011` supported 0.86
- `curl -X POST localhost:7700/v1/remember_batch -H 'content-type: application/json' \` Evidence: `README.md` Claim: `clm_0012` supported 0.86

## Continue-or-Stop Decision Card

- **Current recommendation**: Needs admin / security approval
- **Why**: Continuing may involve secrets, accounts, external services, or sensitive context; get admin or security approval first.

### 30-Second Read

- **What to do now**: Needs admin / security approval
- **Minimum safe next step**: Run Prompt Preview first; if credentials or an enterprise environment are involved, get approval before trialing
- **Do not trust yet**: Real output quality cannot be trusted before install.
- **Continuing will touch**: Command execution, Local environment or project files, Environment variables / API keys

### What You Can Trust Now

- **Target-audience signal: AI researchers or builders of research-oriented Agents** (supported): Backed by a supported claim or project evidence, but that still is not the same as real install results. Evidence: `README.md` Claim: `clm_0002` supported 0.86
- **Target-audience signal: Developers already using host AIs such as Claude/Codex/Cursor/Gemini** (supported): Backed by a supported claim or project evidence, but that still is not the same as real install results. Evidence: `README.md` Claim: `clm_0003` supported 0.86
- **Capability exists: Command-Line Startup or Install Flow** (supported): You can trust that the project contains signals of this capability; whether it fits your specific task still needs trial or after-install verification. Evidence: `README.md` Claim: `clm_0001` supported 0.86
- **There are Quick Start / install-command signals** (supported): You can trust that the docs mention a startup or install entrypoint; do not run it directly in your primary environment because of that. Evidence: `README.md` Claim: `clm_0004` supported 0.86

### What You Cannot Trust Yet

- **Real output quality cannot be trusted before install.** (unverified): Prompt Preview can only show how it guides you; it cannot prove result quality in the real project.
- **Host AI version compatibility cannot be trusted before install.** (unverified): Host loading rules and version differences across Claude, Cursor, Codex, Gemini, and others must be verified in a real environment.
- **That it will not pollute your existing host AI's behavior cannot be trusted directly.** (inferred): Skill, plugin, and AGENTS/CLAUDE/GEMINI instructions may change the host AI's default behavior.
- **Safe rollback cannot be assumed by default.** (unverified): Unless the project clearly provides uninstall and recovery instructions, verify in an isolated environment first.
- **After a real install, is it compatible with the user's current host AI version?** (unverified): Compatibility can only be verified in the actual host environment.
- **Does the project's output quality meet the user's specific task?** (unverified): The pre-install preview can only show flow and boundaries; it cannot replace real evaluation.
- **Do the install commands require network access, permissions, or global writes?** (unverified): This affects install risk in both enterprise and personal environments. Evidence: `README.md`

### What Continuing Will Touch

- **Command execution**: Package managers, network downloads, the local plugin directory, project config, or the user's home directory. Why: Running the very first command can already change your environment; decide whether it is worth running first. Evidence: `README.md`
- **Local environment or project files**: Install results, plugin caches, project config, or local dependency directories. Why: The write scope and rollback path cannot be proven before install and need isolated verification. Evidence: `README.md`
- **Environment variables / API keys**: Project entry docs explicitly showing API key, token, secret, or account credential configuration. Why: If a real install needs credentials, use test credentials first and go through a permission/compliance review. Evidence: `README.md`
- **Host AI context**: The AI Context Pack, Prompt Preview, Skill routing, risk rules, and project facts. Why: Importing context affects the host AI's later judgment, so avoid packaging unverified items as facts.

### Minimum Safe Next Steps

- **Run Prompt Preview first**: Use a pre-install interactive trial to judge whether the way of working fits; it needs no authorization or environment change. (applies when: Applies to any project, especially when output quality is unknown.)
- **Trial-install only in an isolated directory or a test account**: Avoid letting install commands pollute your primary host AI, real projects, or home directory. (applies when: When there are signals of command execution, plugin config, or local writes.)
- **Do not use real production credentials**: Once an environment variable / API key enters the host or toolchain, it can create account and compliance risk. (applies when: When environment signals like API, TOKEN, KEY, or SECRET appear.)
- **After install, verify just one minimal task**: Verify loading, compatibility, output quality, and rollback first, then decide whether to use it deeply. (applies when: When moving from a trial into a real workflow.)

### Exit Plan

- **Preserve the pre-install state**: Record the original host config and project state so you can later judge whether it is recoverable.
- **Record the install commands and written paths**: Without clear uninstall instructions, you at least need to know which directories or configs to clean up manually.
- **Be ready to revoke test API keys or tokens**: If test credentials leak or are misused, you can cut losses quickly.
- **If there is no rollback path, do not enter your primary environment**: No rollback is a blocker before continuing; do not proceed on trust or luck.

## What Can Only Be Previewed

- Explain who the project fits and what it can do
- Demonstrate a typical conversation flow based on project docs
- Help the user decide whether it is worth installing or researching further

## What Must Be Verified After Install

- Actually installing the Skill, plugin, or CLI
- Running scripts, modifying local files, or accessing external services
- Verifying real output quality, performance, and compatibility

## Boundary & Risk Decision Card

- **Mistaking the pre-install preview for a real run**: The user may overestimate how much configuration, permission, and compatibility verification the project has already done. Mitigation: Clearly separate prompt_preview_can_do from runtime_required. Claim: `clm_0013` inferred 0.45
- **Command execution will modify the local environment**: Install commands may write to the user's home directory, the host plugin directory, or project configuration. Mitigation: Run in an isolated environment or a test account first. Evidence: `README.md` Claim: `clm_0014` supported 0.86
- **To confirm**: After a real install, is it compatible with the user's current host AI version?. Why: Compatibility can only be verified in the actual host environment.
- **To confirm**: Does the project's output quality meet the user's specific task?. Why: The pre-install preview can only show flow and boundaries; it cannot replace real evaluation.
- **To confirm**: Do the install commands require network access, permissions, or global writes?. Why: This affects install risk in both enterprise and personal environments.

## Pre-Work Working Context

### Loading Order

- First read how_to_use.host_ai_instruction to establish the boundaries of this pre-install judgment asset.
- Read claim_graph_summary to confirm facts come from the Claim/Evidence Graph, not the Human Wiki narrative.
- Then read intended_users, capabilities, and quick_start_candidates to judge whether the user is a match.
- When you need to carry out a concrete task, check role_skill_index first, then evidence_index.
- For real install, file modification, network access, performance, or compatibility questions, turn to risk_card and boundaries.runtime_required.

### Task Routes

- **Command-Line Startup or Install Flow**: State that this is an after-install capability first, then give a pre-install checklist. Boundary: Must be verified after a real install or run. Evidence: `README.md` Claim: `clm_0001` supported 0.86

### Context Scale

- Total files: 51
- Important-file coverage: 40/51
- Evidence index entries: 51
- Role / Skill entries: 5

### Handling Insufficient Evidence

- **missing_evidence**: State that evidence is insufficient and ask the user for the target file, a README section, or after-install verification records; do not fill in facts.
- **out_of_scope_request**: State that the task is beyond the current AI Context Pack's evidence scope and suggest the user check the Human Manual or verify after a real install.
- **runtime_request**: Provide a pre-install checklist and command sources, but do not run commands for the user or claim they have been run.
- **source_conflict**: Show the conflicting sources side by side, mark them as unverified, and do not force a single version.

## Prompt Recipes

### Fit assessment

- Goal: Judge whether this project fits the user's current task.
- Expected output: A fit conclusion, key reasons, evidence citations, what can be previewed before install, what must be verified after install, and a next-step recommendation.

```text
Based on the AI Context Pack for memrust, ask me 3 necessary questions first, then judge whether it fits my task. The answer must cover: who it fits, what it can do, what it cannot do, whether it is worth installing, and where the evidence comes from. Every project fact must cite evidence_refs, source_paths, or a claim_id.
```

### Pre-install experience

- Goal: Let the user feel the core workflow before installing, while avoiding packaging the preview as real capability or a marketing promise.
- Expected output: An experience script with boundary labels, an after-install verification checklist, and a cautious recommendation; with no real-run promises or strong marketing language.

```text
Treat memrust as a pre-install experience asset, not an already-installed tool or a real runtime environment.

Output exactly four parts:
1. Ask me 3 necessary questions first.
2. Give an "experience script": use the three labels [Previewable before install], [Must verify after install], and [Insufficient evidence] to show how it might guide the workflow.
3. Give an after-install verification checklist: list which capabilities can only be confirmed after a real install, real host loading, and a real project run.
4. Give a cautious recommendation: only "worth researching/trialing further", "add information before deciding", or "not recommended to continue"; do not endorse the project.

Hard boundaries:
- Do not claim you have installed, run, executed tests, modified files, or produced real results.
- Do not write promise-like phrasing such as "auto-adapts", "guarantees passing", "perfect fit", or "strongly recommend installing".
- If you describe how it works after install, you must use a conditional such as "if installed successfully and the host loads the Skill correctly, it might...".
- The experience script may only be written as "example lines / hypothetical flow": use "might ask / might suggest / might show", not "has written, has generated, has passed, is running, is generating".
- Prompt Preview does not hand out install commands; if the user is ready to trial, only prompt them to read Quick Start and the Risk Card first and to verify in an isolated environment.
- Every project fact must come from a supported claim, evidence_refs, or source_paths; inferred/unverified items can only be risks or open questions.

```

### Role / Skill selection

- Goal: Pick the best-matching asset from the project's roles or Skills.
- Expected output: A list of candidate roles or Skills, each with an applicable scenario, evidence paths, risk boundary, and whether after-install verification is needed.

```text
Read role_skill_index and recommend 3-5 of the most relevant roles or Skills for my target task. For each recommendation, state the applicable scenario, likely output, risk boundary, and evidence_refs.
```

### Risk pre-check

- Goal: Identify environment, permission, rule-conflict, and quality risks before installing or adopting.
- Expected output: A checklist of environment, permission, dependency, license, host-conflict, quality risk, and unknown items.

```text
Based on risk_card, boundaries, and quick_start_candidates, give me a pre-install risk pre-check list. Do not run commands for me; only explain what I should check, why, and what impact a failure would have.
```

### Host AI kickoff instruction

- Goal: Turn the project context into a host AI instruction for the start of a conversation.
- Expected output: A pre-work instruction with clear boundaries and clear evidence citations, suitable to copy to a host AI.

```text
Based on the AI Context Pack for memrust, generate a pre-work instruction I can paste to my host AI. This instruction must obey not_runtime=true and must not claim the project has been installed, run, or produced real results.
```

## Role / Skill Index

- Indexed 5 role / Skill / project-doc entries.

- **memrust** (project_doc): Memory infrastructure for AI agents — an agent-native memory engine, written in Rust. Activation hint: Reference this when the user needs to understand the project's structure, install path, or boundaries. Evidence: `README.md`
- **Benchmarks** (project_doc): Two scripts, both reproducible. Numbers in the project README came from these on an M-series MacBook — re-run them on your hardware before trusting any of it. Activation hint: Reference this when the user needs to understand the project's structure, install path, or boundaries. Evidence: `benches/README.md`
- **memrust notebooks** (project_doc): Three runnable notebooks. Everything installs with pip; the engine downloads as a single static binary no Rust toolchain needed . Activation hint: Reference this when the user needs to understand the project's structure, install path, or boundaries. Evidence: `notebooks/README.md`
- **memrust on HaluMem** (project_doc): HaluMem https://github.com/MemTensor/HaluMem is an operation-level hallucination benchmark for agent memory systems. Instead of scoring a memory system end-to-end, it scores three stages separately — memory extraction , memory updating , and memory question answering — so a failure can be located rather than merely observed. Activation hint: Reference this when the user needs to understand the project's structure, install path, or boundaries. Evidence: `benches/halumem/README.md`
- **Changelog** (project_doc): - Optional extraction layer , behind --extractor openai and POST /v1/ingest . Hand it an exchange and a model distils durable facts out of it, so callers no longer have to decide what is worth remembering themselves. Off by default, and remember is untouched: with no extractor configured the write path has no model in it and nothing about the engine's behaviour changes. Activation hint: Reference this when the user needs to understand the project's structure, install path, or boundaries. Evidence: `CHANGELOG.md`

## Evidence Index

- Indexed 51 evidence entries.

- **memrust** (documentation): Memory infrastructure for AI agents — an agent-native memory engine, written in Rust. Evidence: `README.md`
- **Benchmarks** (documentation): Two scripts, both reproducible. Numbers in the project README came from these on an M-series MacBook — re-run them on your hardware before trusting any of it. Evidence: `benches/README.md`
- **memrust notebooks** (documentation): Three runnable notebooks. Everything installs with pip; the engine downloads as a single static binary no Rust toolchain needed . Evidence: `notebooks/README.md`
- **memrust on HaluMem** (documentation): HaluMem https://github.com/MemTensor/HaluMem is an operation-level hallucination benchmark for agent memory systems. Instead of scoring a memory system end-to-end, it scores three stages separately — memory extraction , memory updating , and memory question answering — so a failure can be located rather than merely observed. Evidence: `benches/halumem/README.md`
- **Package** (package_manifest): { "name": "memrust-client", "version": "0.6.1", "description": "Zero-dependency TypeScript client for the memrust agent memory engine", "license": "Apache-2.0", "type": "module", "main": "./dist/index.js", "types": "./dist/index.d.ts", "exports": { ".": { "types": "./dist/index.d.ts", "default": "./dist/index.js" } }, "files": "dist", "src" , "scripts": { "build": "tsc -p .", "prepublishOnly": "npm run build" }, "devDependencies": { "typescript": "^5.6.0" }, "engines": { "node": " =18" } } Evidence: `sdks/typescript/package.json`
- **License** (source_file): Apache License Version 2.0, January 2004 http://www.apache.org/licenses/ Evidence: `LICENSE`
- **Changelog** (documentation): - Optional extraction layer , behind --extractor openai and POST /v1/ingest . Hand it an exchange and a model distils durable facts out of it, so callers no longer have to decide what is worth remembering themselves. Off by default, and remember is untouched: with no extractor configured the write path has no model in it and nothing about the engine's behaviour changes. Evidence: `CHANGELOG.md`
- **Pilot Qa Score** (structured_config): { "overall score": { "frame": "memrust", "qa num": 164, "qa valid num": 164, "correct qa ratio": { "all": 0.7621951219512195, "valid": 0.7621951219512195 }, "hallucination qa ratio": { "all": 0.13414634146341464, "valid": 0.13414634146341464 }, "omission qa ratio": { "all": 0.10365853658536585, "valid": 0.10365853658536585 }, "by question type": { "Basic Fact Recall": { "n": 40, "correct": 0.8, "hallucination": 0.1, "omission": 0.1 }, "Dynamic Update": { "n": 6, "correct": 0.3333, "hallucination": 0.3333, "omission": 0.3333 }, "Generalization & Application": { "n": 31, "correct": 0.6129, "hallucination": 0.2258, "omission": 0.1613 }, "Memory Boundary": { "n": 39, "correct": 0.8462, "halluci… Evidence: `benches/halumem/pilot_qa_score.json`
- **Tsconfig** (structured_config): { "compilerOptions": { "target": "ES2022", "module": "NodeNext", "moduleResolution": "NodeNext", "lib": "ES2022", "DOM" , "strict": true, "declaration": true, "outDir": "dist", "skipLibCheck": true }, "include": "src" } Evidence: `sdks/typescript/tsconfig.json`
- **.dockerignore** (source_file): target /target memrust-data .git .env .env. sdks assets Evidence: `.dockerignore`
- **Commercial control plane — licensing undecided, see control-plane/LICENSE** (source_file): /target /memrust-data .env .env. .wal checkpoint.json sdks/typescript/dist sdks/typescript/node modules sdks/python/dist pycache / /target-linux /memrust-bin /memory- .DS Store .egg-info/ .pdf bench-results.json bench-agent-recall.json bench-agent-embeddings.npz memrust-investor-deck.pptx DECK NOTES.md build deck.py .deck-dash.png startup ecosystem database.xlsx startup ecosystem csv/ STARTUP ECOSYSTEM SUMMARY.md build db.py Evidence: `.gitignore`
- **Cargo** (source_file): package name = "memrust" version = "0.6.1" edition = "2021" description = "Agent-native memory engine: hybrid retrieval HNSW + BM25 + entity graph + recency behind remember/recall/forget, with HTTP and MCP interfaces" license = "Apache-2.0" repository = "https://github.com/AIAnytime/memrust" readme = "README.md" keywords = "ai", "agents", "memory", "vector-search", "mcp" categories = "database-implementations", "data-structures" exclude = "assets/", "control-plane/", "notebooks/", ".github/", "sdks/", "Dockerfile", ".dockerignore", Evidence: `Cargo.toml`
- **Build stage** (source_file): Build stage Pinned to bookworm to match the runtime stage: the default rust:slim tag has moved to trixie, whose glibc is newer than bookworm's, and the binary then fails to start with GLIBC 2.39 not found . FROM rust:1.96-slim-bookworm AS build WORKDIR /app Build dependencies against a stub first so they stay cached when only the sources change — a rebuild after editing src/ skips recompiling the tree. COPY Cargo.toml Cargo.lock ./ RUN mkdir -p src && echo "fn main {}" src/main.rs \ && echo "" src/lib.rs \ && cargo build --release \ && rm -rf src COPY src ./src Touch so cargo notices the real sources are newer than the stub artifacts. RUN touch src/main.rs src/lib.rs && cargo build --release Evidence: `Dockerfile`
- **Agent Recall** (source_file): TOP K = 5 ⋮---- CACHE = "bench-agent-embeddings.npz" SERVICES = "Orion", "Meridian", "Atlas", "Vertex", "Halcyon", "Cobalt" TEAMS = "billing", "search", "mobile", "platform", "growth" ⋮---- def corpus seed: int = 7 ⋮---- rng = random.Random seed ⋮---- ticket = f"INC-{90000 + i 7}" text = f"Incident {ticket}: the {svc} service returned stale results " ⋮---- paraphrases = ⋮---- def hit rate results: dict str, list int , probes, kind: str - float ⋮---- subset = p for p in probes if p "kind" == kind hits = sum 1 for p in subset if p "answer" in results p "query" :TOP K ⋮---- def run vector engine name, build, search, memories, probes, vecs, qvecs ⋮---- out = {p "query" : search qvecs i for i, p… Evidence: `benches/agent_recall.py`
- **Concurrency** (source_file): def conn ⋮---- def post c, path, payload ⋮---- def ingest vecs ⋮---- c = conn ⋮---- def reader qs, stop, out ⋮---- i = 0 ⋮---- t = time.perf counter ⋮---- def writer vecs, stop, out ⋮---- def run threads: int, with writer: bool, qs, vecs ⋮---- workers = threading.Thread target=reader, args= qs, stop, lats for in range threads ⋮---- t0 = time.perf counter ⋮---- elapsed = time.perf counter - t0 ⋮---- flat = x for l in lats for x in l ⋮---- def main ⋮---- rng = np.random.default rng 0 vecs = rng.normal size= N, DIM .astype np.float32 ⋮---- qs = vecs :200 ⋮---- base = None ⋮---- r = run threads, False, qs, vecs base = base or r "qps" ⋮---- r = run 4, True, qs, vecs Evidence: `benches/concurrency.py`
- **Favicon** (source_file):  Evidence: `docs/favicon.svg`
- **Index** (source_file): memrust — memory infrastructure for AI agents { "@context": "https://schema.org", "@graph": { "@type": "WebSite", "url": "https://aianytime.github.io/memrust/", "name": "memrust", "description": "Memory infrastructure for AI agents. One endpoint Claude Code, Cursor, Codex, LangGraph and CrewAI all share — hybrid retrieval over vectors, keywords, an entity graph and recency, with every result explaining why it surfaced.", "inLanguage": "en", "publisher": { "@type": "Organization", "name": "memrust" } }, { "@type": "SoftwareApplication", "name": "memrust", "applicationCategory": "DeveloperApplication", "applicationSubCategory": "Database", "operatingSystem": "Linux, macOS, Windows", "url": "h… Evidence: `docs/index.html`
- **memrust** (source_file): Memory infrastructure for AI agents. An agent-native memory engine written in Rust that answers "what do I know about this?" rather than "which vectors are nearest?" — exposed through remember / recall / forget, retrievable over four fused signals, and reachable by any MCP client so every agent shares one memory. Apache-2.0, single binary, no external search dependencies. Evidence: `docs/llms.txt`
- **memrust — https://aianytime.github.io/memrust/** (source_file): memrust — https://aianytime.github.io/memrust/ Everything here is public documentation and marketing. Nothing is gated, nothing is user data, so everything is crawlable. Evidence: `docs/robots.txt`
- **Sitemap** (source_file): https://aianytime.github.io/memrust/ 2026-07-29 weekly 1.0 https://aianytime.github.io/memrust/docs/ 2026-07-29 weekly 0.9 https://aianytime.github.io/memrust/llms.txt 2026-07-29 monthly 0.5 Evidence: `docs/sitemap.xml`
- **01 Quickstart** (source_file): { "cells": { "cell type": "markdown", "id": "cell-1", "metadata": {}, "source": " memrust \u2014 quickstart\n", "\n", " Memory infrastructure for AI agents. memrust is an agent-native memory\n", "engine written in Rust: hybrid retrieval vector + BM25 + entity graph +\n", "recency behind a remember / recall / forget API, where every result\n", "explains why it surfaced with a per-signal score breakdown.\n", "\n", "This notebook gets you from zero to recall in about two minutes:\n", "\n", "1. install the Python SDK and start the engine\n", "2. remember a few memories\n", "3. recall them \u2014 and read the signal breakdown\n", "4. see the strategies lexical for exact IDs, relational for the e… Evidence: `notebooks/01_quickstart.ipynb`
- **02 Rag With Embeddings** (source_file): { "cells": { "cell type": "markdown", "id": "cell-16", "metadata": {}, "source": " memrust \u2014 RAG with real embeddings\n", "\n", "This notebook builds a complete retrieval pipeline on memrust:\n", "\n", "1. embed documents with BGE-large-en-v1.5 1024-dim, a production-grade\n", " retrieval model via sentence-transformers\n", "2. store text + vectors in memrust remember batch \u2014 bulk ingest \n", "3. hybrid retrieval: semantic vectors + BM25 + entity graph, fused, explained\n", "4. RAG : ground an LLM answer in recalled memories OpenAI key optional \n", "5. memory lifecycle: TTL expiry, consolidation, snapshot/restore\n", "\n", "memrust supports embeddings three ways: a built-in OpenA… Evidence: `notebooks/02_rag_with_embeddings.ipynb`
- **03 Pdf Rag Agents** (source_file): { "cells": { "cell type": "markdown", "id": "cell-35", "metadata": {}, "source": " memrust \u2014 PDF RAG with a LangGraph agent\n", "\n", "The full pipeline, end to end:\n", "\n", "1. load a real PDF with pypdf \"Attention Is All You Need\" and chunk it\n", "2. embed with BGE-large-en-v1.5 1024-dim \u2014 or swap in OpenAI embeddings\n", "3. store chunks + vectors in memrust\n", "4. build a LangGraph retrieve\u2192generate RAG agent over memrust\n", "5. the agent writes back : reflections and episodic traces of what it did\n", "6. the whole memory feature set: multi-agent private/shared visibility,\n", " working-memory TTLs, consolidation, entity graph, snapshots, checkpoints" }, { "cell t… Evidence: `notebooks/03_pdf_rag_agents.ipynb`
- **Embed** (source_file): use std::collections::hash map::DefaultHasher; ⋮---- use std::time::Duration; ⋮---- use crate::index::text::tokenize; use crate::index::vector::normalize; ⋮---- pub trait Embedder: Send + Sync { ⋮---- fn embed batch &self, texts: & &str - Result { texts.iter .map t self.embed t .collect ⋮---- fn embed query &self, text: &str - Result { self.embed text ⋮---- pub struct HashEmbedder { ⋮---- impl HashEmbedder { pub fn new dim: usize - Self { ⋮---- fn bump &self, v: &mut f32 , feature: &str, weight: f32 { ⋮---- feature.hash &mut h ; let hash = h.finish ; ⋮---- impl Embedder for HashEmbedder { fn dim &self - usize { ⋮---- fn embed &self, text: &str - Result { let mut v = vec! 0.0f32; self.dim ;… Evidence: `src/embed.rs`
- **Engine** (source_file): use std::path::Path; ⋮---- use serde json::json; use uuid::Uuid; ⋮---- use crate::index::text::Bm25Index; ⋮---- use crate::rerank::Reranker; ⋮---- fn is expired record: &MemoryRecord, now: i64 - bool { record.expires at.is some and t t f32 { ⋮---- pub struct IngestPlan { ⋮---- fn check request req: &RememberRequest - Result { if req.text.trim .is empty { bail! "memory text must not be empty" ; ⋮---- bail! "created at must be a positive Unix timestamp in milliseconds, got {ts}" ; ⋮---- bail! ⋮---- Ok ⋮---- fn visible to record: &MemoryRecord, as agent: Option - bool { ⋮---- record.agent id.is none record.agent id.as deref == Some agent ⋮---- struct CheckpointRef { ⋮---- struct CheckpointOwne… Evidence: `src/engine.rs`
- **Extract** (source_file): use std::time::Duration; ⋮---- use crate::types::MemoryKind; ⋮---- pub struct Turn { ⋮---- pub struct Candidate { ⋮---- pub trait Extractor: Send + Sync { ⋮---- fn superseded by &self, fact: &str, existing: & String - Result { Ok Vec::new ⋮---- pub struct LlmExtractor { ⋮---- impl LlmExtractor { pub fn openai compatible base url: &str, model: &str, api key: &str - Self { ⋮---- url: format! "{}/chat/completions", base url.trim end matches '/' , model: model.to string , api key: api key.to string , ⋮---- .timeout Duration::from secs 120 .build , ⋮---- fn chat &self, system: &str, user: String - Result { let mut req = self.agent.post &self.url ; if !self.api key.is empty { req = req.set "autho… Evidence: `src/extract.rs`
- **Lib** (source_file): pub mod embed; pub mod engine; pub mod extract; pub mod index; pub mod rerank; pub mod server; pub mod store; pub mod summarize; pub mod types; ⋮---- pub use engine::MemoryEngine; Evidence: `src/lib.rs`
- **Main** (source_file): use std::path::PathBuf; use std::sync::Arc; ⋮---- use memrust::engine::MemoryEngine; use memrust::extract::LlmExtractor; ⋮---- use memrust::rerank::LlmReranker; ⋮---- fn build summarizer args: & String - Result { match flag args, "--summarizer", "extract" .as str { "extract" = Ok Box::new ExtractiveSummarizer::default , ⋮---- let url = flag args, "--summarizer-url", "https://api.openai.com/v1" ; let model = flag args, "--summarizer-model", "gpt-4o-mini" ; ⋮---- .or else std::env::var "OPENAI API KEY" .unwrap or default ; Ok Box::new RemoteSummarizer::openai compatible ⋮---- other = bail! "unknown summarizer '{other}' expected extract or openai " , ⋮---- fn numeric flag args: & String , name… Evidence: `src/main.rs`
- **Rerank** (source_file): use std::time::Duration; ⋮---- pub trait Reranker: Send + Sync { ⋮---- pub struct LlmReranker { ⋮---- impl LlmReranker { pub fn openai compatible base url: &str, model: &str, api key: &str - Self { ⋮---- url: format! "{}/chat/completions", base url.trim end matches '/' , model: model.to string , api key: api key.to string , ⋮---- .timeout Duration::from secs 60 .build , ⋮---- impl Reranker for LlmReranker { fn rerank &self, query: &str, docs: & &str - Result { if docs.is empty { return Ok Vec::new ; ⋮---- .iter .enumerate .map i, d format! "{}. {d}", i + 1 ⋮---- .join "\n" ; let mut req = self.agent.post &self.url ; if !self.api key.is empty { req = req.set "authorization", &format! "Bearer… Evidence: `src/rerank.rs`
- **Store** (source_file): use serde::de::DeserializeOwned; ⋮---- use uuid::Uuid; ⋮---- use crate::types::MemoryRecord; ⋮---- pub enum WalOp { ⋮---- pub struct Wal { ⋮---- impl Wal { pub fn open dir: &Path - Result { ⋮---- .with context format! "creating data dir {}", dir.display ?; let path = dir.join "memory.wal" ; ⋮---- if path.exists { ⋮---- for i, line in reader.lines .enumerate { ⋮---- if line.trim .is empty { ⋮---- Ok op = ops.push op , ⋮---- eprintln! "memrust: skipping unreadable WAL line {}: {e}", i + 1 ; ⋮---- let file = OpenOptions::new .create true .append true .open &path ?; Ok ⋮---- pub fn append batch &mut self, ops: & WalOp - Result { if ops.is empty { return Ok ; ⋮---- buf.push str &serde json::to s… Evidence: `src/store.rs`
- **Summarize** (source_file): use std::time::Duration; ⋮---- use crate::index::text::tokenize; ⋮---- pub trait Summarizer: Send + Sync { ⋮---- pub struct ExtractiveSummarizer { ⋮---- impl Default for ExtractiveSummarizer { fn default - Self { ⋮---- impl Summarizer for ExtractiveSummarizer { fn summarize &self, memories: & &str - Result { if memories.is empty { bail! "nothing to summarize" ; ⋮---- .iter .map m { let tokens = tokenize m ; let set = tokens.iter .cloned .collect ; ⋮---- .collect ; ⋮---- df.entry t.as str .or insert 0 += 1; ⋮---- .enumerate .map i, tokens, set { let mass: f32 = set.iter .map t df t.as str as f32 .sum ; mass / tokens.len as f32 + 3.0 , i ⋮---- scored.sort by a, b b.0.total cmp &a.0 ; ⋮---- le… Evidence: `src/summarize.rs`
- **Types** (source_file): use uuid::Uuid; ⋮---- pub enum MemoryKind { ⋮---- pub enum Visibility { ⋮---- pub struct MemoryRecord { ⋮---- pub struct RememberRequest { ⋮---- pub enum RecallStrategy { ⋮---- impl RecallStrategy { ⋮---- pub fn weights self - f32, f32, f32, f32 { ⋮---- pub struct MemoryFilter { ⋮---- impl MemoryFilter { ⋮---- pub fn is empty &self - bool { self.kinds.is empty && self.tags.is empty && self.session id.is none && self.agent id.is none && self.since.is none && self.until.is none ⋮---- pub fn matches &self, rec: &MemoryRecord - bool { if !self.kinds.is empty && !self.kinds.contains &rec.kind { ⋮---- if rec.session id.as deref != Some s.as str { ⋮---- if rec.agent id.as deref != Some a.as str {… Evidence: `src/types.rs`
- **The conversation's own time, so recency decays from when the turn** (source_file): MEMRUST URL = os.getenv "MEMRUST URL", "http://127.0.0.1:7801" ⋮---- TEMPLATE MEMRUST = """Memories for user {user id}: ⋮---- def post path: str, body: dict, namespace: str, timeout: float = 120.0 - dict ⋮---- req = urllib.request.Request last = None ⋮---- last = e ⋮---- DATE FORMAT = "%b %d, %Y, %H:%M:%S" ⋮---- def to unix ms stamp: str ⋮---- dt = datetime.strptime stamp, DATE FORMAT .replace tzinfo=timezone.utc ⋮---- def add dialogue namespace: str, turns: list, session idx: int - float ⋮---- items = ⋮---- The conversation's own time, so recency decays from when the turn happened rather than from when this import ran. ⋮---- items = {k: v for k, v in it.items if v is not None} for it in it… Evidence: `benches/halumem/eval_memrust.py`
- **Evaluate Qa** (source_file): def collect results path: str ⋮---- qas = ⋮---- line = line.strip ⋮---- user = json.loads line ⋮---- def judge qa: dict - dict ⋮---- result = evaluation for question out = dict qa ⋮---- def main results path: str, out path: str, workers: int ⋮---- qas = collect results path ⋮---- records = ⋮---- futures = pool.submit judge, qa for qa in qas ⋮---- n = len records valid = r for r in records if r "result type" in counts = Counter r "result type" for r in valid ⋮---- def ratio k ⋮---- by type = defaultdict Counter by diff = defaultdict Counter ⋮---- def breakdown d ⋮---- out = {} ⋮---- tot = sum c.values ⋮---- summary = { ⋮---- p = argparse.ArgumentParser ⋮---- a = p.parse args Evidence: `benches/halumem/evaluate_qa.py`
- **Report** (source_file): PUBLISHED = ⋮---- score = json.load open sys.argv 1 "overall score" results = json.load open sys.argv 2 if len sys.argv 2 else None ⋮---- c = score "correct qa ratio" "all" 100 h = score "hallucination qa ratio" "all" 100 o = score "omission qa ratio" "all" 100 ⋮---- ingest min = None ⋮---- ms = 0.0 ⋮---- ingest min = ms / 1000 / 60 ⋮---- rows = PUBLISHED + "memrust", c, h, o, ingest min ⋮---- star = " " if name == "memrust" else " " tt = f"{t:,.1f}" if t else "-" Evidence: `benches/halumem/report.py`
- **TYPE memrust uptime seconds gauge** (source_file): memrust documentation — agent memory for developers { "@context": "https://schema.org", "@graph": { "@type": "TechArticle", "headline": "memrust documentation", "description": "Developer documentation for memrust, an agent-native memory engine: install, quickstart, HTTP API reference, MCP setup, framework recipes, embeddings, lifecycle and operations.", "url": "https://aianytime.github.io/memrust/docs/", "inLanguage": "en", "proficiencyLevel": "Beginner", "dependencies": "Rust toolchain, Docker, Python 3.9+, or Node 18+", "author": { "@type": "Person", "name": "Sonu Kumar" }, "about": { "@type": "SoftwareApplication", "name": "memrust", "applicationCategory": "DeveloperApplication" }, "isPa… Evidence: `docs/docs/index.html`
- **-- core API ----------------------------------------------------------** (source_file): all = "MemrustClient", "MemrustError" version = "0.6.1" ⋮---- class MemrustError RuntimeError ⋮---- def clean d: dict str, Any - dict str, Any ⋮---- class MemrustClient ⋮---- def request self, method: str, path: str, body: Optional dict = None - dict ⋮---- headers = {"content-type": "application/json"} ⋮---- req = urllib.request.Request ⋮---- -- core API ---------------------------------------------------------- ⋮---- def health self - dict ⋮---- """Engine stats: memory counts, index sizes, WAL tail length.""" ⋮---- body = clean ⋮---- def remember batch self, items: list dict - list dict ⋮---- stamped = ⋮---- item = dict item ⋮---- def forget self, memory id: str - bool ⋮---- def run lifecy… Evidence: `sdks/python/memrust.py`
- **Pyproject** (source_file): build-system requires = "setuptools =61" build-backend = "setuptools.build meta" Evidence: `sdks/python/pyproject.toml`
- **Index** (source_file): export type MemoryKind = "episodic" "semantic" "working" "reflection" "tool call" "procedural"; ⋮---- export type RecallStrategy = "balanced" "semantic" "lexical" "recent" "relational"; ⋮---- export type Visibility = "private" "shared"; ⋮---- export interface MemoryRecord { id: string; kind: MemoryKind; text: string; created at: number; importance: number; expires at?: number; sources?: string ; entities?: string ; tags?: string ; session id?: string; agent id?: string; visibility: Visibility; metadata?: unknown; } ⋮---- export interface RecallSignals { vector: number; lexical: number; graph: number; recency: number; importance: number; rerank: number; } ⋮---- export interface RecallHit { r… Evidence: `sdks/typescript/src/index.ts`
- **Graph** (source_file): use uuid::Uuid; ⋮---- fn is stopword w: &str - bool { STOPWORDS.contains &w.to lowercase .as str ⋮---- pub fn extract entities text: &str, tags: & String - Vec { ⋮---- let key = e.to lowercase ; if key.len = 2 && seen.insert key.clone && out.len = text.split whitespace .collect ; ⋮---- .iter .map w w.trim matches c: char !c.is alphanumeric && c != '-' .collect ; ⋮---- let mut chars = w.chars ; match chars.next { Some c if c.is uppercase = chars.all c c.is lowercase c.is numeric , ⋮---- while i = 3 { push w.to string ; ⋮---- if w.len = 2 && w.len bool { self.entity records.is empty ⋮---- pub fn entity count &self - usize { self.entity records.len ⋮---- pub fn top entities &self, limit: usize… Evidence: `src/index/graph.rs`
- **Mod** (source_file): pub mod graph; pub mod text; pub mod vector; Evidence: `src/index/mod.rs`
- **Text** (source_file): use std::collections::HashMap; ⋮---- pub fn tokenize text: &str - Vec { text.to lowercase .split c: char !c.is alphanumeric .filter t !t.is empty .map t t.to string .collect ⋮---- pub struct Bm25Index { ⋮---- impl Default for Bm25Index { fn default - Self { ⋮---- impl Bm25Index { pub fn new - Self { ⋮---- pub fn len &self - usize { ⋮---- pub fn is empty &self - bool { ⋮---- pub fn add &mut self, text: &str - usize { let id = self.doc len.len ; let tokens = tokenize text ; ⋮---- tf.entry t.clone .or insert 0 += 1; ⋮---- self.postings.entry term .or default .push id, freq ; ⋮---- self.doc len.push tokens.len as u32 ; self.deleted.push false ; ⋮---- self.live len += tokens.len as u64; ⋮---- pu… Evidence: `src/index/text.rs`
- **derive Debug, Serialize, Deserialize** (source_file): use std::cmp::Reverse; ⋮---- struct Ord32 f32 ; ⋮---- impl Eq for Ord32 {} impl PartialOrd for Ord32 { fn partial cmp &self, other: &Self - Option { Some self.cmp other ⋮---- impl Ord for Ord32 { fn cmp &self, other: &Self - std::cmp::Ordering { self.0.total cmp &other.0 ⋮---- pub fn normalize v: &mut f32 { let norm = v.iter .map x x x .sum:: .sqrt ; ⋮---- for x in v.iter mut { ⋮---- pub fn dot a: & f32 , b: & f32 - f32 { let n = a.len .min b.len ; ⋮---- acc l = a i + l .mul add b i + l , acc l ; ⋮---- let mut sum: f32 = acc.iter .sum ; ⋮---- fn dot codes q: & f32 , codes: & u8 - f32 { let n = q.len .min codes.len ; ⋮---- acc l = q i + l .mul add codes i + l as f32, acc l ; ⋮---- fn dist f3… Evidence: `src/index/vector.rs`
- **toast {** (source_file): memrust dashboard // Apply the saved theme before first paint so there is no flash. try { var t = localStorage.getItem "memrust-theme" ; if t document.documentElement.setAttribute "data-theme", t ; } catch e {} / Light and dark are each selected against their own surface, not auto-inverted. Both signal palettes pass the categorical checks lightness band, chroma floor, CVD separation, normal-vision floor . Two light slots sit under 3:1 contrast, which is why every signal track carries a visible name and numeric value — identity never rests on color alone. / :root { color-scheme: light; --page: f5f5f3; --surface: ffffff; --surface-2: f1f0ed; --border: e0dfda; --text: 16160f; --text-2: 52514e;… Evidence: `src/server/dashboard.html`
- **Http** (source_file): use std::sync::Arc; ⋮---- use axum::middleware::Next; ⋮---- use serde::Deserialize; use serde json::json; use uuid::Uuid; ⋮---- fn without embedding mut record: MemoryRecord - MemoryRecord { ⋮---- pub struct AppState { ⋮---- type Rejection = StatusCode, String ; ⋮---- impl AppState { ⋮---- fn resolve &self, headers: &HeaderMap - Result { let namespace = extract namespace headers ; if self.auth.enabled { let presented = extract key headers .ok or ⋮---- .to string , ⋮---- .authenticate &presented .ok or StatusCode::UNAUTHORIZED, "invalid API key".to string ?; if !key.may access &namespace { return Err ⋮---- format! "this key is not scoped to namespace '{namespace}'" , ⋮---- .get or create &na… Evidence: `src/server/http.rs`
- **Mcp** (source_file): use uuid::Uuid; ⋮---- use crate::engine::MemoryEngine; ⋮---- type Shared = Arc ; ⋮---- pub fn run engine: Shared, agent id: Option - anyhow::Result { ⋮---- for line in stdin.lock .lines { ⋮---- if line.trim .is empty { ⋮---- let Some id = msg.get "id" .cloned else { ⋮---- let method = msg.get "method" .and then Value::as str .unwrap or "" ; let params = msg.get "params" .cloned .unwrap or Value::Null ; ⋮---- "initialize" = Ok json! { ⋮---- "ping" = Ok json! {} , "tools/list" = Ok tools list , "tools/call" = tools call &engine, &params, agent id.as deref , = Err -32601, format! "method not found: {method}" , ⋮---- Ok result = json! { "jsonrpc": "2.0", "id": id, "result": result } , Err code,… Evidence: `src/server/mcp.rs`
- **default** (source_file): use std::collections::HashMap; ⋮---- use std::time::Instant; ⋮---- use crate::server::tenancy::Registry; ⋮---- struct Histogram { counts: u64; BUCKETS.len , ⋮---- impl Histogram { fn record &mut self, seconds: f64 { ⋮---- for i, edge in BUCKETS.iter .enumerate { ⋮---- pub struct Metrics { ⋮---- impl Default for Metrics { fn default - Self { ⋮---- impl Metrics { pub fn new - Self { ⋮---- pub fn record &self, route: &str, status: u16, seconds: f64 { ⋮---- .lock .expect "metrics lock" .entry route.to string , status .or insert 0 += 1; ⋮---- .entry route.to string .or default .record seconds ; ⋮---- self.unauthorized.fetch add 1, Ordering::Relaxed ; ⋮---- pub fn render &self, registry: &Registr… Evidence: `src/server/metrics.rs`
- **Mod** (source_file): pub mod http; pub mod mcp; pub mod metrics; pub mod tenancy; Evidence: `src/server/mod.rs`
- **Tenancy** (source_file): use std::collections::HashMap; use std::path::PathBuf; ⋮---- use crate::embed::Embedder; use crate::engine::MemoryEngine; use crate::index::vector::HnswConfig; use crate::extract::Extractor; use crate::rerank::Reranker; use crate::summarize::Summarizer; use crate::types::LifecycleConfig; ⋮---- pub type MakeEmbedder = Box Result + Send + Sync ; pub type MakeSummarizer = Box Result + Send + Sync ; pub type MakeReranker = Box Box + Send + Sync ; ⋮---- pub type MakeExtractor = Box Arc + Send + Sync ; ⋮---- pub struct EngineFactory { ⋮---- pub struct Namespace { ⋮---- pub struct Registry { ⋮---- impl Registry { pub fn new root: PathBuf, factory: EngineFactory - Self { let legacy root = root.join… Evidence: `src/server/tenancy.rs`
- **Test E2E** (source_file): BASE = os.environ.get "MEMRUST URL", "http://127.0.0.1:7700" ⋮---- planner = MemrustClient BASE, agent id="planner" researcher = MemrustClient BASE, agent id="researcher" operator = MemrustClient BASE ⋮---- seen = h "record" "text" for h in researcher.recall "Initech pricing strategy" ⋮---- seen = h "record" "text" for h in planner.recall "Initech pricing strategy" ⋮---- hits = operator.recall "Initech pricing", top k=5 ⋮---- records = operator.remember batch ⋮---- snap = operator.snapshot "ops" ⋮---- stats = operator.health ⋮---- victim = records 0 "id" Evidence: `sdks/python/test_e2e.py`
- **Test E2E** (source_file): import { MemrustClient } from "./src/index.ts"; ⋮---- const assert = cond: boolean, msg: string = Evidence: `sdks/typescript/test_e2e.mts`

## Rules the Host AI Must Follow

- **Treat this asset as pre-work context, not a runtime environment.**: The AI Context Pack contains only an evidence-backed understanding of the project, not the project's executable state. Evidence: `README.md`, `benches/README.md`, `notebooks/README.md`
- **When answering the user, distinguish what can be previewed from what can only be verified after install.**: The consumer value of the pre-install experience comes from reducing bad installs and misjudgments, not from pretending to be a real run. Evidence: `README.md`, `benches/README.md`, `notebooks/README.md`

## Questions the User Should Answer First

- Which host AI or local environment do you plan to use it in?
- Do you just want to experience the workflow first, or are you ready to actually install?
- What matters most to you: install cost, output quality, or conflicts with your existing rules?

## Acceptance Checks

- Every capability claim can be traced back to a file path in evidence_refs.
- AI_CONTEXT_PACK.md does not package previews as a real run.
- The user can understand who it fits, what it can do, how to start, and the risk boundaries within 3 minutes.

---

## Doramagic Context Augmentation

The following sections strengthen the repository context for a host AI. Human Manual data is a reading route, and pitfall notes become operating constraints.

## Human Manual Outline

Usage rule: this is only a reading route and salience signal, not factual authority. Concrete claims must still return to repo evidence or Claim Graph.

Host AI hard rules:
- Do not treat page titles, section order, summaries, or importance values as factual project evidence.
- When explaining the Human Manual outline, state that it is only a reading route or salience signal.
- Capability, installation, compatibility, runtime state, and risk claims must cite repo evidence, source paths, or Claim Graph.

- **Getting Started and Overview**: importance `high`
  - source_paths: README.md, Cargo.toml, src/main.rs, src/server/dashboard.html
- **Architecture and Hybrid Retrieval**: importance `high`
  - source_paths: src/engine.rs, src/index/mod.rs, src/index/vector.rs, src/index/text.rs, src/index/graph.rs
- **Deployment, Namespaces, and Observability**: importance `high`
  - source_paths: Dockerfile, src/server/http.rs, src/server/tenancy.rs, src/server/metrics.rs, src/server/mod.rs
- **Memory Lifecycle, Multi-Agent Visibility, and Extensibility**: importance `high`
  - source_paths: src/store.rs, src/summarize.rs, src/embed.rs, src/rerank.rs, src/extract.rs

## Repo Inspection Evidence

- repo_clone_verified: true
- repo_inspection_verified: true
- repo_commit: `a45b624dcf487e94ba142e686219c5c747ff534c`
- inspected_files: `Dockerfile`, `README.md`

Host AI hard rules:
- Without repo_clone_verified=true, do not claim that the source code has been read.
- Without repo_inspection_verified=true, do not write README, docs, or package-file conclusions as facts.
- Without quick_start_verified=true, do not claim that the Quick Start path has run successfully.

## Doramagic Pitfall Constraints

These rules come from Doramagic discovery, validation, or compilation findings. The host AI must treat them as operating constraints, not background notes.

### Constraint 1: Capability evidence risk requires verification

- Trigger: README/documentation is current enough for a first validation pass.
- Host AI rule: Reproduce the official install and quickstart path in an isolated environment.
- Why it matters: May increase setup, validation, or first-run risk for the user.
- Evidence: capability.assumptions | https://github.com/AIAnytime/memrust
- Hard boundary: Do not present this pitfall as solved, verified, or ignorable unless later evidence explicitly closes it.

### Constraint 2: Security or permission risk requires verification

- Trigger: no_demo
- Host AI rule: Reproduce the official install and quickstart path in an isolated environment.
- Why it matters: May increase setup, validation, or first-run risk for the user.
- Evidence: downstream_validation.risk_items | https://github.com/AIAnytime/memrust
- Hard boundary: Do not present this pitfall as solved, verified, or ignorable unless later evidence explicitly closes it.

### Constraint 3: Security or permission risk requires verification

- Trigger: no_demo
- Host AI rule: Reproduce the official install and quickstart path in an isolated environment.
- Why it matters: May increase setup, validation, or first-run risk for the user.
- Evidence: risks.scoring_risks | https://github.com/AIAnytime/memrust
- Hard boundary: Do not present this pitfall as solved, verified, or ignorable unless later evidence explicitly closes it.

### Constraint 4: Maintenance risk requires verification

- Trigger: issue_or_pr_quality=unknown。
- Host AI rule: Reproduce the official install and quickstart path in an isolated environment.
- Why it matters: May increase setup, validation, or first-run risk for the user.
- Evidence: evidence.maintainer_signals | https://github.com/AIAnytime/memrust
- Hard boundary: Do not present this pitfall as solved, verified, or ignorable unless later evidence explicitly closes it.

### Constraint 5: Maintenance risk requires verification

- Trigger: release_recency=unknown。
- Host AI rule: Reproduce the official install and quickstart path in an isolated environment.
- Why it matters: May increase setup, validation, or first-run risk for the user.
- Evidence: evidence.maintainer_signals | https://github.com/AIAnytime/memrust
- Hard boundary: Do not present this pitfall as solved, verified, or ignorable unless later evidence explicitly closes it.
