React 18+ components and hook for HyperMemory graph visualization and client access. All exports carry "use client" directives for Next.js App Router compatibility.
pnpm add @runstack-ai/hypermemory-core @runstack-ai/hypermemory-react
# For 2D visualization (optional)
pnpm add @runstack-ai/hypermemory-visualizer-core @cosmograph/cosmograph
# For 3D visualization (optional)
pnpm add @runstack-ai/hypermemory-visualizer-core 3d-force-graph three
pnpm add -D @types/threeimport { HyperMemoryProvider, HyperMemoryGraph2D, useHyperMemory } from "@runstack-ai/hypermemory-react";
function App() {
return (
<HyperMemoryProvider apiKey="hm_your_key">
<HyperMemoryGraph2D
graphId="graph:abc123"
showHyperedges={false}
onNodeClick={(node) => console.log(node)}
style={{ width: "100%", height: "600px" }}
/>
</HyperMemoryProvider>
);
}HyperMemoryProvider— React Context provider (acceptsapiKey,baseUrl,maxRetries,timeout,onRequest)HyperMemoryGraph2D— 2D Cosmograph wrapper componentHyperMemoryGraph3D— 3D Force Graph wrapper componentuseHyperMemory()— Hook returning theHyperMemoryClientinstance from context- Types:
HyperMemoryProviderProps,HyperMemoryGraph2DProps,HyperMemoryGraph3DProps
See the monorepo README.
MIT