SmartMemory

io.github.MauriceIsrael由 GitHub 帳號 MauriceIsrael 發布v1.0.1更新於 Nov 3, 2026

Neuro-symbolic memory for LLMs (POC)

發布方自己的服務:Memory.fit

已驗證STDIO僅桌面知識與記憶AI 與機器學習

概覽

AI 產生的概覽

實驗性神經符號記憶伺服器,把對話中的事實存進 RDF 知識圖譜,並以 SPARQL/OWL 規則推導出可追溯的結論。

可以做什麼
  • 把對話中陳述的事實存進具來源紀錄、可稽核的 RDF 知識圖譜
  • 學習並套用 SPARQL/OWL 規則,在背景推導出新結論
  • 對含糊的事實或擬新增的規則,先請使用者確認再寫入
  • 從自然語言擷取事實與規則,支援複雜句、指代與 Turtle 寫法
  • 另提供儀表板模式,可視覺化圖譜並批次審核從 PDF 擷取的規則
適用情境
適合希望助理長期記住事實、並能說明推理依據的情境,也適合試驗神經符號推理與規則學習。專案自稱為概念驗證,宜用於研究與學習,而非正式環境。
執行需求
以 stdio 在本機執行,可用 Docker 映像,或從原始碼安裝(需 Python 3.11+ 與 pip)。擷取事實與規則需要 LLM 供應商:託管服務的 API 金鑰(如 LLM_API_KEY,搭配 LLM_PROVIDER、LLM_MODEL),或透過 LLM_BASE_URL 連線本機 Ollama。儀表板模式另會開放 Web 連接埠,並需掛載磁碟區以保存圖譜。
安裝前請注意
專案明確標示為概念驗證,不適合正式環境使用。對話內容與上傳的文件會送往所設定的 LLM 供應商進行擷取,敏感內容宜改用本機模型。伺服器會把事實與規則寫入知識圖譜,並可在你核准後新增規則;儀表板模式會開放 Web 連接埠,資料存放在掛載的磁碟區中。

安裝

在 SourceWeft 中

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

Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。

其他 MCP 客戶端

參照 儲存庫 中的啟動說明。

README

🧠 SmartMemory

Give your LLM structured, verifiable memory — turn conversations into knowledge graphs your AI can reason over.

An MCP server that teaches AI assistants business rules through natural dialogue.

[License: MIT] [Python 3.11+] [Model Context Protocol] [Neuro-symbolic] [Status: PoC] [PRs welcome]

[!CAUTION] Proof of Concept. SmartMemory is an experimental implementation of a neuro-symbolic architecture, built to explore how LLMs can interact with knowledge graphs to learn and apply rules. It is not intended for production use — treat it as a research and learning playground.


Why SmartMemory?

LLMs are brilliant talkers with no real memory. Across a conversation they forget, they can't explain why they concluded something, and they happily state things that were never verified.

SmartMemory adds the missing half: a symbolic brain.

  • Facts you state are stored in an auditable knowledge graph (RDF), each with its provenance.
  • Logic is captured as explicit, inspectable rules (SPARQL/OWL) — not hidden in weights.
  • New conclusions are derived, traceable, and reversible — and ambiguous ones are sent back to you for validation.

The result is an assistant that doesn't just sound right — it can show its reasoning.


What it can do

SmartMemory turns your AI assistant into a domain expert that supports:

  • Asynchronous reasoning — deductions run in the background (InferenceManager) without slowing the conversation.
  • Uncertainty handling — ambiguous facts trigger a human-in-the-loop validation workflow.
  • Smart NLP extraction — handles complex sentences, coreferences, and direct Turtle notation.
  • Provenance & audit — every stored fact keeps its origin (UUID, source, timestamp).
  • Dynamic rule engine — learns and applies new SPARQL rules on the fly.

How it works

mermaid
flowchart LR    A["Natural-language<br/>conversation"] -->|LLM extraction| B["Facts"]    B --> C[("Knowledge Graph<br/>RDF / Turtle")]    C -->|SPARQL / OWL rules| D["Inference engine"]    D -->|new deductions| C    D -->|ambiguous?| E["Human-in-the-loop<br/>validation"]    E -->|approve rule / fact| C    C -->|provenance + audit| F["Verifiable answers"]

The LLM is the language cortex (understanding and extraction); the knowledge graph and rule engine are the symbolic memory (storage, logic, proof). Neither alone is enough — together they are neuro-symbolic.


Two ways to use it

💬 Conversational Mode — the "Brain"🏗️ Supervision Mode — the "Factory"
ForIndividuals using an LLM client (Claude Desktop, etc.)Teams, developers, heavy users
GoalLet your assistant remember facts and learn logic as you chatExtract thousands of rules from documents (PDFs) and visualize the graph
HowConfigure it as an MCP serverDeploy the full dashboard via Docker
SetupJump to setup ↓Jump to setup ↓

Quick start

