Xpersona
G

Graph-RAG Memory

CLAWHUB · Unverified

Graph-RAG memory system using Graphiti temporal knowledge graph + FalkorDB + local Ollama embeddings. Provides persistent, queryable long-term memory for Ope... Skill: Graph-RAG Memory Owner: jebadiahgreenwood Summary: Graph-RAG memory system using Graphiti temporal knowledge graph + FalkorDB + local Ollama embeddings. Provides persistent, queryable long-term memory for Ope... Tags: embeddings:0.1.0, falkordb:0.1.0, graphiti:0.1.0, knowledge-graph:0.1.0, latest:0.1.0, local-llm:0.1.0, memory:0.1.0, moe:0.1.0, ollama:0.1.0, rag:0.1.0 Version history: v0.1.0 | 2026-04-04T06:01

62
Rank
84
Safety
1.3k
Downloads

About

What it does, and when to use it.

Capability contract not published. No trust telemetry is available yet. 1.3K downloads reported by the source. Last updated 10/10/2026.

Avoid when

  • Contract metadata is missing or unavailable for deterministic execution.

Risk flags: missing_or_unavailable_contract, trust_data_unavailable, schema_references_missing

Install and run

Setup complexity: low.

clawhub skill install s17bh8m9277z972vjc6bexqxqd845pmx:graph-rag-memory
  1. Setup complexity is LOW. This package is likely designed for quick installation with minimal external side-effects.
  2. Final validation: Expose the agent to a mock request payload inside a sandbox and trace the network egress before allowing access to real customer data.

Contract: missing

curl -s "https://www.xpersona.co/api/v1/agents/clawhub-jebadiahgreenwood-graph-rag-memory/snapshot"

Run-check

$0.02 USD

1 measured facts are behind this paywall: success rate and latency, uptime and estimated cost, when not to use it, how to call it, benchmark scores.

Agents pay $0.02 in USDC. A card payment is $0.50, the smallest a card allows.

Documentation

CLAWHUB

22,455 characters of source documentation, loaded on request.

Extracted files

5 files captured from the source.

SKILL.md

---
name: graph-rag-memory
description: >
  Graph-RAG memory system using Graphiti temporal knowledge graph + FalkorDB + local Ollama
  embeddings. Provides persistent, queryable long-term memory for OpenClaw agents via a
  MoE-style (Mixture-of-Experts) multi-embedding router. Use when: setting up persistent
  agent memory, querying past conversations or facts, ingesting documents into the memory
  graph, checking memory system status, or integrating graph-rag memory into an OpenClaw
  agent. Triggers on: "memory system", "graph rag", "graphiti", "persistent memory",
  "ingest memory", "query memory", "what do you remember", "memory upgrade".
---

# Graph-RAG Memory Skill

Persistent, queryable agent memory via a temporal knowledge graph. Facts are extracted from
episodes (conversations, documents, notes), stored as typed entities and relationships in
FalkorDB, and retrieved via hybrid BM25 + cosine similarity search with domain-expert routing.

## Architecture Overview

```
Write path:  content → DomainRouter → expert embedder → Graphiti.add_episode()
                                             ↓
                                      FalkorDB (workspace graph)
                                      39+ nodes, 73+ RELATES_TO edges
                                      fact_embedding: 768-dim cosine index

Read path:   query → DomainRouter → expert embedder → query_vector
                                             ↓
                                    graphiti_search() [BM25 + cosine RRF]
                                             ↓
                                    ranked EntityEdge objects with .fact
```

**Routing layers:**
1. Hard routing (metadata/source_type → domain, confidence=1.0)
2. Centroid routing (cosine similarity to domain centroids, threshold=0.02)
3. Fanout fallback (parallel expert queries + RRF fusion)

**Domains:** `personal`, `episodic`, `project`, `technical`, `research`, `meta`, `general`

## Prerequisites

See `references/setup.md` for full installation and environment details.

**Quick check:**
```python
# Verify services (write to a temp script, don't use python3 -c inline)
import falkordb, httpx
r = falkordb.FalkorDB(host='172.18.0.1', port=6379)
print("FalkorDB OK:", r.list_graphs())
# nomic-embed-text must be loaded on NVIDIA Ollama
```

**Python packages** (reinstall after container restart — ephemeral layer):
```bash
export PATH=$PATH:/home/node/.local/bin
curl -sS https://bootstrap.pypa.io/get-pip.py -o /tmp/get-pip.py
python3 /tmp/get-pip.py --user --break-system-packages
pip3 install --user --break-system-packages graphiti-core falkordb sentence-transformers
```

## File Layout

All skill scripts live at: `memory-upgrade/` (workspace root)

