MemNexus
Reference

Data Model

Graph schema — nodes, relationships, and properties in MemNexus.

MemNexus stores all data in a Neo4j graph database. Understanding the graph schema helps you write better queries and build more effective integrations.

Node types

Memory

The fundamental unit of storage.

PropertyTypeDescription
idUUIDUnique identifier
contentstringThe memory content
memoryTypestringType (default: episodic)
importancefloat0-1 significance score
embeddingfloat[]1536-dimension OpenAI vector
createdAtdatetimeWhen the memory was created
updatedAtdatetimeWhen last modified

Conversation

Groups related memories into logical sessions.

PropertyTypeDescription
idUUIDUnique identifier
titlestringConversation title
createdAtdatetimeWhen started
updatedAtdatetimeWhen last memory was added

Topic

Labels that emerge from memories for categorization.

PropertyTypeDescription
idUUIDUnique identifier
namestringTopic name
embeddingfloat[]Topic vector for similarity

Fact

Structured knowledge as subject-predicate-object triples.

PropertyTypeDescription
idUUIDUnique identifier
subjectstringFact subject
predicatestringRelationship type
objectstringFact object
confidencefloat0-1 confidence score

Entity

People, tools, projects, and concepts that appear across memories.

PropertyTypeDescription
idUUIDUnique identifier
namestringEntity name
typestringEntity type (person, tool, project, concept)

Community

Groups of related topics detected via graph algorithms.

PropertyTypeDescription
idUUIDUnique identifier
namestringCommunity name
algorithmstringDetection algorithm used

Relationships

Memory  ──[HAS_TOPIC]──────→ Topic
Memory  ──[MENTIONS]────────→ Entity
Memory  ──[BELONGS_TO]──────→ Conversation
Memory  ──[RELATED_TO]──────→ Memory
Fact    ──[ABOUT]───────────→ Entity
Fact    ──[HAS_SUBJECT]─────→ Entity
Fact    ──[HAS_OBJECT]──────→ Entity
Topic   ──[RELATED_TO]──────→ Topic
Topic   ──[BELONGS_TO]──────→ Community
Entity  ──[RELATED_TO]──────→ Entity

Indexes

Vector indexes

MemNexus creates vector indexes on Memory.embedding for semantic search using cosine similarity. Embeddings are generated using OpenAI's text-embedding-3-small model (1536 dimensions).

Full-text indexes

Full-text indexes are maintained on Memory.content for keyword search. These support the keyword component of hybrid search.

Standard indexes

Standard B-tree indexes on:

  • Memory.id, Memory.createdAt
  • Conversation.id
  • Topic.id, Topic.name
  • Fact.id
  • Entity.id, Entity.name

Search pipeline

When you search, MemNexus runs:

  1. Semantic search — Embeds your query, finds nearest neighbors in vector space
  2. Keyword search — Full-text search across memory content
  3. Reciprocal Rank Fusion — Merges and re-ranks results from both searches

This hybrid approach means both "that deployment issue" (semantic) and "ECONNREFUSED" (keyword) return relevant results.