Context7
Up-to-date docs for AI agents
作者提供的说明(英文原文)
Auditable memory for AI agents: provenance, cascade retraction, conflict refusal
这三项永远不会合并成一个分数:意见、测量和人气是不同的东西。
我们还没有为它写通俗的介绍。下面是我们从注册中心读取到的事实。
选择你使用的 AI 应用,然后复制设置。
作者没有在注册中心列出安装信息。请查看下方作者的 README。
它在你的电脑上运行;安装后,工具列表会显示在你的 AI 应用中。
我们检查的是任何人都能看到的信息;我们没有阅读代码。不适用的检查项不计入总数。 · 检查于 2026年11月8日
注册名称已通过 GitHub 账户 factum-project 验证,该账户拥有此仓库
我们还没有从 GitHub 读取这个仓库
我们还没有从 GitHub 读取这个仓库
它在你的电脑上运行,没有互联网端点
在你的电脑上运行,改用本地设置
它在你的电脑上运行;我们只能读取互联网端点的工具列表
与注册中心里这个分类中所有活跃的服务器比较。只有当发布者拥有该仓库时,星标数才计入。
它在 1 项适用的基础检查中通过了 1 项。我们没有阅读代码。在添加密钥或令牌之前,请先看看这个服务器要求哪些权限,并使用只具备所需权限的密钥。
注册中心没有列出必需的密钥,不过有些服务器会在首次使用时要求你登录。
它在你的电脑上运行。你的 AI 应用会在需要时启动它,数据不会经过作者的服务器(除非它自己调用在线服务)。
GitHub 仓库最后更新于–,最新版本(0.1.3)于2个月前进入注册中心。
支持 MCP 的应用,例如 Claude Desktop、Claude Code、Cursor 和 VS Code。你的电脑上还需要有 Rust。
同一分类中有:Context7, Codebase Memory, Exa
同一分类中其他作者的服务器,按星标数排序。
如何看卡片:★ GitHub 星标i三大支柱:评价 · 检查 · 使用情况i更新 = 最新版本发布到注册中心的时间i
Up-to-date docs for AI agents
Codebase knowledge graph for AI agents — 162 languages, sub-ms queries, 99% fewer tokens.
Connect AI agents to Exa for web search, content fetching, and multi-step research.
按原文从作者的仓库复制。PopNx MCP 没有审查或背书其内容。HTML、图片和脚本已被移除。链接会离开本站。
Status: v0.1.3 — Early stage, seeking early collaborators.
Core write/query/retract pipeline works. Not production-ready. Architectural decisions are still open to change.
[Interactive docs](https://factum-project.github.io/factum/) — animated syntax parsing, 7-tuple explorer, query pipeline, token efficiency chart, and MCP architecture diagram.
Every fact an agent writes carries mandatory provenance. When a source is retracted, everything derived from it is invalidated automatically — cascade retraction. When facts conflict, Factum returns Ambiguous instead of guessing.
A structured knowledge language (S-expression based), Rust implementation, stdio MCP server — works with Claude Code, Cursor, and any MCP client.
Status: v0.1.3, early stage. Core write/query/retract pipeline works; no semantic search or memory consolidation yet — Factum handles verified structured facts, not conversation context. Best suited for compliance-sensitive agents, multi-agent shared knowledge bases, and anywhere "why did the agent believe X" needs an answer. See the multi-agent usage guide for shared knowledge base patterns.
Unique to Factum: grammar-enforced provenance · cascade retraction · conflict refusal.
Not (yet) in Factum: embedding-based semantic retrieval · memory consolidation · HTTP transport.
Complementary: Mem0/Letta store and retrieve context; Factum stores auditable structured facts. They can run side by side via MCP.
| Agent memory pain point | Factum mechanism |
|---|---|
| Can't tell "user said" from "LLM inferred" | 5-level provenance + grammar-enforced model name on Extracted nodes |
| Stale memory used as current fact | Soft delete + cascade retraction via reverse dependency graph |
| Conflicting memories silently pick one | Ambiguous — refuses to answer rather than guess |
| Memory pollution (prompt injection) | Provenance chain makes contamination traceable and retractable |
| Enterprise can't let agents store sensitive data | Index-level permission filtering — no post-query leakage |
Academic context: The STALE benchmark (2025) shows that even the best LLM agents achieve only 55.2% accuracy at detecting when their own memories are outdated — confirming that memory staleness is an unsolved problem in agent systems.
:note for human-readable context"auto" as the node ID in factum_insert or factum_assert to auto-generate content-based IDs — no manual ID managementExtracted nodes MUST carry model + version — the parser rejects them if missing (not just a documentation convention)deps_rev reverse dependency graph); configurable node limit prevents cascade explosion in large knowledge basesfactum_assert returns corroborated (not an error) — independent agreement is the most valuable multi-agent signalAmbiguous when it cannot uniquely resolveDec(i128, u8) — zero floating-point error| Module | Status | Notes |
|---|---|---|
| factum-core (types, lexer, parser, serialize) | ✅ Implemented | 100% syntactic round-trip |
| factum-rt (store, query, arbitration, permissions, verifiers) | ✅ Implemented | In-memory store (default) + RocksDB persistence (--features rocksdb); 5 column families, WriteBatch atomic writes |
| factum-mcp (JSON-RPC bridge) | ✅ Protocol + handler | stdio transport verified end-to-end; HTTP transport not yet implemented (remote deployment requires custom wrapper) |
| factum-bench (benchmarks) | ✅ Implemented | Syntax round-trip + token efficiency + query perf |
| factum-l (latent space projection) | ❌ Not started | Research item — see ROADMAP.md |
| Wikidata/Mathlib corpus converters | ❌ Not started | M2 milestone |
| Lean/Z3 verifiers | ❌ Not started | Only Schema + DecimalRange verifiers implemented |
| Embedding-based semantic search | ❌ Not started | Not on roadmap — consider using Mem0 alongside Factum |
| Memory consolidation/summarization | ❌ Not started | Not on roadmap — consider using Letta alongside Factum |
| Inspector (visual debugger) | ❌ Not started |
# Build
cargo build
cargo test
cargo run -p factum-demo
cargo build --features rocksdb cargo test --features rocksdb
cargo build --release -p factum-mcp --features rocksdb --bin factum-mcp-server
cargo +nightly fuzz run fuzz_parser -- -max_total_time=600
# Build the MCP server binary (in-memory, default)
cargo build --release -p factum-mcp --bin factum-mcp-server
cargo build --release -p factum-mcp --features rocksdb --bin factum-mcp-server
claude mcp add --transport stdio --scope local factum -- "$(pwd)/target/release/factum-mcp-server"
claude mcp add --transport stdio --scope local factum -- \ "$(pwd)/target/release/factum-mcp-server" --db-path ~/.factum/store
claude mcp get factum
See Getting Started with Factum MCP for the full guide.
; Acme Corp knowledge graph
(node n001 :pred (instance-of @ACME-CORP organization) :conf 0.99 :auth 0.95 :perm public :src (asserted "wikidata"))
(node n004 :pred (shareholder-major @ACME-CORP @FOUNDER-1 0.73 :since #date(2001-03-15)) :conf 0.85 :auth 0.8 :perm confidential :src (extracted "doc002" [100 200] (model "claude-sonnet-4" "2025-01")))
(node n006 :pred (subsidiary-of @ACME-SUB @ACME-CORP :since #date(2001-03-15)) :src (derived n001 "rule-subsidiary-merge") :deps [n001])
When n001 is retracted, n006 is automatically invalidated — the agent knows it can no longer trust the subsidiary relationship.
| Layer | What It Means | Status |
|---|---|---|
| Agent Read | Agent receives Factum-F as context via MCP — lower token overhead than verbose JSON | ✅ Token efficiency measured (real o200k_base: canonical −62%, compact −53% vs JSON) |
| Agent Write | Agent generates Factum-F nodes — parse uniqueness guarantees one valid interpretation, error classes enable self-correction | ✅ See authoring guide |
| Latent Reasoning | factum-l: encode Factum-F into continuous thought vector, reason in latent space, decode back for audit | 🔬 Research item — not started, not blocking layers 1-2 |
A structured knowledge language underpins the memory layer — S-expression based for parse uniqueness, with Dec(i128, u8) for lossless numerics and mandatory model references for LLM self-auditing. Full design rationale in docs/design-rationale.md.
TL;DR: Factum canonical form saves ~62% tokens vs verbose JSON with the same metadata. All numbers measured with real o200k_base (GPT-4o) tokenizer via tiktoken-rs.
| Format | Real tokens (5 nodes) | vs verbose JSON | What it includes |
|---|---|---|---|
| Factum canonical | 238 | −62% | Full 7-tuple: provenance + confidence + validity + permissions |
| Factum compact (JSON) | 290 | −53% | Same 7-tuple, JSON with numeric tags |
| Markdown | 181 | −71% | Assertion text only — no provenance, no confidence, no permissions |
| JSON (pretty) | 623 | baseline | Same 7-tuple metadata in verbose JSON encoding |
Run
cargo test -p factum-bench test_token_efficiency_real_tokenizer -- --nocaptureto reproduce.
Key finding: The canonical S-expression form (238 tokens) is more token-efficient than the compact JSON form (290 tokens) — BPE tokenizers split JSON delimiters but merge S-expression parentheses. The form designed for correctness is also the most token-efficient.
parse(serialize(parse(x))) == parse(x). 100% and verified by the test suite + fuzzing. This is the trust foundation.morphemes.toml via build.rs)morphemes.toml codegen is a future M2 item for external contributions.| Format | How Factum Differs |
|---|---|
| RDF / JSON-LD | RDF triples carry no per-node provenance, confidence, or permissions. Factum makes these first-class and non-optional. |
| Markdown | Markdown has zero metadata. Factum trades human readability for machine verifiability. |
| JSON | JSON has no schema, no provenance, no temporal validity. Factum compact form uses JSON as transport but adds structure and audit chain. |
| Mem0 / Zep / Letta | These store and retrieve agent memory. Factum adds grammar-enforced provenance, cascade retraction, and conflict refusal. Complementary, not competitive. |
factum/
├── crates/ │ ├── factum-core/ # Data model, lexer, parser, serialization │ ├── factum-rt/ # Runtime: store (InMemory + RocksDB), query, arbitration, permissions, verifiers │ ├── factum-mcp/ # MCP bridge: JSON-RPC tools/resources, stdio transport │ ├── factum-bench/ # Benchmarks: round-trip, token efficiency, query perf │ └── factum-demo/ # End-to-end demonstration ├── fuzz/ # cargo-fuzz targets (parser, serialize round-trip, lexer) ├── spec/ # Conformance test vectors (JSON, language-agnostic) ├── docs/site/ # Interactive visualization (GitHub Pages) ├── .github/workflows/ # CI: test + fuzz + gitleaks + Pages deploy ├── Cargo.toml # Workspace root ├── ROADMAP.md # What's planned and in what order ├── SECURITY.md # Vulnerability disclosure ├── CONTRIBUTING.md # How to contribute ├── CHANGELOG.md # Version history ├── docs/design-rationale.md # Why each architectural decisio
只显示了开头部分;其余内容请在仓库中阅读