```
memory-upgrade/
  config.py             # Service URLs + model names
  embedder.py           # OllamaEmbedderClient + expert registry
  router.py             # DomainRouter (hard + centroid + fanout)
  setup_graphiti.py     # Graphiti factory (defaults to 'workspace'

_meta.json

{
  "ownerId": "kn7ah7d2dkvnd5jwt3c1dy8gy9845j32",
  "slug": "graph-rag-memory",
  "version": "0.1.0",
  "publishedAt": 1775282482801
}

references/clawhub.md

# Publishing to ClawHub

## Packaging the Skill

From the workspace root:
```bash
python3 /app/skills/skill-creator/scripts/package_skill.py \
  skills/public/graph-rag-memory \
  skills/dist/
```

This creates `skills/dist/graph-rag-memory.skill` — a validated zip archive ready for distribution.

## ClawHub Submission

1. Go to https://clawhub.ai
2. Create an account / log in
3. Upload `graph-rag-memory.skill`
4. Fill in the listing:

**Name:** `graph-rag-memory`

**Tagline:** Persistent temporal knowledge graph memory for OpenClaw agents

**Description:**
> Gives your OpenClaw agent persistent, queryable long-term memory using a Graphiti temporal
> knowledge graph backed by FalkorDB. Facts are extracted from conversations and documents via
> a local LLM (Ollama), stored as typed entities and relationships, and retrieved via hybrid
> BM25 + cosine similarity search with domain-expert routing.
>
> Inspired by RouterRetriever (AAAI 2025): routes queries to domain-specialized embedding
> models (personal, technical, research, project, episodic) for better retrieval precision
> than single-model RAG systems.

**Tags:** `memory`, `rag`, `graphiti`, `falkordb`, `ollama`, `knowledge-graph`, `local-llm`

**Requirements:**
- FalkorDB instance (Docker: `docker run -d -p 6379:6379 falkordb/falkordb`)
- Ollama with `nomic-embed-text` loaded
- Ollama with an instruction model for entity extraction (gemma4:e4b recommended)
- Python 3.11+

**GitHub:** https://github.com/jebadiahgreenwood/openclaw-workspace

## Versioning

Follow semver: `MAJOR.MINOR.PATCH`
- **0.1.0** — Initial release (BM25 + vector hybrid, 6-domain routing, FalkorDB backend)
- **0.2.0** — When Graphiti fork adds multi-vector storage (mxbai-embed-large full support)
- **0.3.0** — When live write hook is integrated into OpenClaw session pipeline
- **1.0.0** — Stable API, tested on multiple deployments, ClawHub featured

## User Configuration Guide (for ClawHub README)

After installing the skill, users need to:

1. **Start FalkorDB:**
   ```bash
   docker run -d --name falkordb -p 6379:6379 falkordb/falkordb
   ```

2. **Pull embedding model:**
   ```bash
   ollama pull nomic-embed-text
   ```

3. **Pull extraction LLM** (any capable model works):
   ```bash
   ollama pull gemma4:e4b   # recommended — fast, good JSON
   # or: ollama pull llama3.2, mistral, qwen2.5, etc.
   ```

4. **Edit `memory-upgrade/config.py`** with your Ollama URL(s)

5. **First-time setup:**
   ```bash
   python3 memory-upgrade/phase3_ingest.py      # seed from your memory files
   python3 memory-upgrade/phase5_vector_index.py # create vector index
   python3 memory-upgrade/phase4_query_test.py   # validate it works
   ```

6. **Start using it** via the convenience scripts or the Python API.

references/research.md

# Research Foundations & Citations

This skill's architecture draws on several research threads, synthesized into a novel
multi-embedding retrieval system purpose-built for personal agent memory.

---

## Core Papers

### RouterRetriever — Expert Routing via Centroids
**Zhuang et al. (2025). "RouterRetriever: Exploring the Benefits of Routing over Multiple Expert Embedding Models." AAAI 2025.**
- arXiv: https://arxiv.org/abs/2409.02685

Key insight used: **Centroid-based routing outperforms learned classifier routing** for retrieval
tasks. Given domain-specialized embedding models, compute a centroid embedding for each domain
from sample documents, then route queries by cosine similarity to the nearest centroid.

This paper validated that you don't need a learned router (which requires training data and
adds complexity) — the geometric centroid of domain embeddings is a sufficient signal.

Our adaptation: Instead of LoRA adapters sharing a base encoder (RouterRetriever's setup),
we route between fully separate Ollama-hosted models. The centroid computation and routing
logic are structurally identical but applied across independent model endpoints.

---

### Graphiti — Temporal Knowledge Graph for Agents
**Rasmussen et al. (2024). "Graphiti: Temporally-Aware Knowledge Graphs for AI Agents."**
- GitHub: https://github.com/getzep/graphiti
- Blog: https://www.getzep.com/graphiti

Graphiti provides the temporal knowledge graph substrate: episode ingestion, entity/relationship
extraction (via LLM), bi-temporal edge validity, and hybrid BM25+vector search.

Our adaptation: We use Graphiti's `graphiti_search()` lower-level API to inject a
`query_vector` from our domain-routed expert embedder, bypassing Graphiti's default
single-model embedding with our MoE routing output.

---

### FalkorDB — Graph Database with Vector Index
**FalkorDB (2024). RedisGraph fork with extended vector and temporal query support.**
- GitHub: https://github.com/FalkorDB/FalkorDB

Used as the persistence and query layer. Key capabilities:
- Property graphs with Cypher query language
- FULLTEXT indexes on relationship properties (`fact`, `name`)
- VECTOR index on `fact_embedding` (768-dim cosine similarity)
- Fast in-memory execution with optional persistence

---

## Novel Contributions of This Implementation

The graph-rag-memory skill introduces several design decisions not present in existing
open-source memory systems:

### 1. MoE-Style Multi-Embedding Routing (Primary Novelty)
Most RAG systems use a single embedding model for all content. This system routes queries
and documents to **domain-specialized embedding experts** based on content type:

- `personal` / `episodic` → `nomic-embed-text` (768-dim, general conversation)
- `project` → `mxbai-embed-large` (1024-dim, structured/precise facts)
- `technical` → `nomic-embed-code` (768-dim, code and architecture)
- `research` → `specter2` (768-dim, scientific literature)

**Inspiration:** RouterRetriever's finding that domain-s

references/setup.md

# Setup & Environment Reference

## Service Requirements

| Service | Default URL | Purpose |
|---------|------------|---------|
| FalkorDB | `172.18.0.1:6379` | Graph database (temporal KG storage) |
| NVIDIA Ollama | `172.18.0.1:11436` | Embedding models (nomic-embed-text, mxbai-embed-large) |
| AMD Ollama | `172.18.0.1:11437` | LLM for entity extraction (gemma4:e4b) |

**Minimum viable**: FalkorDB + one Ollama instance with `nomic-embed-text` loaded.
The AMD/LLM endpoint is only needed for write path (entity extraction). Reads work with embeddings only.

## Python Dependencies

```bash
pip install graphiti-core falkordb sentence-transformers httpx
```

The container's `/home/node/.local` layer is ephemeral — reinstall after restart:
```bash
export PATH=$PATH:/home/node/.local/bin
curl -sS https://bootstrap.pypa.io/get-pip.py -o /tmp/get-pip.py
python3 /tmp/get-pip.py --user --break-system-packages
pip3 install --user --break-system-packages graphiti-core falkordb sentence-transformers
```

## Ollama Models

Pull these before first use:

```bash
# Embeddings (NVIDIA Ollama)
docker exec ollama-modern-gpu ollama pull nomic-embed-text
docker exec ollama-modern-gpu ollama pull mxbai-embed-large

