pnpm add @inferagraph/core

Documentation

Everything you need to build intelligent, interactive knowledge graphs.

quick-start.ts
import { GraphStore, QueryEngine } from '@inferagraph/core';

const store = new GraphStore();

store.addNode('n1', { name: 'Alice', type: 'person' });
store.addNode('n2', { name: 'Bob', type: 'person' });
store.addEdge('e1', 'n1', 'n2', { type: 'knows' });

const query = new QueryEngine(store);
const neighbors = query.getNeighbors('n1', 1);
// → ['n2']