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.

已驗證STDIO僅桌面知識與記憶安全與監控

概覽

AI 產生的概覽

面向網路威脅情報的本地代理記憶系統:把分析筆記存成 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 模型。
安裝前請注意
會寫入本機資料目錄,啟用 evolve 時可能取代或刪除既有筆記,建議先備份情報資料。首次執行可能連網下載嵌入或 LLM 模型。同步工具需要付費企業版套件,託管的 ThreatRecall 為商業發行版。稽核事件會產生,但日誌去向需自行決定。

安裝

在 SourceWeft 中

  1. 開啟 儀表板中的 ZettelForge,將其新增到工作區。
  2. 為需要使用其工具的對話啟用該服務。

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.

CapabilityZettelForgeMem0GraphitiCognee
CTI entity extraction (CVEs, actors, IOCs)YesNoNoNo
STIX 2.1 ontologyYesNoNoNo
Threat actor alias resolutionYes (APT28 = Fancy Bear)NoNoNo
Knowledge graph with causal triplesYesNoYesYes
Intent-classified retrieval (5 types)YesNoNoNo
In-process / no external API requiredYesNoNoNo
Audit logs in OCSF schemaYesNoNoNo
MCP server (Claude Code)YesNoNoNo

Data Pipeline

[ZettelForge architecture -- neural recall loop: ingest, enrich, retrieve, synthesize, backed by SQLite + LanceDB]

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)

bash
pip install zettelforge
python
from zettelforge import MemoryManager
mm = MemoryManager()
# Store CTI -- entities (CVEs, actors, ATT&CK IDs, IOCs) extracted via regexmm.remember("APT28 uses Cobalt Strike for lateral movement via T1021")mm.remember("APT28 (Fancy Bear) targets NATO defense contractors with spear-phishing")mm.remember("CVE-2024-3094 is the XZ Utils backdoor (CVSS 10.0) affecting sshd")
# Recall blends vector + graph search; alias resolution kicks in (Fancy Bear -> APT28)for note in mm.recall("What tools does Fancy Bear use?", k=3):    print(f"[{note.metadata.tier}] {note.content.raw}")

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

bash
ollama pull qwen3.5:9b && ollama serve
python
# With Ollama running, synthesize() returns a real summary across stored notesanswer = mm.synthesize("Summarize known APT28 TTPs")print(answer["synthesis"]["answer"])# Background LLM NER also enriches stored notes with additional entities

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

python
# New intel arrives -- evolve=True enables memory evolution:# LLM extracts facts, compares to existing notes, decides ADD/UPDATE/DELETE/NOOPmm.remember(    "APT28 has shifted tactics. They dropped DROPBEAR and now exploit edge devices.",    domain="cti",    evolve=True,   # existing APT28 note gets superseded, not duplicated)

How It Works

Every remember() call triggers a pipeline:

  1. 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)
  2. Knowledge Graph Update -- entities become nodes, co-occurrence becomes edges, LLM infers causal triples
  3. Vector Embedding -- 768-dim fastembed (ONNX, in-process, 7ms/embed) stored in LanceDB
  4. Supersession Check -- entity overlap detection marks stale notes as superseded
  5. Dual-Stream Write -- fast path returns in ~45ms; causal enrichment is deferred to a background worker

Every recall() call blends two retrieval strategies:

  1. Vector similarity -- semantic search over embeddings
  2. Graph traversal -- BFS over knowledge graph edges, scored by hop distance
  3. Intent routing -- query classified as factual/temporal/relational/causal/exploratory, weights adjusted per type
  4. Cross-encoder reranking -- ms-marco-MiniLM reorders final results by relevance

Use ZettelForge in Claude Desktop in 60 seconds

bash
pip install zettelforge

Create or edit .claude.json in your project root (or ~/.claude/.claude.json for global access):

json
{  "mcpServers": {    "zettelforge": {      "command": "python3",      "args": ["-m", "zettelforge.mcp"]    }  }}

If ZettelForge is installed in a virtual environment, use the full path to that Python interpreter:

json
{  "mcpServers": {    "zettelforge": {      "command": "/home/user/.venvs/zettelforge/bin/python",      "args": ["-m", "zettelforge.mcp"]    }  }}

Start Claude Code and verify the tools are available:

bash
claude# Inside the session, ask: "What tools do you have available from zettelforge?"

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:

BenchmarkWhat it measuresScore
CTI Retrieval (CTIBench subset)Attribution, CVE linkage, multi-hop75.0%
RAGASRetrieval quality (keyword presence)78.1%
LOCOMO (ACL 2024)Conversational memory recall22.0%

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.

python
from zettelforge import MemoryManagerfrom zettelforge.sigma import ingest_rule as ingest_sigmafrom zettelforge.yara import ingest_rule as ingest_yara
mm = MemoryManager()ingest_sigma("rules/proc_creation_win_office_macro.yml", mm)ingest_yara("rules/webshell_china_chopper.yar", mm, tier="warn")
bash
# Bulk ingest from SigmaHQ or a private rule repopython -m zettelforge.sigma.ingest /path/to/sigma/rules/python -m zettelforge.yara.ingest /path/to/yara/rules/ --tier warn
# CI fixture check -- parse + validate, no writespython -m zettelforge.sigma.ingest rules/ --dry-run

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.

bash
python examples/athf_bridge.py /path/to/hunts/# 12 hunt(s) parsed# Ingested 12/12 hunts into ZettelForge

See examples/athf_bridge.py.

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

VariableDefaultDescription
AMEM_DATA_DIR~/.amemData directory
ZETTELFORGE_BACKENDsqliteSQLite community backend. TypeDB available via extension.
ZETTELFORGE_LLM_PROVIDERlocallocal (llama-cpp) or ollama

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

來源:README.md,提交 d1484ea

工具

0
SourceWeft 尚未在沙箱中啟動過該軟體包,因此其工具未知。

版本歷史

1
  1. v2.4.0最新Sep 16, 2026

評分

已滿足適用檢查項的 50%

該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。

  • 近 30 天內可連通25 分

    請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。

  • 已宣告認證方式10 分

    請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。

  • 已列出工具15 分

    請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。

  • 描述必需15 分
  • 圖示10 分
  • 文件15 分
  • 授權條款10 分