
ZettelForge
io.github.rolandpg由 GitHub 账号 rolandpg 发布v2.4.0更新于 Oct 24, 2026
Agentic memory for cyber threat intelligence. STIX graphs, actor aliasing, offline RAG, Sigma/YARA.
概览
面向网络威胁情报的本地智能体记忆系统:把分析笔记存成 STIX 知识图谱,并用自然语言检索。
- 可以做什么
- 存储与检索威胁情报笔记,自动抽取 CVE、威胁行为体、IOC 与 ATT&CK 技术,并解析行为体别名
- 查询由实体、共现关系与因果三元组构成的知识图谱,并查看记忆统计
- 跨全部已存记忆合成答案,并在记忆演化时取代过时或矛盾的情报
- 解析、校验并解释 Sigma 与 YARA 检测规则,使其标签接入同一图谱
- 与需要企业版软件包的同步后端对接
- 适用场景
- 适合希望让助手保留并查询调查上下文的团队,例如既往工单、行为体 TTP、误报模式,而不必重新阅读报告。最契合以威胁图谱思考的 CTI 与 SOC 工作流,而非通用聊天记忆。
- 运行要求
- 以本地 Python 进程运行,从 PyPI 安装(pip install zettelforge),通过 python -m zettelforge.mcp 启动。无需 API 密钥或云账号。嵌入由进程内 fastembed 完成;可选的本地 LLM(localhost 上的 Ollama 或 llama-cpp)用于合成与更丰富的抽取。数据默认存于 ~/.amem,可通过 AMEM_DATA_DIR 或 ZETTELFORGE_DATA_DIR 修改。首次运行可能下载约 80MB 模型。
安装
在 SourceWeft 中
- 打开 控制台中的 ZettelForge,将其添加到工作区。
- 为需要使用其工具的对话启用该服务。
Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。
其他 MCP 客户端
参照 仓库 中的启动说明。
README
ZettelForge
The only agentic memory system built for cyber threat intelligence.
When a senior analyst leaves, two or three years of context walks out with them — customer environments, prior investigations, actor TTPs, false-positive patterns, every hard-won "wait, we've seen this before." ZettelForge is an agentic memory system built so that context stays with the team.
It extracts CVEs, threat actors, IOCs, and ATT&CK techniques from analyst notes and threat reports, resolves aliases (APT28 = Fancy Bear = STRONTIUM = Sofacy), builds a STIX 2.1 knowledge graph, and serves every past investigation back to your analysts — and to Claude Code via MCP — in natural language. Runs entirely in-process. No API keys. No cloud. No data leaves the host.
[PyPI] [Downloads/month] [Star History] [Python 3.10+] [License: MIT] [CI] [Open Issues] [Ask DeepWiki]
Star · pip install zettelforge · Docs · ThreatRecall (hosted) · Changelog
v2.6.2 (2026-04-27): Config web editor ships with working dropdowns for all enum fields (LLM/embedding provider, log level, PII action, synthesis format) and a working Apply button. New
[crewai]extra exposes ZettelForge as CrewAI tools --pip install zettelforge[crewai]. Full changelog
[ZettelForge demo -- CTI agentic memory in action]
If ZettelForge fits a CTI workflow you run, a star is the fastest signal that this category is worth continuing to invest in.
The problem
Every SOC loses analysts. When they leave, investigation context, actor attribution, and environment-specific false-positive patterns go with them. Their replacements re-open the same tickets, re-read the same reports, and re-build the same mental models from scratch.
General-purpose AI memory systems don't fix this for security teams. They can't tell APT28 from Fancy Bear, don't know that CVE-2024-3094 is the XZ Utils backdoor, can't parse Sigma or YARA, and have no concept of MITRE ATT&CK technique IDs. When a CTI analyst gives them a year of intel reports, they get back fuzzy semantic search over chat history.
ZettelForge was built for analysts who think in threat graphs. It extracts CVEs, threat actors, IOCs, and ATT&CK techniques automatically, resolves aliases across naming conventions, builds a knowledge graph with causal relationships, and retrieves memories using intent-aware blended search -- all in-process, with no external API dependency.
Memory augmentation closes 33% of the gap between small and large models on CTI tasks (CTI-REALM, Microsoft 2026, using GPT-4 as the large-model baseline). See full benchmark report for methodology and comparisons.
Data Pipeline
Features
Entity Extraction -- Automatically identifies CVEs, threat actors, IOCs (IPs, domains, hashes, URLs, emails), MITRE ATT&CK techniques, campaigns, intrusion sets, tools, people, locations, and organizations. Regex + LLM NER with STIX 2.1 types throughout.
Knowledge Graph -- Entities become nodes, co-occurrence becomes edges. LLM infers causal triples ("APT28 uses Cobalt Strike"). Temporal edges and supersession track how intelligence evolves.
Alias Resolution -- APT28, Fancy Bear, Sofacy, STRONTIUM all resolve to the same actor node. Works automatically on store and recall.
Blended Retrieval -- Vector similarity (768-dim fastembed, ONNX) + graph traversal (BFS over knowledge graph edges), weighted by intent classification. Five intent types: factual, temporal, relational, exploratory, causal.
Memory Evolution -- With evolve=True, new intel is compared to existing memory. LLM decides ADD, UPDATE, DELETE, or NOOP. Stale intel gets superseded. Contradictions get resolved. Duplicates get skipped.
RAG Synthesis -- Synthesize answers across all stored memories with direct_answer format.
In-process by architecture -- fastembed (ONNX) for embeddings, llama-cpp-python for optional local LLM inference, SQLite + LanceDB for storage, and Ollama on localhost by default. No external API keys are required. Outbound network access may occur on first run when embedding/LLM models are downloaded; after models are preloaded, it can run fully offline (including on air-gapped hosts).
Audit logging in OCSF schema -- Every operation emits a structured event in the Open Cybersecurity Schema Framework format. What you do with the log stream (SIEM, WORM store, nothing) is up to you.
Quick Start
30-second hello world (no LLM required)
That works on a fresh pip install with no external services. Embeddings run in-process via fastembed (~80MB ONNX model downloaded on first call). MemoryManager() writes to ~/.amem/ by default; override with ZETTELFORGE_DATA_DIR or via config. A runnable copy lives at examples/quickstart.py.
Add an LLM for synthesis and richer extraction
ZettelForge auto-detects Ollama. To use a different provider (local llama-cpp, litellm for 100+ providers, mock for tests), see Configuration. Without an LLM, synthesize() still returns a structured response but the answer field is a fallback placeholder -- only remember and recall produce useful results in pip-only mode.
Memory Evolution
How It Works
Every remember() call triggers a pipeline:
- Entity Extraction -- regex + LLM NER identifies CVEs, intrusion sets, threat actors, tools, campaigns, ATT&CK techniques, IOCs (IPv4, domain, URL, MD5/SHA1/SHA256, email), people, locations, organizations, events, activities, and temporal references (19 types)
- Knowledge Graph Update -- entities become nodes, co-occurrence becomes edges, LLM infers causal triples
- Vector Embedding -- 768-dim fastembed (ONNX, in-process, 7ms/embed) stored in LanceDB
- Supersession Check -- entity overlap detection marks stale notes as superseded
- Dual-Stream Write -- fast path returns in ~45ms; causal enrichment is deferred to a background worker
Every recall() call blends two retrieval strategies:
- Vector similarity -- semantic search over embeddings
- Graph traversal -- BFS over knowledge graph edges, scored by hop distance
- Intent routing -- query classified as factual/temporal/relational/causal/exploratory, weights adjusted per type
- Cross-encoder reranking -- ms-marco-MiniLM reorders final results by relevance
Use ZettelForge in Claude Desktop in 60 seconds
Create or edit .claude.json in your project root (or ~/.claude/.claude.json for global access):
If ZettelForge is installed in a virtual environment, use the full path to that Python interpreter:
Start Claude Code and verify the tools are available:
Seven tools are exposed: zettelforge_remember, zettelforge_recall, zettelforge_synthesize, zettelforge_entity, zettelforge_graph, zettelforge_stats, and zettelforge_sync (requires enterprise package). See the MCP protocol reference for full schemas, JSON-RPC request/response examples, error codes, and the lazy-singleton lifecycle. For troubleshooting, virtualenv paths, and manual tool testing, see set-up-mcp-server.
Benchmarks
Evaluated against published academic benchmarks:
The Score column reports ZettelForge measurements run with Ollama-hosted models, with one exception: the LOCOMO row was re-measured at v2.1.1 using an Ollama cloud judge for evaluation grading (not local generation). See the full benchmark report for benchmark-specific methodology, version history, and per-suite judge configuration.
Detection Rules as Memory (Sigma + YARA)
Sigma and YARA rules are first-class memory primitives. Parse, validate, and ingest a rule and its tags become graph edges: MITRE ATT&CK techniques, CVEs, threat-actor aliases, tools, and malware families resolve against the same ontology as every other note. A shared DetectionRule supertype carries SigmaRule and YaraRule subtypes, so a single rule UUID is addressable across both formats.
Sigma rules are validated against the vendored SigmaHQ JSON schema. YARA rules are parsed with plyara and checked against the CCCS YARA metadata standard (tiers: strict, warn, non_cccs). Ingest is idempotent -- re-ingesting an unchanged rule returns the original note via a content-hashed source_ref.
An LLM rule explainer (zettelforge.detection.explainer.explain) produces a structured JSON summary -- intent, key fields, evasion notes, false-positive hypotheses -- for any DetectionRule. It runs synchronously on demand in v1; async enrichment-queue wiring is v1.1. Rate-limited via ZETTELFORGE_EXPLAIN_RPM (default 60 calls/minute).
References: Sigma spec, SigmaHQ rules, CCCS YARA, YARA docs.
Integrations
ATHF (Agentic Threat Hunting Framework)
Ingest completed ATHF hunts into ZettelForge memory. MITRE techniques and IOCs are extracted and linked in the knowledge graph.
ThreatRecall (Hosted)
ThreatRecall is the commercial distribution of ZettelForge with enterprise extensions enabled. It is offered as managed SaaS by default, with optional self-hosted on-prem and air-gapped deployments for classified environments. Enterprise add-ons:
- TypeDB STIX 2.1 backend -- schema-enforced ontology with inference rules
- OpenCTI sync -- bi-directional sync with your OpenCTI instance
- Multi-tenant auth -- OAuth/JWT with per-tenant data isolation
- Sigma rule generation -- detection rules from extracted IOCs (upcoming)
SaaS deploys in minutes with no infrastructure to maintain. Self-hosted ships as a deployable bundle for environments where outbound network egress is restricted or prohibited.
Join the waitlist -- currently onboarding design partners.
Configuration
See config.default.yaml for all options.
Contributing
See CONTRIBUTING.md for development setup.
License
MIT -- See LICENSE.
Built by Patrick Roland -- LinkedIn | Director of SOC Services, Summit 7 Systems | Navy nuclear veteran | CISSP, CCP (CMMC 2.0 Professional)
Support the Project
ZettelForge is MIT-licensed. Star the repo, open issues, and submit PRs — all contributions are welcome.
Acknowledgments
- Inspired by Zettelkasten and A-Mem (NeurIPS 2025)
- Two-phase pipeline inspired by Mem0
- STIX 2.1 schema informed by typedb-cti
- Benchmarked against LOCOMO (ACL 2024) and CTIBench (NeurIPS 2024)
- LanceDB | fastembed | Pydantic | TypeDB
来源:README.md,提交 d1484ea
工具
0版本历史
1- v2.4.0最新Sep 16, 2026
评分
已满足适用检查项的 50%
该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。
- 近 30 天内可连通25 分
请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。
- 已声明认证方式10 分
请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。
- 已列出工具15 分
请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。
- 描述必需15 分
- 图标10 分
- 文档15 分
- 许可证10 分