This is a proof-of-concept server that gives LLMs structured memory through knowledge graphs. It exposes MCP tools for storing facts, learning business rules through conversation, and running logical deductions using RDFLib and SPARQL queries. You teach it by chatting naturally: tell it "Bob drives to work" and it can later propose rules like "drivers are adults" and "adults can vote" to infer new facts. Beyond the conversational mode, it includes a dashboard for extracting rules from PDFs and visualizing the knowledge graph. Works with Claude, Gemini, or any MCP client. The author marks it experimental and not production ready, but it's a solid example of neuro-symbolic architecture if you're exploring how to make LLM conversations remember and reason over structured knowledge.
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.
[!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.
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.
The result is an assistant that doesn't just sound right — it can show its reasoning.
SmartMemory turns your AI assistant into a domain expert that supports:
InferenceManager) without slowing the conversation.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.
| 💬 Conversational Mode — the "Brain" | 🏗️ Supervision Mode — the "Factory" | |
|---|---|---|
| For | Individuals using an LLM client (Claude Desktop, etc.) | Teams, developers, heavy users |
| Goal | Let your assistant remember facts and learn logic as you chat | Extract thousands of rules from documents (PDFs) and visualize the graph |
| How | Configure it as an MCP server | Deploy the full dashboard via Docker |
| Setup | Jump to setup ↓ | Jump to setup ↓ |
| I want to… | Go to |
|---|---|
| Get running in 5 minutes | Quick Start Guide |
| Try the advanced demo | Demo Procedure |
| Understand the internals | Architecture · Neuro-symbolic principles |
| Configure a provider | Configuration reference |
| Fix a problem | Troubleshooting |
| Browse all docs | Documentation index |
Gives your LLM long-term memory and logical deduction.
No Python required. The image is published on GitHub Container Registry.
Claude Desktop — edit ~/Library/Application Support/Claude/claude_desktop_config.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. ✅
Best for developers and privacy-conscious users.
git clone https://github.com/MauriceIsrael/SmartMemory
cd SmartMemory
python3 -m venv venv
source venv/bin/activate
pip install -e .
Then point Claude Desktop at your local install:
{
"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.
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.
# Dashboard mode — example with Mistral
docker 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
# 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
dashboardto start the web server; without it the container starts in MCP mode. The-vvolume persists your knowledge graph and rules. Open the dashboard athttp://localhost:8080.
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=…).
| Provider | Example models | Notes |
|---|---|---|
| Mistral | mistral-large-latest, mistral-small-latest | European, La Plateforme API |
| Ollama (local, free) | llama3, qwen2.5-coder, mistral | Runs offline |
| OpenAI | gpt-4, gpt-3.5-turbo | |
| Anthropic | claude-3-5-sonnet | |
gemini-1.5-pro |
Company_Policy.pdf).What happens in Conversational Mode:
> I know Bob
LLM: ✦ I've recorded the fact: I know Bob.
> He goes to work by car
LLM: ✦ 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"?
> yes
LLM: ✨ Rule 'drivers_are_adults' added.
May I also add "Adults can vote"?
> yes
LLM: ✨ 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.
v0.1.0)Ideas and contributions welcome — see CONTRIBUTING.md.
MIT — see LICENSE.