# LLM for entity extraction (AMD Ollama — or NVIDIA if no AMD)
docker exec ollama-amd-rx6800 ollama pull gemma4:e4b

# Verify
curl -s http://172.18.0.1:11436/api/tags  # should show nomic + mxbai
curl -s http://172.18.0.1:11437/api/tags  # should show gemma4:e4b
```

If you only have one Ollama instance, set both `OLLAMA_URL` and `AMD_OLLAMA_URL`
to the same endpoint in `config.py`, and use any capable instruction-following model
for `LLM_MODEL` (e.g., `llama3.2`, `mistral`, `gemma3`).

## FalkorDB Setup

Using Docker:
```bash
docker run -d --name falkordb -p 6379:6379 falkordb/falkordb
```

Or use an existing Redis-compatible FalkorDB instance.

## First-Time Initialization

```bash
# 1. Check config.py matches your endpoints
cat memory-upgrade/config.py

# 2. Run smoke test
python3 memory-upgrade/smoke_test.py

# 3. Seed initial memories
python3 memory-upgrade/phase3_ingest.py      # MEMORY.md + daily notes
python3 memory-upgrade/phase6_full_ingest.py  # broader workspace docs

# 4. Validate read path
python3 memory-upgrade/phase4_query_test.py

# 5. Create vector index (only needed once per graph)
python3 memory-upgrade/phase5_vector_index.py
```

## Graph Names

The FalkorDB graph name equals the `group_id` passed during ingestion.
Default: `workspace`. Always use consistent `group_id` and `init_graphiti("workspace")`.

To list all graphs:
```python
import falkordb
r = falkordb.FalkorDB(host='172.18.0.1', port=6379)
print(r.list_graphs())
```

## Adapting to Different Environments

| Setting | Where to change |
|---------|----------------|
| Ollama URLs | `config.py` → `OLLAMA_URL`, `AMD_OLLAMA_URL` |
| LLM model | `config.py` → `LLM_MODEL` |
| Embedding model | `config.py` → `EMBED_GENERAL` |
| FalkorDB host/port | `config.py` → `FALKORDB_HOST`, `FALKO

Sponsored

Ads related to Graph-RAG Memory and adjacent AI workflows.