经 AI Skill Hub 精选评估,SwarmVault知识图谱引擎 获评「强烈推荐」。这款AI工具在功能完整性、社区活跃度和易用性方面表现出色,AI 评分 8.2 分,适合有一定技术背景的用户使用。
本地优先的开源知识图谱构建工具,支持RAG检索增强生成。为AI Agent提供持久化记忆和知识库管理能力,适合需要构建私有知识库、增强LLM上下文的开发者和研究人员。
SwarmVault知识图谱引擎 是一款基于 TypeScript 开发的开源工具,专注于 知识图谱、记忆系统、RAG 等核心功能。作为 GitHub 开源项目,它拥有活跃的社区支持和持续的版本迭代,代码完全透明可审计,支持本地部署以保护数据隐私。无论是个人使用还是集成到企业工作流,都能提供稳定可靠的解决方案。
本地优先的开源知识图谱构建工具,支持RAG检索增强生成。为AI Agent提供持久化记忆和知识库管理能力,适合需要构建私有知识库、增强LLM上下文的开发者和研究人员。
SwarmVault知识图谱引擎 是一款基于 TypeScript 开发的开源工具,专注于 知识图谱、记忆系统、RAG 等核心功能。作为 GitHub 开源项目,它拥有活跃的社区支持和持续的版本迭代,代码完全透明可审计,支持本地部署以保护数据隐私。无论是个人使用还是集成到企业工作流,都能提供稳定可靠的解决方案。
# 方式一:npm 全局安装 npm install -g swarmvault # 方式二:npx 直接运行(无需安装) npx swarmvault --help # 方式三:项目依赖安装 npm install swarmvault # 方式四:从源码运行 git clone https://github.com/swarmclawai/swarmvault cd swarmvault npm install npm start
# 命令行使用
swarmvault --help
# 基本用法
swarmvault [options] <input>
# Node.js 代码中使用
const swarmvault = require('swarmvault');
const result = await swarmvault.run(options);
console.log(result);
# swarmvault 配置说明 # 查看配置选项 swarmvault --config-example > config.yml # 常见配置项 # output_dir: ./output # log_level: info # workers: 4 # 环境变量(覆盖配置文件) export SWARMVAULT_CONFIG="/path/to/config.yml"
Languages: English | 简体中文 | 日本語
The local-first LLM Wiki, knowledge graph builder, and RAG knowledge base for AI agents. SwarmVault turns docs, code, transcripts, notes, and URLs into a durable markdown wiki plus a local graph you can inspect, query, and hand to agents. Start with one command, then learn the deeper graph, review, context-pack, and automation workflows when you need them.
Documentation on the website is currently English-first. If wording drifts between translations, README.md is the canonical source.
Set up your coding agent so it knows about the vault:
swarmvault install --agent claude --hook --mcp # Claude Code + graph-first hook + MCP server
swarmvault install --agent codex --hook # Codex + graph-first hook
swarmvault install --agent cursor # Cursor
swarmvault install --agent copilot --hook # GitHub Copilot CLI + hook
swarmvault install --agent gemini --hook # Gemini CLI + hook
swarmvault install --agent trae # Trae
swarmvault install --agent claw # Claw / OpenClaw skill target
swarmvault install --agent droid # Droid / Factory rules target
swarmvault install --agent kiro # Kiro IDE + always-on steering
swarmvault install --agent kilo --hook # Kilo project rules + plugin
swarmvault install --agent hermes # Hermes user-scope skill
swarmvault install --agent antigravity # Google Antigravity rules + /swarmvault workflow
swarmvault install --agent vscode # VS Code Copilot Chat chatmode
swarmvault install status --agent kilo --hook
For hook-capable agents, the installed hooks guide graph-first reads, with enforcement as an opt-in. For Claude Code, --hook injects graph-first instructions at session start — answer code-understanding questions with the plain swarmvault graph query|explain|path commands (avoid --json, which produces much larger output), swarmvault query, swarmvault context build, or wiki/graph/report.md, and read source files only when editing them — along with a graph staleness note. swarmvault graph query "<seed>" prints the top matches with page paths plus an inline excerpt of the best-matching wiki page, so one command usually answers where-is/what-calls questions without follow-up file reads. For who-calls and impact-of-change questions, the hook guidance recommends swarmvault graph callers <symbol>, which lists every caller from graph call edges with exact file:line call-site evidence — scanning only the files the graph identifies as callers — instead of a repo-wide grep. By default the hook runs in advisory mode (context): the first broad Grep/Glob/Bash search per session gets a one-time guidance note pointing at those plain graph commands, and nothing is denied. Pass --graph-first at install time to opt in to enforcement, where the first broad search per session is denied once with a guided redirect to those plain graph commands and the inline excerpt they return (repeating the same search is then allowed, so work is never blocked). The flag accepts an optional value — deny (the default when the flag is passed), context, or off — and persists the chosen mode as hooks.graphFirst in swarmvault.config.json; SWARMVAULT_GRAPH_FIRST=deny|context|off still overrides per session. After Edit/Write tools the hook spawns a background swarmvault graph update --file <path> refresh so the graph tracks your edits. Searches scoped to vault artifact directories (wiki/, raw/, state/) or a single file are never intercepted, and search tools that merely filter piped output (e.g. some-command | grep …) do not count as broad searches. The Codex, Gemini, Copilot, OpenCode, and Kilo hooks carry the same graph-first guidance — a session note plus a one-time search redirect appropriate to each tool's hook API.
swarmvault install --agent claude --mcp also registers the SwarmVault MCP server in the project's .mcp.json ({"mcpServers":{"swarmvault":{"command":"swarmvault","args":["mcp"]}}}). Claude installs additionally write a project skill bundle at .claude/skills/swarmvault/SKILL.md, and --scope user installs the skill, hook, and settings once under ~/.claude for all repos — the hook no-ops in repos without a compiled graph report.
swarmvault install --agent <agent> also keeps the host project clean: in git repos the vault artifact directories are appended to .gitignore, strict-JSON tsconfig.json files get the artifact directories added to "exclude" so stored source copies under raw/ do not break the host typecheck (commented JSONC tsconfigs are left untouched with a warning, linter configs that still cover the artifact directories get an advisory warning, and everything is skipped when SWARMVAULT_OUT keeps artifacts outside the repo).
Recommended per-repo onboarding for token-saving agent workflows:
cd <repo>
swarmvault init && swarmvault ingest .
swarmvault install --agent claude --hook --mcp --graph-first
swarmvault hook install # git-hook refresh on commit/checkout; accepts an optional repo path (e.g. `swarmvault hook install packages/app`) when the tracked repo lives below the vault root
SwarmVault never writes these project-local rule files during init, quickstart, scan, or clone unless you explicitly opt into configured installs. Use swarmvault install --agent <agent> [--scope project|user] for one target at a time, or list agents in swarmvault.config.json and run swarmvault init --install-agent-rules or swarmvault quickstart <input> --install-agent-rules when you want configured targets installed together. install status reports the files SwarmVault expects for a target without mutating the workspace.
Or expose the vault directly over MCP:
swarmvault mcp
Using OpenClaw or ClawHub? Install the packaged skill with:
clawhub install swarmvault
That installs the published SKILL.md plus a ClawHub README, examples, references, troubleshooting notes, and validation prompts. Keep the CLI itself updated with npm install -g @swarmvaultai/cli@latest.
Each folder has real input files and actual output so you can run it yourself and verify.
| Example | What it shows | Source |
|---|---|---|
| **[research-deep-dive](worked/research-deep-dive/)** | Papers and articles building an evolving thesis with contradiction detection across sources | worked/research-deep-dive/ |
| **[personal-knowledge-base](worked/personal-knowledge-base/)** | Journal entries, health notes, podcasts compiled into a personal Memex with dashboards | worked/personal-knowledge-base/ |
| **[book-reading](worked/book-reading/)** | Chapter-by-chapter fan wiki with character and theme pages that compound as you read | worked/book-reading/ |
| **[code-repo](worked/code-repo/)** | Repo ingest, module pages, graph reports, benchmarks | worked/code-repo/ |
| **[capture](worked/capture/)** | Research-aware add capture with normalized metadata from arXiv, DOI, URLs | worked/capture/ |
| **[mixed-corpus](worked/mixed-corpus/)** | Compile, review, save-first output loops across mixed input types | worked/mixed-corpus/ |
See the examples guide for step-by-step walkthroughs.
You do not need API keys or an external model provider to start using SwarmVault. The built-in heuristic provider supports local/offline vault setup, ingest, compile, graph/report/search workflows, and lightweight query or lint defaults.
For cloud-hosted models, add a provider block with your API key:
{
"providers": {
"primary": {
"type": "openai",
"model": "gpt-4o",
"apiKeyEnv": "OPENAI_API_KEY"
}
},
"tasks": {
"compileProvider": "primary",
"queryProvider": "primary",
"embeddingProvider": "primary"
}
}
See the provider docs for optional backends, task routing, and capability-specific configuration examples.
You can also manage provider routing from the CLI without hand-editing JSON:
swarmvault provider add router --type openrouter --model openrouter/auto --api-key-env OPENROUTER_API_KEY --capability chat --capability structured --task queryProvider
swarmvault provider list
swarmvault provider show router
swarmvault provider remove router --fallback local
Provider commands preserve unknown swarmvault.config.json fields and store secret references through apiKeyEnv; they do not accept literal API key values.
| Package | Purpose |
|---|---|
@swarmvaultai/cli | Global CLI (swarmvault and vault commands) |
@swarmvaultai/engine | Runtime library for ingest, compile, query, lint, watch, MCP |
@swarmvaultai/viewer | Graph viewer (included in CLI, no separate install needed) |
高质量的Agent记忆框架,本地优先理念符合隐私需求,MCP标准化设计易于集成,活跃维护且Star增长稳定,值得深度关注。
AI Skill Hub 为第三方内容聚合平台,本页面信息基于公开数据整理,不对工具功能和质量作任何法律背书。
建议在沙箱或测试环境中充分验证后,再部署至生产环境,并做好必要的安全评估。
✅ MIT 协议 — 最宽松的开源协议之一,可自由商用、修改、分发,仅需保留版权声明。
AI Skill Hub 点评:SwarmVault知识图谱引擎 的核心功能完整,质量优秀。对于AI爱好者来说,这是一个值得纳入个人工具库的选择。建议先在非生产环境试用,再逐步推广。
| 原始名称 | swarmvault |
| 原始描述 | 开源MCP工具:The local-first LLM Wiki: open-source knowledge graph builder, RAG knowledge bas。⭐466 · TypeScript |
| Topics | 知识图谱记忆系统RAGMCP工具Agent增强 |
| GitHub | https://github.com/swarmclawai/swarmvault |
| License | MIT |
| 语言 | TypeScript |
收录时间:2026-05-19 · 更新时间:2026-05-30 · License:MIT · AI Skill Hub 不对第三方内容的准确性作法律背书。