Back to Supermemory

Memory Graph Playground

apps/memory-graph-playground/README.md

latest1.4 KB
Original Source

Memory Graph Playground

A demo app showcasing the @supermemory/memory-graph package.

Getting Started

bash
bun install
bun dev

Open http://localhost:3000 and enter your Supermemory API key.

Usage Example

tsx
import { MemoryGraph, type DocumentWithMemories } from '@supermemory/memory-graph'

function App() {
  const [documents, setDocuments] = useState<DocumentWithMemories[]>([])

  return (
    <MemoryGraph
      documents={documents}
      isLoading={false}
      isLoadingMore={false}
      error={null}
      hasMore={false}
      loadMoreDocuments={() => {}}
      totalLoaded={documents.length}
      variant="console"
      showSpacesSelector={true}
    >
      <div>No memories found</div>
    </MemoryGraph>
  )
}

Props

PropTypeDescription
documentsDocumentWithMemories[]Array of documents to display
isLoadingbooleanInitial loading state
isLoadingMorebooleanLoading more documents state
errorError | nullError to display
hasMorebooleanWhether more documents can be loaded
loadMoreDocuments() => voidCallback to load more documents
totalLoadednumberTotal number of loaded documents
variant"default" | "console"Visual theme variant
showSpacesSelectorbooleanShow space filter dropdown