Skip to main content
Memory Graph is a React component that visualizes your Supermemory documents and memories as an interactive network. Documents appear as rectangular nodes, memories as hexagonal nodes, and connections between them show relationships and similarity.

@supermemory/memory-graph on npm

Check out the NPM page for more details

Installation

Requirements: React 18.0.0 or higher

Quick Start

Backend API Route

Create an API route to fetch documents from Supermemory:
Never expose your Supermemory API key to the client. Always fetch data through your backend.

Variants

Console Variant - Full-featured dashboard view (0.8x zoom, space selector visible):
Consumer Variant - Embedded widget view (0.5x zoom, space selector hidden):

Examples

With Pagination

Highlighting Search Results

Controlled Space Selection

Custom Empty State


Props Reference

Core Props

Pagination Props

Display Props

Controlled State Props


Data Types

DocumentWithMemories

MemoryEntry


Exports

Components

Hooks

Constants


Performance

The graph handles hundreds of nodes efficiently through:
  • Canvas-based rendering (not DOM elements)
  • Viewport culling (only draws visible nodes)
  • Level-of-detail optimization (simplifies when zoomed out)
  • Change-based rendering (only redraws when state changes)
For very large datasets (1000+ documents), use pagination to load data in chunks.

Browser Support

Works in all modern browsers supporting Canvas 2D API, ES2020, and CSS custom properties. Tested on Chrome, Firefox, Safari, and Edge.