Skip to main content
Logic Mesh extracts entity-relationship graphs from your documents, enabling powerful graph traversal and relationship-aware search. Instead of just finding documents that mention “John”, you can ask “Who reports to John?” or “What companies has John worked at?”

What is Logic Mesh?

Logic Mesh automatically extracts:
  • Entities: People, companies, products, concepts
  • Relationships: works_at, reports_to, founded, acquired, etc.
  • Properties: Attributes attached to entities

Enabling Logic Mesh

During Ingestion

For Existing Memories

Logic Mesh extraction requires an enrichment engine. Use --logic-mesh during ingestion or run memvid enrich afterward.

Graph Traversal Commands

List All Entities

Output:

Traverse Relationships

Output:

Graph Statistics

Output:

Triple Patterns

Query relationships using Subject:Predicate:Object patterns with ? as a wildcard:

CLI Usage


The real power of Logic Mesh is combining graph traversal with text search. Filter search results by relationships first, then rank by text relevance:
Combine graph traversal with vector similarity:

Common Relationship Types

Logic Mesh automatically detects common relationships:

Professional

Organizational

Technical

Temporal


SDK Usage

Python

Node.js


Advanced Patterns

Multi-Hop Queries

Find entities connected through intermediate nodes:

Compound Patterns

Combine multiple patterns:

Negation (Exclusion)

Find entities NOT matching a pattern:

Export Graph Data

N-Triples (RDF)

JSON Graph

CSV


Use Cases

Organizational Knowledge

Map your company structure:

Research Papers

Build citation and concept graphs:

Customer Data

Track customer relationships:

Code Documentation

Map code dependencies:

Performance Tips

Index Recommendations

For large graphs (1000+ entities):

Limit Traversal Depth

Deep traversals are expensive:

Filter Early

Apply graph filters before text search:

Troubleshooting

”No entities found”

  1. Ensure Logic Mesh is enabled:
  2. Run enrichment:
  3. Check stats:

“Relationship not detected”

  1. Content may be too ambiguous
  2. Try a better enrichment engine:

“Traversal too slow”

  1. Reduce hop depth
  2. Rebuild logic mesh index:

Next Steps

Memory Cards

Entity-attribute-value triples from enrichment

Entity Extraction

How entities are detected and classified