v0.1 — Now Open Source

The AI-Native
Knowledge Graph

Build intelligent, interactive knowledge graphs with built-in AI reasoning, physics-based layouts, and stunning 3D visualization.

$ pnpm add @inferagraph/core

Everything you need to build
intelligent knowledge graphs

A complete platform — from graph storage and AI reasoning to 3D visualization — all in one library.

Graph Engine

Typed nodes, directed edges, and lightning-fast traversal with built-in indexing.

const store = new GraphStore();

store.addNode('abraham', {
  name: 'Abraham',
  type: 'person',
  gender: 'male',
  era: 'patriarchs',
});

store.addEdge('e1', 'abraham', 'isaac', {
  type: 'father_of',
});

AI Reasoning

Ask natural language questions about your graph. Built-in context building extracts relevant subgraphs and feeds them to any LLM provider.

Query

"Who are the descendants of Abraham?"

3D Visualization

WebGL-powered rendering with Three.js. Force-directed and hierarchical layouts with smooth physics simulation.

Three.js Barnes-Hut WebGL

Plugin System

Extend with custom layouts, LLM providers, renderers, and data sources. First-class plugin API with full type safety.

Search Engine

Relevance-scored full-text search across names, aliases, tags, and content. Filter by type, era, gender, or custom predicates.

name: 10 alias: 3 tag: 2 content: 1

Physics Simulation

Barnes-Hut O(n log n) force calculation, spring attraction, Coulomb repulsion, and damping — all in 3D.

Barnes-Hut

N-body via octree

Spring Force

Hooke's law attraction

Coulomb Force

Electrostatic repulsion

Damping

Velocity decay

React Integration

Drop-in component, context provider, and useInferaGraph hook. Load data, query AI, and render — all with familiar React patterns.

Streaming AI

Real-time token-by-token streaming from any LLM provider. AsyncIterable API with text, done, and error chunks.

Serialization

Versioned JSON serialization with toJSON/fromJSON. Export and import entire graphs with full metadata.

Temporal Navigation

Define custom eras and filter nodes through time. Configurable timeline with era transitions showing appearing and disappearing nodes.

Semantic Clustering

Louvain-inspired community detection. Automatic grouping by edge density with expand/collapse and convex hull boundaries.

Export

Export graphs as PNG, SVG, or JSON. Selection-aware export with configurable resolution and metadata options.

PNG SVG JSON

Pluggable AI

Swap LLM providers without changing application code. Natural language queries, graph-aware context injection, and real-time streaming — all through a unified API.

Anthropic
OpenAI
Azure Foundry
Custom Provider

Interactive Controls

Keyboard navigation with Tab/Arrow keys, multi-select with Shift/Ctrl+click and drag-box, and a synced minimap overview.

Keyboard Nav

ARIA accessible

Multi-Select

Batch operations

Minimap

Click-to-navigate

Intuitive API.
Powerful results.

Load your graph data, ask questions in natural language, and visualize the results — all in a few lines of code.

  • Typed nodes and edges with full TypeScript support
  • BFS traversal, pathfinding, and subgraph extraction
  • DataAdapter interface for any backend — REST, GraphQL, or direct DB
  • Pre-built datasources for Gremlin, Cosmos DB, and SQL
  • Streaming AI with async iterables and real-time token output
  • Incremental data loading with accumulating cache
import { GraphProvider, InferaGraph,
  useInferaGraph } from '@inferagraph/core';
import { SqlDatasource } from '@inferagraph/sql-datasource';

// Connect to any database
const ds = new SqlDatasource({
  dialect: 'postgres',
  connection: process.env.DATABASE_URL,
});
await ds.connect();

function App() {
  return (
    <GraphProvider adapter={ds}>
      <Explorer />
    </GraphProvider>
  );
}

function Explorer() {
  const { expandNode, search, isReady } =
    useInferaGraph();

  // Expand neighbors on click (accumulating cache)
  const handleClick = async (id: string) => {
    await expandNode(id, 2);
  };

  if (!isReady) return <Loading />;
  return <InferaGraph onNodeClick={handleClick} />;
}

Bring your own LLM

First-class support for the leading AI providers. Swap models with a single line.

A

Anthropic

Claude models

@inferagraph/anthropic-provider
O

OpenAI

GPT models

@inferagraph/openai-provider
Az

Azure Foundry

Any deployed model

@inferagraph/azure-foundry-provider

Load data your way

Pass data directly for static sites and prototypes, or connect to a database with pre-built datasource packages. You can also implement the DataAdapter interface for any custom backend.

Static Data

No server required

@inferagraph/core
G

Gremlin

Apache TinkerPop

@inferagraph/gremlin-datasource
C

Cosmos DB

Azure NoSQL

@inferagraph/cosmosdb-datasource
S

SQL

Postgres, MySQL, SQLite

@inferagraph/sql-datasource

Open source.
Free forever.

InferaGraph is MIT licensed. Use it in personal projects, commercial products, or anything in between.