Neo4j Memory Store
When to use
- You learn a new fact about a person, company, project, or topic
- The user tells you something they want you to remember
- You encounter a named entity (person, place, event, organization) worth tracking
- You make an observation about a pattern, preference, or relationship
- You want to record a relationship between two entities (e.g., "Alice works at Acme")
What you can store
Entities (POLE+O model)
Store structured entities with typed relationships:
- Person: People, contacts, team members
- Organization: Companies, teams, groups
- Location: Places, offices, cities, countries
- Event: Meetings, milestones, incidents, dates
- Object: Projects, documents, tools, concepts, books, articles — anything else
Observations
Store unstructured observations about an entity — notes, impressions, or context that doesn't fit a structured property.
Messages
Store conversation messages for short-term memory within a session.
Workflow
Preferred native tools
Use the built-in Neo4j-backed OpenClaw tools first:
- Run
memory_store for normal writes
- Use
reasoning_trace for provenance or audit events
- Fall back to the bridge HTTP examples below only when you explicitly need the raw API
Storing an entity
- Identify the entity type (Person, Organization, Location, Event, or Object)
- Extract properties (name is required; add role, description, etc. as available)
- Identify relationships to other entities
- Prefer
memory_store; use the bridge endpoint below as a low-level fallback:
curl -s -X POST http://localhost:7575/memory/store \
-H "Content-Type: application/json" \
-d '{
"type": "entity",
"data": {
"label": "Person",
"properties": {
"name": "Sarah Kim",
"role": "Product Manager",
"company": "Acme Corp"
},
"relationships": [
{
"type": "WORKS_AT",
"targetLabel": "Organization",
"targetName": "Acme Corp"
}
]
},
"session_id": "current-session-id",
"channel": "telegram"
}'
Storing an observation
curl -s -X POST http://localhost:7575/memory/store \
-H "Content-Type: application/json" \
-d '{
"type": "observation",
"data": {
"content": "Prefers async communication over meetings",
"subject": "Sarah Kim"
},
"session_id": "current-session-id"
}'
Storing a message
curl -s -X POST http://localhost:7575/memory/store \
-H "Content-Type: application/json" \
-d '{
"type": "message",
"data": {
"role": "user",
"content": "Can you look into the Q3 roadmap?"
},
"session_id": "current-session-id",
"channel": "slack"
}'
Common relationship types
Use these relationship types to connect entities:
| Relationship |
Between |
Example |
WORKS_AT |
Person → Organization |
Alice works at Acme |
AUTHORED_BY |
Object → Person |
Book authored by Camille |
LOCATED_IN |
Location → Location |
Office in San Francisco |
PARTICIPATED_IN |
Person → Event |
Bob attended ProductConf |
RELATED_TO |
Any → Any |
Project related to concept |
REFERENCES |
Object → Object |
Article references paper |
DEPENDS_ON |
Object → Object |
Service depends on database |
OWNS |
Person → Object |
Alice owns the auth module |
KNOWS |
Person → Person |
Alice knows Bob |
DISCUSSED |
Event → Object |
Meeting discussed roadmap |
MEMBER_OF |
Person → Organization |
Alice is member of Platform team |
Response format
{
"status": "stored",
"node_id": "entity-sarah-kim-a1b2c3",
"merged": false
}
merged: true means an existing entity was updated (not duplicated)
merged: false means a new entity was created
Guidelines
- Always use the person's full name when known
- Prefer the native
memory_store tool when available so the model stays inside the standard OpenClaw tool loop
- Include the
session_id to enable cross-session tracking
- Include the
channel to enable cross-channel memory
- Store relationships at creation time — don't create orphan entities
- Prefer specific relationship types over generic
RELATED_TO
- When the same entity appears with different names (e.g., "Sarah", "Sarah Kim"), store under the most complete name
1---2name: neo4j-memory-store3description: Store facts, entities, and observations as graph nodes in Neo4j. Use whenever you learn a new fact about a person, organization, project, location, event, or concept that should persist across sessions.4---56# Neo4j Memory Store78## When to use910- You learn a new fact about a person, company, project, or topic11- The user tells you something they want you to remember12- You encounter a named entity (person, place, event, organization) worth tracking13- You make an observation about a pattern, preference, or relationship14- You want to record a relationship between two entities (e.g., "Alice works at Acme")1516## What you can store1718### Entities (POLE+O model)1920Store structured entities with typed relationships:2122- **Person**: People, contacts, team members23- **Organization**: Companies, teams, groups24- **Location**: Places, offices, cities, countries25- **Event**: Meetings, milestones, incidents, dates26- **Object**: Projects, documents, tools, concepts, books, articles — anything else2728### Observations2930Store unstructured observations about an entity — notes, impressions, or context that doesn't fit a structured property.3132### Messages3334Store conversation messages for short-term memory within a session.3536## Workflow3738### Preferred native tools3940Use the built-in Neo4j-backed OpenClaw tools first:41421. Run `memory_store` for normal writes432. Use `reasoning_trace` for provenance or audit events443. Fall back to the bridge HTTP examples below only when you explicitly need the raw API4546### Storing an entity47481. Identify the entity type (Person, Organization, Location, Event, or Object)492. Extract properties (name is required; add role, description, etc. as available)503. Identify relationships to other entities514. Prefer `memory_store`; use the bridge endpoint below as a low-level fallback:5253```bash54curl -s -X POST http://localhost:7575/memory/store \55 -H "Content-Type: application/json" \56 -d '{57 "type": "entity",58 "data": {59 "label": "Person",60 "properties": {61 "name": "Sarah Kim",62 "role": "Product Manager",63 "company": "Acme Corp"64 },65 "relationships": [66 {67 "type": "WORKS_AT",68 "targetLabel": "Organization",69 "targetName": "Acme Corp"70 }71 ]72 },73 "session_id": "current-session-id",74 "channel": "telegram"75 }'76```7778### Storing an observation7980```bash81curl -s -X POST http://localhost:7575/memory/store \82 -H "Content-Type: application/json" \83 -d '{84 "type": "observation",85 "data": {86 "content": "Prefers async communication over meetings",87 "subject": "Sarah Kim"88 },89 "session_id": "current-session-id"90 }'91```9293### Storing a message9495```bash96curl -s -X POST http://localhost:7575/memory/store \97 -H "Content-Type: application/json" \98 -d '{99 "type": "message",100 "data": {101 "role": "user",102 "content": "Can you look into the Q3 roadmap?"103 },104 "session_id": "current-session-id",105 "channel": "slack"106 }'107```108109## Common relationship types110111Use these relationship types to connect entities:112113| Relationship | Between | Example |114|---|---|---|115| `WORKS_AT` | Person → Organization | Alice works at Acme |116| `AUTHORED_BY` | Object → Person | Book authored by Camille |117| `LOCATED_IN` | Location → Location | Office in San Francisco |118| `PARTICIPATED_IN` | Person → Event | Bob attended ProductConf |119| `RELATED_TO` | Any → Any | Project related to concept |120| `REFERENCES` | Object → Object | Article references paper |121| `DEPENDS_ON` | Object → Object | Service depends on database |122| `OWNS` | Person → Object | Alice owns the auth module |123| `KNOWS` | Person → Person | Alice knows Bob |124| `DISCUSSED` | Event → Object | Meeting discussed roadmap |125| `MEMBER_OF` | Person → Organization | Alice is member of Platform team |126127## Response format128129```json130{131 "status": "stored",132 "node_id": "entity-sarah-kim-a1b2c3",133 "merged": false134}135```136137- `merged: true` means an existing entity was updated (not duplicated)138- `merged: false` means a new entity was created139140## Guidelines141142- Always use the person's full name when known143- Prefer the native `memory_store` tool when available so the model stays inside the standard OpenClaw tool loop144- Include the `session_id` to enable cross-session tracking145- Include the `channel` to enable cross-channel memory146- Store relationships at creation time — don't create orphan entities147- Prefer specific relationship types over generic `RELATED_TO`148- When the same entity appears with different names (e.g., "Sarah", "Sarah Kim"), store under the most complete name