I want to…Go to
Get running in 5 minutesQuick Start Guide
Try the advanced demoDemo Procedure
Understand the internalsArchitecture · Neuro-symbolic principles
Configure a providerConfiguration reference
Fix a problemTroubleshooting
Browse all docsDocumentation index

Mode 1 — Conversational Setup (MCP)

Gives your LLM long-term memory and logical deduction.

Option A — Docker (recommended) 🐳

No Python required. The image is published on GitHub Container Registry.

Claude Desktop — edit ~/Library/Application Support/Claude/claude_desktop_config.json:

json
{  "mcpServers": {    "smart-memory": {      "command": "docker",      "args": ["run", "--rm", "-i", "ghcr.io/mauriceisrael/smart-memory:latest"]    }  }}

The same block works for any MCP client (e.g. Cline) — just point it at your client's mcp_settings.json. Restart the client and you're done. ✅

Option B — Local server (from source) 🔒

Best for developers and privacy-conscious users.

bash
git clone https://github.com/MauriceIsrael/SmartMemorycd SmartMemorypython3 -m venv venvsource venv/bin/activatepip install -e .

Then point Claude Desktop at your local install:

json
{  "mcpServers": {    "smartmemory": {      "command": "/absolute/path/to/SmartMemory/venv/bin/python",      "args": ["-m", "smart_memory.server"]    }  }}

Restart Claude and try: "I know Bob. He goes to work by car. Can he vote?" — see the demo below.


Mode 2 — Supervision Setup (Docker)

Runs the web dashboard and API server — ideal for visualizing the knowledge graph, extracting rules from PDFs, and hosting a shared memory for a team.

bash
# Dashboard mode — example with Mistraldocker run -p 8080:8080 \  -e LLM_PROVIDER=mistral \  -e LLM_MODEL=mistral-large-latest \  -e LLM_API_KEY=your-api-key \  -v $(pwd)/brain:/app/data \  ghcr.io/mauriceisrael/smart-memory:latest dashboard
bash
# Dashboard mode — example with a local model (Ollama)docker run -p 8080:8080 \  -e LLM_PROVIDER=ollama \  -e LLM_MODEL=llama3 \  -e LLM_BASE_URL=http://172.17.0.1:11434 \  -v $(pwd)/brain:/app/data \  ghcr.io/mauriceisrael/smart-memory:latest dashboard

Add dashboard to start the web server; without it the container starts in MCP mode. The -v volume persists your knowledge graph and rules. Open the dashboard at http://localhost:8080.


LLM configuration

SmartMemory uses an LLM to extract facts and rules from natural language and documents. Configure it via the dashboard Admin page or via environment variables (-e LLM_PROVIDER=…).

ProviderExample modelsNotes
Mistralmistral-large-latest, mistral-small-latestEuropean, La Plateforme API
Ollama (local, free)llama3, qwen2.5-coder, mistralRuns offline
OpenAIgpt-4, gpt-3.5-turbo
Anthropicclaude-3-5-sonnet
Googlegemini-1.5-pro

→ Full configuration guide

Extracting rules from documents

  1. Upload a PDF (e.g. Company_Policy.pdf).
  2. Pick a provider — the server needs an API key (or a local Ollama) to read the document.
  3. Review & approve — the system proposes rules; you accept them in bulk from the dashboard.

Interactive demo — from facts to rules

What happens in Conversational Mode:

text
> I know BobLLM: ✦ I've recorded the fact: I know Bob.
> He goes to work by carLLM: ✦ Noted: Bob goes to work by car.
> Can Bob vote?LLM: ✦ I can't conclude yet — but since he drives, he is likely an adult.     May I add the rule "Drivers are adults"?
> yesLLM: ✨ Rule 'drivers_are_adults' added.     May I also add "Adults can vote"?
> yesLLM: ✨ Rule 'adults_can_vote' added.     ✦ Therefore, yes — Bob can vote. (derived from 2 rules)

Every step is stored, attributed, and replayable — that's the point.


Tech stack

  • Backend: Python 3.11+, RDFLib, FastAPI
  • Frontend: SvelteKit, TypeScript, TailwindCSS
  • Reasoning: Neuro-symbolic (LLM + SPARQL / OWL)
  • Protocol: Model Context Protocol (MCP)
  • Packaging & deploy: Docker, GitHub Container Registry, Google Cloud Run

Roadmap

  • Broaden document ingestion (DOCX, HTML, web pages)
  • Richer graph visualization and rule-conflict detection
  • First tagged release (v0.1.0)

Ideas and contributions welcome — see CONTRIBUTING.md.


License

MIT — see LICENSE.

來源:README.md,提交 f4a650c

工具

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

版本歷史

1
  1. v1.0.1最新Sep 16, 2026

評分

已滿足適用檢查項的 50%

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

  • 近 30 天內可連通25 分

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

  • 已宣告認證方式10 分

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

  • 已列出工具15 分

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

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

其他 Memory 整合