Skip to content

Commit 6cc7730

Browse files
Thomas Tupperclaude
authored andcommitted
feat(graph): add Neo4j service and graph memory env vars
Adds neo4j:5-community to all compose configurations (stack-r720.yml, compose.one.yml, compose.split.yml). Graph memory is opt-in: set NEO4J_URL + NEO4J_PASSWORD on the store service to enable; leave blank to disable (default). Ports: 7474 (browser UI), 7687 (Bolt). Volume: foxmemory_neo4j_data for persistence. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent eedd3da commit 6cc7730

5 files changed

Lines changed: 75 additions & 0 deletions

File tree

.env.example

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,3 +24,13 @@ QDRANT_COLLECTION=foxmemory
2424
# Backward-compatible fields used by some builds/scripts
2525
QDRANT_HOST=qdrant
2626
QDRANT_PORT=6333
27+
28+
# Graph memory (Neo4j) — optional.
29+
# Set NEO4J_URL + NEO4J_PASSWORD to enable. Leave blank to disable.
30+
# NEO4J_AUTH must match NEO4J_PASSWORD (format: neo4j/<password>).
31+
# MEM0_GRAPH_LLM_MODEL: recommended gpt-4o-mini (hosted) or Qwen2.5-14B-Instruct (local).
32+
NEO4J_AUTH=neo4j/changeme
33+
NEO4J_URL=bolt://neo4j:7687
34+
NEO4J_USERNAME=neo4j
35+
NEO4J_PASSWORD=changeme
36+
MEM0_GRAPH_LLM_MODEL=

compose.one.yml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,17 @@ services:
1010
- OLLAMA_CHAT_MODEL=${OLLAMA_CHAT_MODEL}
1111
- INFER_API_KEY=${INFER_API_KEY}
1212

13+
neo4j:
14+
image: neo4j:5-community
15+
container_name: foxmemory-neo4j
16+
ports:
17+
- "7474:7474" # HTTP browser UI
18+
- "7687:7687" # Bolt
19+
environment:
20+
- NEO4J_AUTH=${NEO4J_AUTH:-neo4j/changeme}
21+
volumes:
22+
- foxmemory_neo4j_data:/data
23+
1324
store:
1425
image: ${FOXMEMORY_STORE_IMAGE}
1526
container_name: foxmemory-store
@@ -28,10 +39,17 @@ services:
2839
- QDRANT_COLLECTION=${QDRANT_COLLECTION}
2940
- MEM0_HISTORY_DB_PATH=/tmp/history.db
3041
- QDRANT_STORAGE_PATH=/qdrant/storage
42+
# Graph memory — leave NEO4J_URL unset to disable
43+
- NEO4J_URL=${NEO4J_URL:-}
44+
- NEO4J_USERNAME=${NEO4J_USERNAME:-neo4j}
45+
- NEO4J_PASSWORD=${NEO4J_PASSWORD:-}
46+
- MEM0_GRAPH_LLM_MODEL=${MEM0_GRAPH_LLM_MODEL:-}
3147
volumes:
3248
- foxmemory_store_data:/qdrant/storage
3349
depends_on:
3450
- infer
51+
- neo4j
3552

3653
volumes:
3754
foxmemory_store_data:
55+
foxmemory_neo4j_data:

compose.split.yml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,16 @@ services:
1010
- OLLAMA_CHAT_MODEL=${OLLAMA_CHAT_MODEL}
1111
- INFER_API_KEY=${INFER_API_KEY}
1212

13+
neo4j:
14+
image: neo4j:5-community
15+
ports:
16+
- "7474:7474" # HTTP browser UI
17+
- "7687:7687" # Bolt
18+
environment:
19+
- NEO4J_AUTH=${NEO4J_AUTH:-neo4j/changeme}
20+
volumes:
21+
- foxmemory_neo4j_data:/data
22+
1323
store:
1424
image: ${FOXMEMORY_STORE_IMAGE}
1525
labels:
@@ -27,8 +37,16 @@ services:
2737
- QDRANT_COLLECTION=${QDRANT_COLLECTION}
2838
- MEM0_HISTORY_DB_PATH=/tmp/history.db
2939
- QDRANT_STORAGE_PATH=/qdrant/storage
40+
# Graph memory — leave NEO4J_URL unset to disable
41+
- NEO4J_URL=${NEO4J_URL:-}
42+
- NEO4J_USERNAME=${NEO4J_USERNAME:-neo4j}
43+
- NEO4J_PASSWORD=${NEO4J_PASSWORD:-}
44+
- MEM0_GRAPH_LLM_MODEL=${MEM0_GRAPH_LLM_MODEL:-}
3045
volumes:
3146
- foxmemory_store_data:/qdrant/storage
47+
depends_on:
48+
- neo4j
3249

3350
volumes:
3451
foxmemory_store_data:
52+
foxmemory_neo4j_data:

portainer/env-r720.example

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,3 +7,13 @@ FOXMEMORY_STORE_IMAGE=docker.io/foxlightfoundation/foxmemory-store:latest
77
MEM0_LLM_MODEL=gpt-4.1-nano
88
MEM0_EMBED_MODEL=text-embedding-3-small
99
QDRANT_COLLECTION=foxmemory
10+
11+
# Graph memory (Neo4j) — optional.
12+
# Set NEO4J_URL + NEO4J_PASSWORD to enable. Leave blank to disable.
13+
# NEO4J_AUTH must match NEO4J_PASSWORD (format: neo4j/<password>).
14+
# MEM0_GRAPH_LLM_MODEL: recommended gpt-4o-mini (hosted) or Qwen2.5-14B-Instruct (local).
15+
NEO4J_AUTH=neo4j/changeme
16+
NEO4J_URL=bolt://neo4j:7687
17+
NEO4J_USERNAME=neo4j
18+
NEO4J_PASSWORD=changeme
19+
MEM0_GRAPH_LLM_MODEL=gpt-4o-mini

portainer/stack-r720.yml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,18 @@ services:
1212
volumes:
1313
- foxmemory_store_data:/qdrant/storage
1414

15+
neo4j:
16+
image: neo4j:5-community
17+
container_name: foxmemory-neo4j
18+
restart: unless-stopped
19+
ports:
20+
- "7474:7474" # HTTP browser UI
21+
- "7687:7687" # Bolt (used by foxmemory-store)
22+
environment:
23+
NEO4J_AUTH: ${NEO4J_AUTH:-neo4j/changeme}
24+
volumes:
25+
- foxmemory_neo4j_data:/data
26+
1527
store:
1628
image: ${FOXMEMORY_STORE_IMAGE:-docker.io/foxlightfoundation/foxmemory-store:latest}
1729
container_name: foxmemory-store
@@ -31,8 +43,15 @@ services:
3143
QDRANT_COLLECTION: ${QDRANT_COLLECTION:-foxmemory}
3244
MEM0_HISTORY_DB_PATH: /tmp/history.db
3345
QDRANT_STORAGE_PATH: /qdrant/storage
46+
# Graph memory — leave NEO4J_URL unset to disable
47+
NEO4J_URL: ${NEO4J_URL:-}
48+
NEO4J_USERNAME: ${NEO4J_USERNAME:-neo4j}
49+
NEO4J_PASSWORD: ${NEO4J_PASSWORD:-}
50+
MEM0_GRAPH_LLM_MODEL: ${MEM0_GRAPH_LLM_MODEL:-}
3451
depends_on:
3552
- qdrant
53+
- neo4j
3654

3755
volumes:
3856
foxmemory_store_data:
57+
foxmemory_neo4j_data:

0 commit comments

Comments
 (0)