
Pulse8 Ai Cortex Knowledge Vault
io.github.synpulse8-opensource由 GitHub 帳號 synpulse8-opensource 發布v1.6.0更新於 Oct 24, 2026
Agent-native knowledge OS on Markdown: typed graph, hybrid search, and compiler over MCP.
概覽
讓助理透過 MCP 使用一個持久化的 Markdown 知識庫,支援型別化圖譜、混合檢索與檔案編譯。
- 可以做什麼
- Pulse8 Ai Cortex 是建構在一般 Markdown 目錄之上的代理知識層。vault_read、vault_write、vault_search、vault_link、vault_context、vault_ingest、vault_compile 等工具讓助理讀寫筆記、匯入並把原始檔案(PDF、DOCX、PPTX、XLSX、HTML、圖片)轉換為 Markdown、以關鍵字、語意或混合模式檢索,並建立排序後的上下文子圖。圖譜工具 vault_trace、vault_path、vault_impact、vault_explain 用來回答來源與變更影響問題,vault_feedback 用來記錄品質回饋。
- 適用情境
- 適合希望助理跨工作階段累積可持久、可用 Git 版本管理的知識,而不是每次重新推導的情境,也適合多個代理與人類共用同一個 Markdown 知識庫。它不適合單純的全文文件檢索、沒有圖譜的純向量檢索,或短暫無狀態的對話。
- 執行需求
- 以本機程序執行;清單列出透過 uvx 以 stdio 方式執行的 PyPI 套件,README 另描述在 8420 埠對外提供 MCP 的 Docker 部署方式。必須設定 CORTEX_VAULT_PATH(Markdown 知識庫的絕對路徑)。CORTEX_LLM_API_KEY 為選用,僅用於編譯時的 LLM 交叉參照;檔案轉換與檢索不需該金鑰。選用設定包括 LLM_BACKEND、LLM_BASE_URL、AUTH_METHOD、API_KEY、OIDC_* 與 TEAMS_WEBHOOK_URL。
安裝
在 SourceWeft 中
- 開啟 儀表板中的 Pulse8 Ai Cortex Knowledge Vault,將其新增到工作區。
- 為需要使用其工具的對話啟用該服務。
Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。
其他 MCP 客戶端
參照 儲存庫 中的啟動說明。
README
PULSE8.ai Cortex
The open-source knowledge layer for AI agents
Knowledge that compounds.
[Python] [FastAPI] [MCP] [Docker] [NetworkX]
PULSE8.ai Cortex is the open-source knowledge layer for AI agents: Git-native memory, a typed knowledge graph, and MCP-powered retrieval on top of plain Markdown — so agents can build, evolve, and reuse persistent knowledge instead of re-deriving it on every query.
Under the hood it's a unified vault for AI agents and humans, backed by a typed knowledge graph, full-text + hybrid search, and a MarkItDown-powered file compiler. Drop files in (PDF, DOCX, PPTX, XLSX, HTML, images, and more), let agents read, write, search, link, and compile knowledge — no database required.
Inspired by Andrej Karpathy's LLM Wiki pattern — a persistent, compounding knowledge base maintained by LLMs instead of re-derived on every query. Search powered by Tobi Lütke's QMD.
Why PULSE8.ai Cortex?
Most AI agents can access tools, but they cannot accumulate knowledge.
Traditional RAG systems retrieve documents. PULSE8.ai Cortex builds a persistent, evolving knowledge layer that grows over time and becomes more valuable the more agents and humans interact with it.
With PULSE8.ai Cortex, agents can:
- Learn from interactions — every read, write, ingest, and compile event is logged and graph-linked
- Build and traverse knowledge graphs — wikilinks, tags, and typed edges, maintained automatically
- Store structured insights — Markdown notes with typed nodes (
note,agent_def,session,daily,feedback) - Retrieve context across projects —
vault_contextbuilds a ranked subgraph from any seed query - Share knowledge through MCP — one vault, every MCP-compatible client
- Maintain long-term memory — files survive sessions, deployments, and model upgrades
- Version knowledge through Git — the vault is a plain directory of Markdown, diff-friendly out of the box
When to use PULSE8.ai Cortex
Ideal use cases
- ✅ Persistent memory for AI agents
- ✅ Shared knowledge across multiple agents
- ✅ Git-versioned organisational knowledge
- ✅ MCP-compatible knowledge retrieval
- ✅ Knowledge graphs without a dedicated graph database
- ✅ Long-term accumulation of institutional knowledge
- ✅ Human + AI collaborative knowledge management
Not ideal for
- ❌ Simple full-text document search (use a search engine)
- ❌ Pure vector-only retrieval with no graph (use a vector DB)
- ❌ Short-lived, stateless conversations
- ❌ Workflows that don't need persistent knowledge evolution
PULSE8.ai Cortex vs alternatives
Works with
PULSE8.ai Cortex speaks MCP — so it plugs into any AI client that does. The same vault is reachable over streamable HTTP or stdio, and mirrored 1:1 by a REST API at /api/v1/.
Because the vault is just files, humans and agents collaborate on the same knowledge — no proprietary format, no lock-in.
Get started
[!NOTE] PULSE8.ai Cortex requires Docker. An OpenRouter API key is optional — needed only for LLM-powered cross-referencing between wiki articles. File conversion works out of the box without any API key.
- Clone the repository:
- Launch PULSE8.ai Cortex:
3. Connect your MCP client (e.g. Claude Desktop) to http://localhost:8420/mcp/.
To stop: ./scripts/stop.sh
Native QMD mode (macOS / Metal GPU)
Docker Desktop on macOS cannot expose the Metal GPU to containers, so containerized QMD embeds on CPU only — over an order of magnitude slower on non-trivial vaults. Run QMD natively instead; the qmd binary uses Metal automatically:
The QMD daemon's pid and log are kept in .qmd-native.pid / .qmd-native.log. To stop both: ./scripts/stop.sh --native-qmd (a plain ./scripts/stop.sh also cleans up a native QMD if one is running).
Cortex-only mode (external QMD)
If you manage QMD yourself (already running elsewhere), start only the Cortex container:
To stop: ./scripts/stop.sh --cortex-only
GPU-accelerated QMD (EC2 / Linux with NVIDIA GPU)
For production deployments with NVIDIA GPU acceleration:
See docs/ec2-gpu-setup.md for a full guide on instance selection, NVIDIA toolkit installation, and cost estimates.
Features
Benchmarks
45.0% overall accuracy on LongMemEval-S (500 questions, full haystacks, hybrid search) with 65.6% evidence recall@8 and zero judge errors — measured end-to-end through the public REST API: ingest → compile → graph → search → answer.
Every number is reproducible from a pinned config (dataset SHA-256, models, seed) with one command:
The harness (evals/) publishes per-question JSONL traces, separates the judge model from the answer model, uses the official LongMemEval per-type grading prompts, and includes blind human validation of the judge. Full methodology, caveats, and raw results: docs/benchmarks/.
Runs without an LLM
Cortex is deterministic-first: ingestion (MarkItDown conversion), the knowledge graph (wikilinks, tags, derived_from edges), and QMD search all work with zero LLM calls. The LLM is an optional enrichment pass — cross-referencing, tagging, image captioning — not a dependency.
Pick a backend with LLM_BACKEND (env) / CORTEX_LLM_BACKEND (Python):
Air-gapped example with a local Ollama:
Or fully deterministic: LLM_BACKEND=none ./scripts/start.sh (no API key needed).
MCP resources (token-light large payloads)
PULSE8.ai Cortex implements the resources-as-tool-inputs pattern recommended by the Microsoft Copilot Studio CAT team: token-heavy tool outputs (large search result sets, full context windows) can be kept server-side and passed between tools as lightweight handles, so the LLM context window stays small.
How it works. Pass as_resource: true to vault_search or vault_context (or ?as_resource=true on GET /api/v1/search). Instead of inlining the full payload, you get a handle:
Read it back through any of the three transports:
- MCP resources protocol —
resources/readwith thecortex://resource/{id}URI (Claude Desktop, Cursor, Copilot Studio MCP). - Fallback tool —
vault_resource_readfor clients that only expose tools to the planning layer (some Copilot Studio configurations). - REST —
GET /api/v1/resources/{resource_id}(accepts the bare ID or the full URI).
The store is in-memory, asyncio-safe, TTL-evicted, and LRU-bounded:
The same ResourceStore is shared between MCP and REST — produce a handle via MCP, read it back via REST (or vice versa).
Microsoft Copilot Studio setup — agent instructions, tool selection, and the Custom Connector fallback — is documented in docs/copilot-studio.md. No Cortex code change required.
MCP tools
Architecture
Vault layout
The vault is a plain directory of Markdown files organised by purpose. Cortex classifies each file into a typed node (NodeType) used by the graph engine and exposed in REST and MCP responses.
How classification works
Order of precedence (first match wins):
- *Frontmatter
type:*— explicit override always wins (e.g.type: noteinagents/foo.mdresolves toNodeType.NOTE) - Folder prefix — files under
raw/ agents/ sessions/ daily/ feedback/inherit the folder's type with no filename suffix needed (e.g.daily/2026-06-10.md→daily) - Filename suffix (backward-compatible) —
.agent.md,.session.md,.memory.mdare still honored anywhere (e.g.wiki/legacy.agent.md→agent_def) - Default —
NodeType.NOTE
In practice this means you can drop YYYY-MM-DD.md straight into daily/, or an unsuffixed planner.md into agents/, and the graph and API will classify them correctly without any renaming.
Daily activity log
Every vault_write, vault_ingest, and successful compile event (MCP and REST paths) is automatically mirrored into today's UTC daily note at daily/YYYY-MM-DD.md. The file is created on first event of the day and each subsequent event appends a ## [HH:MM] event | summary block plus a [[wiki-stem]] wikilink (so the watcher draws a LINKS_TO edge to the affected note). The format follows the Karpathy log.md greppable-prefix pattern — grep "^## \[" daily/2026-06-10.md gives a clean timeline of the day.
Writes targeting daily/, feedback/, or .cortex/ are deliberately not mirrored (would be self-referential noise). The hidden .cortex/log.md audit log is unaffected and continues to receive every operation.
Bulk ingest
For ingesting many files at once (dozens or hundreds of PDFs, papers, docs), use the one-click shell script instead of feeding them one at a time through MCP. It reads directly from a local directory (recursively, including subfolders) — no wire overhead, no running server required — deduplicates via SHA-256 hashing, compiles with bounded concurrency, and rebuilds the index once at the end. Subpaths are preserved under the vault raw folder (e.g. source/abcde/doc.html → raw/abcde/doc.html).
One-click script (recommended)
The script automatically loads your .env for the LLM key and vault path, prints a summary, then runs the full pipeline (copy, compile, reindex). No running Cortex server needed.
Python CLI (direct)
Inside Docker
Via REST API
For programmatic use without MCP (requires running Cortex server):
Deduplication
The dedup manifest is stored at .cortex/ingest-manifest.json. Files are matched by content hash, not filename — renaming a file won't cause re-ingestion, and the same content under a different name will be skipped.
Configuration
Copy the example and fill in your values:
OPENROUTER_API_KEY and CORTEX_LLM_API_KEY are accepted as aliases for LLM_API_KEY. Variables above are set in .env (Docker reads them via Compose) and map to the CORTEX_* settings used by the app.
Authentication
Cortex supports two authentication methods that protect both the REST API (/api/v1/) and the MCP endpoint (/mcp/). Set AUTH_METHOD in .env to choose:
API Key (AUTH_METHOD=apikey)
The simplest option. Set the method and key in .env:
Clients pass it via the x-api-key header:
No OAuth discovery endpoints are served — no login popups. Requests without a valid key receive a 401.
Microsoft Entra ID (AUTH_METHOD=oidc)
For enterprise environments that require interactive login with MFA support:
This enables:
- REST API: OAuth 2.0 Authorization Code Flow via
GET /api/v1/login. After login, pass the access token asAuthorization: Bearer <token>. A validx-api-keyheader is also accepted as a fallback whenAPI_KEYis set. - MCP endpoint: FastMCP's built-in OIDCProxy handles interactive browser-based login.
Azure AD app registration
To use OIDC, register an app in the Azure Portal:
- Go to Azure Active Directory → App registrations → New registration
- Set the redirect URI to
http://localhost:8420/api/v1/auth/callback(Web platform) - Under Certificates & secrets, create a client secret
- Under API permissions, add
openid,profile, andemail(Microsoft Graph → Delegated) - Copy the Tenant ID, Client ID, and Client Secret into
.env
MCP client setup
Claude Desktop
An example config is included at [claude_desktop_config.example.json](claude_desktop_config.example.json).
HTTP with API key (recommended) — PULSE8.ai Cortex runs as a persistent server:
HTTP without auth — when no authentication is configured:
Stdio — Claude Desktop launches the server on demand (no auth needed):
Cursor
Add to your .cursor/mcp.json:
How it works
Watcher and Compiler are independent components:
- The Watcher maintains the graph. Any
.mdfile added, modified, or deleted triggers automatic node/edge updates. - The Compiler converts raw source files to Markdown using MarkItDown and writes them to
wiki/. Supported formats include PDF, DOCX, PPTX, XLSX, HTML, CSV, JSON, XML, images (EXIF/OCR), and plain text. The LLM is only used for optional cross-reference detection between articles.
They connect indirectly: the compiler writes to wiki/, the watcher picks those up and updates the graph.
Supported file formats
Search uses a two-stage pipeline:
- QMD performs keyword/semantic search on file contents
- PULSE8.ai Cortex enriches results with graph edges (wikilinks, tags, relationships between matched notes)
QMD answers "what's relevant?" — the graph answers "how are these results connected?"
Real-world use cases
Software engineering knowledge base
- Architecture Decision Records (ADRs)
- Coding standards and conventions
- Engineering handbooks and runbooks
- Platform and service documentation
- Domain-driven design models
Banking & financial services
- Product documentation
- Regulatory and compliance knowledge
- Business domain models
- Wealth management expertise
- Institutional process know-how
Enterprise knowledge management
- Internal wikis
- Project documentation and post-mortems
- Lessons learned and retrospectives
- Organisational memory
- Best practices and playbooks
AI agent memory layer
- Shared memory across agents
- Long-term reasoning context
- Knowledge accumulation across sessions
- Multi-agent collaboration on a single vault
Roadmap
Near-term
- Enhanced knowledge-graph visualisation
- Agent activity timeline
- Knowledge quality scoring
- Additional MCP integrations
Mid-term
- Multi-vault federation
- Enterprise governance and access policies
- Knowledge lineage tracking
- Cross-agent learning signals
Long-term
- Self-improving organisational memory
- Autonomous knowledge curation
- Knowledge-driven agent ecosystems
Development
Utility scripts
Data persistence
The vault directory is bind-mounted from your host into the containers. All data lives on your local disk and survives container restarts.
The QMD search index is stored in a Docker volume (qmd-cache). To force a full re-index:
Releasing
Releases are automated through GitHub Actions. Publishing a GitHub Release triggers three workflows that build and publish everything:
To cut a release:
-
Bump the version in
pyproject.tomlandserver.json(keep them in sync), updateCHANGELOG.md, and commit tomain. -
Create the GitHub Release — via the UI (Releases → "Draft a new release" → new tag
vX.Y.Z) or the CLI: -
That's it — the release event fires all three workflows.
publish-mcp.ymlwaits for PyPI to serve the new version (so themcp-nameownership marker in this README is verifiable), then publishes the server via GitHub OIDC underio.github.synpulse8-opensource/*(no token or localmcp-publisherneeded). -
Verify the registry entry once the workflow finishes:
[!IMPORTANT] PyPI versions are immutable — a version number can never be reused, even after deletion. Always increment to a new version; never re-release an existing one.
Community
We believe AI agents need a dedicated knowledge layer — not another document store. If you share that vision:
- Star the repository
- Open a discussion or issue
- Submit a pull request (see Contributing)
- Share your use cases — banking, engineering, research, or anything else
Together we can build the knowledge layer for agentic AI.
Contributing
We welcome contributions! Please open an issue to discuss your idea before submitting a pull request.
Reporting issues
Use GitHub Issues to report bugs or request features.
Acknowledgements
PULSE8.ai Cortex builds on ideas and tools from the open-source community:
- LLM Wiki by Andrej Karpathy — the core pattern of an LLM-maintained, persistent knowledge base that compiles and interlinks knowledge incrementally rather than re-discovering it from raw documents on every query. This gist is the direct inspiration for Cortex's architecture.
- QMD by Tobi Lütke — the on-device search engine powering all full-text and hybrid search in Cortex. QMD combines BM25, vector search, and LLM re-ranking, all running locally.
- MarkItDown by Microsoft — the file-to-Markdown converter powering the Cortex compiler. Converts PDF, Office documents, HTML, images, and more into structured Markdown for ingestion into the vault.
License
This project is licensed under the PULSE8.ai Cortex Open Source License (Apache License 2.0 with additional terms).
來源:README.md,提交 3d55f39
工具
0版本歷史
1- v1.6.0最新Sep 16, 2026
評分
已滿足適用檢查項的 50%
該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。
- 近 30 天內可連通25 分
請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。
- 已宣告認證方式10 分
請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。
- 已列出工具15 分
請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。
- 描述必需15 分
- 圖示10 分
- 文件15 分
- 授權條款10 分