agent-fact-system
Provides Obsidian-compatible Agent projections, enabling the use of an Obsidian vault as a derived knowledge view synced with the canonical store.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@agent-fact-systemwhat facts and evidence exist on renewable energy?"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Agent Fact System
中文 | English
Lightweight. Fast. Unconstrained.
Agent Fact System, or AFS, is a local-first knowledge system for reasoning agents. It keeps facts, evidence, revisions, documents, retrieval indexes, and audit history outside the model context, then exposes them through a compact CLI and a thin stdio MCP server.
AFS is purpose-built for the working style of frontier models such as DeepSeek V4 Pro. These models can plan, call tools, compare evidence, and revise conclusions. They work better with a small deterministic knowledge surface than with a large application framework surrounding them.
The design target is model-class specific and provider neutral. AFS does not contain a DeepSeek-only adapter and does not require a particular chat runtime. DeepSeek V4 Pro, another frontier model, or a local Agent can use the same contracts.
Why AFS exists
A strong model can reason across a difficult task. It still needs a reliable answer to a simpler question. What is true now, where did that claim come from, and what changed since the last run?
AFS gives the Agent one factual authority with explicit evidence and readback. The model remains free to reason. The knowledge layer stays small, inspectable, and recoverable.
Related MCP server: verifiable-memory
What is implemented
A transactional SQLite canonical store for facts and practices
Evidence-bound proposals, revisions, status transitions, and idempotent writes
Append-only Timeline events and revision history
A portable Markdown document store with stable slugs and source line locators
Structured, full-text, temporal, vector, and hybrid retrieval
Tags, links, backlinks, and partial document resolution
Extractive answers with citations
A fixed allowlist of 14 Agent-facing MCP tools
A thin JSON CLI for local operation and administration
Rebuildable local and vector indexes
Obsidian-compatible Agent projections and a narrow command inbox
Verified backup, restore, health, and drift checks
Fail-closed sensitivity rules that keep restricted content out of FTS, projections, exports, and remote embeddings
Optional one-time GBrain migration and private cold-archive support
Why it fits DeepSeek V4 Pro class models
AFS gives a high-end Agent a compact set of operations instead of another orchestration framework.
Small tool surface The MCP interface is capped at 14 tools.
Deterministic contracts JSON schemas, idempotency keys, revision checks, and canonical readback make tool results verifiable.
Evidence stays close Claims carry source locators, excerpts, hashes, and Timeline history.
Context stays lean The Agent retrieves the exact record or document span it needs.
Reasoning stays free AFS governs stored knowledge without prescribing how the model plans or thinks.
The runtime stays light Python, SQLite, three direct runtime dependencies, and no mandatory daemon.
This is what “unconstrained” means here. AFS does not try to become the Agent, the planner, or the application shell. It provides durable knowledge and gets out of the way.
Architecture
Agent or MCP client
|
v
CLI / stdio MCP
|
+-------------------+
| |
v v
Canonical SQLite Markdown documents
| |
+---------+---------+
|
v
Rebuildable derived views
FTS / Timeline / vectors / VaultCanonical data remains authoritative. Full-text indexes, vector generations, and Vault projections can be rebuilt.
Quick start
AFS requires Python 3.12 and uv.
git clone https://github.com/leoge007/agent-fact-system.git
cd agent-fact-system
uv sync --locked
export AFS_HOME="$HOME/.local/share/agent-fact-system"
install -d -m 0700 "$AFS_HOME"
uv run afs init --json
uv run afs doctor --jsonCreate a candidate fact through the public CLI.
uv run afs record propose --input - <<'JSON'
{"kind":"fact","subject":"projects/quickstart","claim":"AFS stores evidence-backed facts.","evidence":[{"locator":"inline:quickstart","excerpt":"AFS stores evidence-backed facts."}],"idempotency_key":"quickstart:propose:1"}
JSONBuild the local index and query it.
uv run afs index sync --json
uv run afs query 'evidence-backed facts' --mode fulltext --jsonSee docs/quickstart.md for MCP setup, documents, vectors, backup, and restore.
MCP setup
Any stdio MCP client can launch AFS with an explicit data directory.
{
"command": "uv",
"args": [
"--directory",
"/absolute/path/to/agent-fact-system",
"run",
"python",
"-m",
"afs.mcp"
],
"env": {
"AFS_HOME": "/absolute/path/to/afs-data"
}
}The repository also includes an Agent routing Skill at skills/agent-fact-system/SKILL.md.
Retrieval and embeddings
Local structured, full-text, temporal, and document retrieval work without a network service. Vector and hybrid retrieval are optional.
The current remote embedding adapter uses SiliconFlow with Qwen/Qwen3-Embedding-8B. Only records marked normal are eligible for remote embedding. Restricted content fails closed before an HTTP request is made.
export SILICONFLOW_API_KEY='...'
uv run afs embedding preflight --json
uv run afs index vector --json
uv run afs query 'your question' --mode hybrid --jsonDeliberate boundaries
AFS currently targets Python 3.12. It does not run a daemon, scrape conversations automatically, promote model output into confirmed facts, or hide provider failures behind silent fallback. Owner-level mutations remain outside the normal MCP surface.
The remote embedding adapter is currently specific to SiliconFlow. The Agent model itself remains independent of that adapter.
Verification
uv sync --locked
uv run pytest --ignore=tests/liveLive embedding tests require an explicit API key and network authorization.
License
MIT
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- AlicenseAqualityAmaintenanceMCP server exposing a deterministic, local knowledge graph over stdio. Zero LLM calls in the bridge; answers are classified as Fact, Inference, or Unknown and persisted in redb (ACID, BLAKE3-hashed).1014Apache 2.0
- AlicenseAqualityBmaintenanceMemory for AI agents that can't hallucinate — answers only from stored facts with a citation, or honestly abstains. Provable forgetting (GDPR), valid-time, Merkle proofs, deterministic. MCP server, CPU-only, zero dependencies.131MIT
- Alicense-qualityCmaintenanceA local-first compiled knowledge graph MCP server that provides structured memory for AI agents with full-text search, vector embeddings, and timeline tracking.4728MIT
- Alicense-qualityBmaintenanceProvides LLM agents with a structured, queryable, local-first knowledge base with typed documents and full-text search via MCP.MIT
Related MCP Connectors
User-owned memory for AI agents, Copilot, Claude, IDEs, CLIs, and chat apps over remote MCP.
Private-by-default, local-first memory/context/task orchestrator for MCP apps and agents.
Agent-native MCP server over the public saagarpatel.dev corpus. Read-only, stateless.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/leoge007/agent-fact-system'
If you have feedback or need assistance with the MCP directory API, please join our Discord server