LiteGraph 10.3.2

There is a newer version of this package available.
See the version list below for details.
dotnet add package LiteGraph --version 10.3.2
                    
NuGet\Install-Package LiteGraph -Version 10.3.2
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="LiteGraph" Version="10.3.2" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="LiteGraph" Version="10.3.2" />
                    
Directory.Packages.props
<PackageReference Include="LiteGraph" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add LiteGraph --version 10.3.2
                    
#r "nuget: LiteGraph, 10.3.2"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package LiteGraph@10.3.2
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=LiteGraph&version=10.3.2
                    
Install as a Cake Addin
#tool nuget:?package=LiteGraph&version=10.3.2
                    
Install as a Cake Tool

<img src="https://github.com/jchristn/LiteGraph/blob/main/assets/favicon.png" width="256" height="256">

LiteGraph

NuGet Version NuGet Documentation

Current release: v10.3.2.

LiteGraph is a property graph database for applications that need graph relationships, tags, labels, JSON data, and vector search in one persistence layer. It can be embedded in a .NET process with LiteGraphClient, run as a standalone REST server, used through official SDKs, managed through the dashboard, or controlled by AI agents through the Model Context Protocol (MCP).

The v7.0.0 transaction-scaling work is now merged into main. Historical planning material lives under archive/; the files in the repository root describe the current mainline release.

What Is Included

  • Core .NET graph library targeting net8.0 and net10.0, compatible with Native AOT and trimming
  • Every executable (REST server, MCP server, lg console, load generator) runs on the .NET runtime or as a Native AOT executable, with identical behavior
  • SQLite provider for embedded, local, and test use, with in-process HNSW vector indexing through HnswLite
  • PostgreSQL provider with pgvector for production, including multi-node clusters behind a load balancer
  • Native LiteGraph graph query language for reads, traversals, vector search, and graph mutations
  • Graph algorithms (centrality, PageRank, connected components, community detection) with write-back and a rustworkx/NetworkX export-compute-import path
  • Graph-scoped transactions for nodes, edges, labels, tags, and vectors
  • Vector search: pgvector HNSW in the database on PostgreSQL, HnswLite 2.1.0 in process on SQLite
  • REST server with bearer-token authentication, request history, RBAC, and OpenAPI/Postman assets
  • LLM chat over graph data with five provider types, SSE streaming, an in-process graph tool loop, and vector retrieval
  • MCP server with HTTP, TCP, and WebSocket transports
  • Next.js/React dashboard
  • Official C#, Python, and JavaScript SDKs
  • Docker Compose deployments for a single node on SQLite, a single node on PostgreSQL, and a multi-node cluster, each with MCP, the dashboard, Prometheus, Loki, and Grafana OSS

Screenshots

<details> <summary>Click to expand</summary>

Chat with your graph — natural-language questions answered through graph tool calls, streamed as markdown, with per-turn statistics, a model selector, and a streaming toggle:

Chat with your graph

The home page: tenant KPIs, quick actions, and an interactive graph workspace with node inspection:

Graph workspace

Node and vector editing — labels, tags, vectors, and JSON data in one editor:

Node editing

Request telemetry — traffic over time with success/failure trends, duration percentiles, filters, and links into Prometheus and OpenTelemetry:

Request telemetry

Provisioned Grafana dashboards — seven per-domain boards ship with the Compose stack; here, API Requests with rates, latency percentiles, errors, and authentication outcomes:

Grafana API Requests dashboard

API Explorer — every REST operation, invocable with parameters and response previews:

API Explorer

Authorization — built-in and custom roles (including the delegable Chat Admin), scopes, permissions, and resources:

Authorization

3D graph inspection:

3D graph view

</details>

New In v10.x

The v10 releases let LiteGraph run as a stateless cluster, ship as Native AOT, and search the text inside Data. Every v10 release after 10.0 upgrades in place. See CHANGELOG.md for every change and UPGRADE.md for upgrade steps.

  • Full-text search over Data (v10.3): send DataQuery with any graph, node, or edge search, read-first, or enumeration request ("DataQuery": "\"new york\" engineer*") to match words in the JSON string values of Data, combined with the name, label, tag, and expression filters. "Ordering": "Relevance" ranks matches by TF-IDF and returns each object's TextScore. SQLite (FTS5) and PostgreSQL (GIN over tsvector) return the same matches and scores. Available in REST, the library, MCP and chat tools, all three SDKs, and the dashboard. See Full-text search over Data.
  • Native AOT (v10.2): the library and C# SDK work in Native AOT and trimmed applications, and the REST server, MCP server, and console tools publish as native executables and container images (about 65 MB instead of about 400 MB for the server image) that need no .NET runtime. Default builds are unchanged. See Native AOT.
  • MCP tool names (v10.1): MCP and chat tools use underscores instead of slashes (graph_get instead of graph/get), as the MCP specification requires. MCP clients must update tool names.
  • Clustering (v10.0): several identical, stateless nodes share one PostgreSQL database behind a load balancer, with vector search in pgvector, coordination through Clutch locks, node registration in Redis, rolling restarts, health endpoints, and a Cluster page in the dashboard. PostgreSQL deployments now require pgvector, and stored vectors are converted on first start with no way back to 9.x; back up first. See Clustering.
  • Docker deployments (v10.0): single node on SQLite, single node on PostgreSQL with pgvector, and a three-node cluster with Nginx, Clutch, Redis, smoke tests, and a failover test, under docker/.

Repository Layout

Directory Description
src/ Core LiteGraph library, REST server, MCP server, console, samples, and tests
dashboard/ Web dashboard UI built with Next.js and React
sdk/csharp/ C# REST SDK published as LiteGraph.Sdk
sdk/python/ Python REST SDK published as litegraph-sdk
sdk/js/ JavaScript/Node.js REST SDK published as litegraphdb
docker/ Docker deployments: single-node-sqlite, single-node-postgresql, and multi-node, each with smoke tests and factory reset, plus shared observability config
docs/ Current operational and API documentation
archive/ Historical implementation plans and performance notes

Documentation

Published documentation is also available at litegraph.readme.io.

Quick Start From The Command Line

Run a single node on SQLite with nothing but the .NET SDK (8.0 or 10.0):

dotnet run --project src/LiteGraph.Server/LiteGraph.Server.csproj --framework net10.0

On first start the server writes litegraph.json, creates litegraph.db in the current directory, and creates the default tenant, user, and credential listed below. It listens on http://127.0.0.1:8701; check it with:

curl http://127.0.0.1:8701/v1.0/health/ready

To run it as a native executable instead (no .NET runtime needed on the machine that runs it; see Native AOT for the build prerequisites):

dotnet publish src/LiteGraph.Server/LiteGraph.Server.csproj -c Release -f net10.0 -r linux-x64 -p:PublishAot=true -o out/server
out/server/LiteGraph.Server

Both behave the same way. Any setting can be overridden with environment variables, for example LITEGRAPH_PORT, or LITEGRAPH_DB_TYPE=Postgresql with LITEGRAPH_DB_HOST, LITEGRAPH_DB_PORT, LITEGRAPH_DB_NAME, LITEGRAPH_DB_USERNAME, and LITEGRAPH_DB_PASSWORD to use a PostgreSQL server that has the pgvector extension. See Settings.

Quick Start With Docker Compose

Three deployments live under docker/; pick one, cd into it, and start it. They publish the same host ports, so run one at a time. docker/README.md covers each in detail.

Directory What it runs
docker/single-node-sqlite/ One LiteGraph node on SQLite with in-process HnswLite vector search
docker/single-node-postgresql/ One LiteGraph node on PostgreSQL 17 with pgvector
docker/multi-node/ Three LiteGraph nodes behind Nginx on one PostgreSQL database, with two Clutch lock nodes and Redis for the node registry; Switchboard is an optional profile
cd docker/single-node-postgresql
docker compose up -d

Then validate it (Windows smoke.bat, elsewhere pwsh ./smoke.ps1):

smoke.bat

For the cluster, also run failover.bat in docker/multi-node: it keeps traffic flowing while it stops and restarts a LiteGraph node, each Clutch node, and Redis, then runs a rolling restart of every node.

Default endpoints, identical in every deployment:

Service Endpoint
LiteGraph REST (the load balancer in the cluster) http://127.0.0.1:8701
LiteGraph MCP HTTP http://127.0.0.1:8702
LiteGraph MCP TCP 127.0.0.1:8703
LiteGraph MCP WebSocket ws://127.0.0.1:8704/mcp
LiteGraph UI http://127.0.0.1:3001
Prometheus http://127.0.0.1:9090
Grafana OSS http://127.0.0.1:3000
PostgreSQL 127.0.0.1:15432 (single node), 127.0.0.1:15433 (cluster)

Default seeded LiteGraph records:

Item Value
Tenant GUID 00000000-0000-0000-0000-000000000000
Graph GUID 00000000-0000-0000-0000-000000000000
User email default@user.com
User password password
Credential bearer token default
Server administrator bearer token litegraphadmin

Every host port and credential is configurable through the .env.example file in each deployment directory. The cluster ships with demonstration credentials so it starts without setup; change them before any real use, as docker/multi-node/.env.example describes.

Load Generator

src/LoadGenerator seeds a LiteGraph database with realistic synthetic activity — themed graphs with nodes, edges, and vectors, backdated API request history following a diurnal curve with bursts, and chat threads with turn telemetry and feedback — so the dashboard and Grafana render a fully hydrated system. It writes through the core library directly (not REST), so timestamps are spread organically across the chosen window rather than clustered at the current time.

# Seed a SQLite database with the defaults (3 graphs, 50 nodes each, 2000 requests, 7 days)
dotnet run --project src/LoadGenerator --framework net8.0 -- --sqlite litegraph.db

# Seed the single-node PostgreSQL stack (see docker/single-node-postgresql)
dotnet run --project src/LoadGenerator --framework net8.0 -- \
  --postgres "Host=127.0.0.1;Port=15432;Database=litegraph;Username=litegraph;Password=litegraph"

# Larger dataset with a fixed RNG seed, replacing prior synthetic data
dotnet run --project src/LoadGenerator --framework net8.0 -- \
  --postgres "Host=127.0.0.1;Port=15432;Database=litegraph;Username=litegraph;Password=litegraph" \
  --graphs 5 --nodes 200 --density 0.02 --days 14 --requests 10000 --wipe --seed 42

# Remove previously generated synthetic data and exit
dotnet run --project src/LoadGenerator --framework net8.0 -- --sqlite litegraph.db --wipe-only

Everything the tool creates is marked (label synthetic, tag generator=loadgen, users under the loadgen.synthetic email domain, request-history correlation ID loadgen-synthetic), so --wipe/--wipe-only remove only generated data and leave real data untouched. Run with --help for the full argument list.

Before production or remote access

If you're moving to production, change default credentials. Do this before exposing LiteGraph to an untrusted network, including during an evaluation. The shipped ports and listener addresses are unchanged; the localhost URLs above do not imply the services are accessible only locally.

  • Replace LiteGraph.AdminBearerToken (litegraphadmin) in litegraph.json, or set LITEGRAPH_ADMIN_BEARER_TOKEN, with a unique cryptographically random secret (for example, openssl rand -hex 32). An environment override takes precedence. Restart the server after changing this setting, and use the same token on every cluster node.
  • Change the seeded default@user.com administrator's password (password) using the dashboard user editor or the user update API, or disable/delete that account after creating your own administrator.
  • Disable or delete the seeded bearer credential (default) using the dashboard credential editor or the credential update/delete API. If clients need a replacement, create a new credential with a unique bearer token and update those clients. Changing the user password does not revoke bearer credentials.
  • Update clients, MCP configuration, scripts, and secret storage that use these credentials. Existing database records survive a server upgrade; changing the administrator token alone does not change the seeded user or credential.

At startup, LiteGraph warns through the console and configured logging/syslog when known default credentials remain usable. System administrators also see a dashboard warning, even when signing in with custom credentials. Dismissing it lasts until the next login. These notices do not block startup, alter authentication, or restrict network access.

Docker Images

The Compose deployments use these images, selected by LITEGRAPH_IMAGE_TAG (default v10.3.2):

  • jchristn77/litegraph:v10.3.2
  • jchristn77/litegraph-mcp:v10.3.2
  • jchristn77/litegraph-ui:v10.3.2

These run the server and MCP server on the .NET runtime. Smaller Native AOT images can be built from Dockerfile.native and started with each deployment's compose.native.yaml; see docker/README.md. Building a release tag (a plain vMAJOR.MINOR.PATCH) also moves :latest; any other tag leaves :latest alone. To run a build of your own, build and tag it with build-all.bat <tag> and start a deployment with LITEGRAPH_IMAGE_TAG=<tag>. PostgreSQL deployments use pgvector/pgvector:0.8.6-pg17-trixie; the cluster adds jchristn77/clutch-server:v0.2.0, redis:7.4.9-alpine, nginx:1.27-alpine, and optionally jchristn77/switchboard:v5.2.2.

Factory Reset

Each deployment has its own factory reset, which touches only that deployment:

cd docker/single-node-postgresql/factory
./reset.sh

On Windows run reset.bat instead. The script asks you to type RESET, then stops the deployment, deletes its Docker volumes and runtime directories, and restores its configuration files from factory/. update.bat in each deployment is the non-destructive counterpart: it pulls current images and recreates the containers, keeping all data.

Embedded C# Quick Start

Install the core package:

dotnet add package LiteGraph

Use SQLite directly in-process:

using System.Collections.Generic;
using LiteGraph;
using LiteGraph.GraphRepositories.Sqlite;

using LiteGraphClient client = new LiteGraphClient(new SqliteGraphRepository("litegraph.db"));
client.InitializeRepository();

TenantMetadata tenant = await client.Tenant.Create(new TenantMetadata
{
    Name = "Example tenant"
});

Graph graph = await client.Graph.Create(new Graph
{
    TenantGUID = tenant.GUID,
    Name = "Example graph"
});

Node ada = await client.Node.Create(new Node
{
    TenantGUID = tenant.GUID,
    GraphGUID = graph.GUID,
    Name = "Ada",
    Labels = new List<string> { "Person" }
});

Node grace = await client.Node.Create(new Node
{
    TenantGUID = tenant.GUID,
    GraphGUID = graph.GUID,
    Name = "Grace",
    Labels = new List<string> { "Person" }
});

await client.Edge.Create(new Edge
{
    TenantGUID = tenant.GUID,
    GraphGUID = graph.GUID,
    From = ada.GUID,
    To = grace.GUID,
    Name = "Worked with"
});

GraphQueryResult query = await client.Query.Execute(
    tenant.GUID,
    graph.GUID,
    new GraphQueryRequest
    {
        Query = "MATCH (n:Person) RETURN n ORDER BY n.name ASC LIMIT 10"
    });

Console.WriteLine("Rows: " + query.RowCount);

Use the provider-neutral factory when selecting storage from configuration:

using LiteGraph;
using LiteGraph.GraphRepositories;

DatabaseSettings settings = new DatabaseSettings
{
    Type = DatabaseTypeEnum.Postgresql,
    ConnectionString = "Host=127.0.0.1;Port=15432;Database=litegraph;Username=litegraph;Password=litegraph"
};

using GraphRepositoryBase repository = GraphRepositoryFactory.Create(settings);
using LiteGraphClient client = new LiteGraphClient(repository);

client.InitializeRepository();

Execute a graph-scoped transaction:

TransactionRequest request = client.Transaction
    .CreateRequestBuilder()
    .WithIsolationLevel(TransactionIsolationLevelEnum.Default)
    .CreateNode(new Node { Name = "Transaction node" })
    .Build();

TransactionResult result = await client.Transaction.Execute(
    tenant.GUID,
    graph.GUID,
    request);

Console.WriteLine(result.State + " " + result.TransactionId);

For in-memory SQLite, pass true to SqliteGraphRepository and call Flush() when you want to persist the in-memory database to disk:

using LiteGraphClient client = new LiteGraphClient(new SqliteGraphRepository("litegraph.db", true));
client.InitializeRepository();

// Work with the graph...

client.Flush();

MCP And AI Agents

LiteGraph includes an MCP server so Claude, Claude Code, Cursor, and other MCP-compatible clients can create, query, and manage graphs through AI-agent tool calls. The MCP server is part of the Docker Compose deployment and starts automatically.

Default MCP listeners:

Transport Endpoint
HTTP (MCP clients, e.g. Claude Code) http://127.0.0.1:8702/mcp
HTTP (plain JSON-RPC) http://127.0.0.1:8702/rpc
TCP 127.0.0.1:8703
WebSocket ws://127.0.0.1:8704/mcp

MCP configuration can be overridden with:

Variable Purpose
LITEGRAPH_ENDPOINT LiteGraph REST endpoint
LITEGRAPH_API_KEY LiteGraph bearer token
MCP_HTTP_HOSTNAME HTTP hostname
MCP_HTTP_PORT HTTP port
MCP_TCP_ADDRESS TCP bind address
MCP_TCP_PORT TCP port
MCP_WS_HOSTNAME WebSocket hostname
MCP_WS_PORT WebSocket port

Point Claude Code and other MCP clients at the /mcp URL, for example:

{
  "mcpServers": {
    "litegraph": { "type": "http", "url": "http://127.0.0.1:8702/mcp" }
  }
}

LiteGraph.McpServer install writes this entry to ~/.claude.json for you. Claude Code 2.1.x negotiates the stateless 2026-07-28 MCP revision, which only /mcp serves. If Claude Code connects but lists no LiteGraph tools, the entry most likely still points at /rpc, which older installs wrote. Change it to /mcp or re-run install.

See Using Claude with LiteGraph for client setup.

Version History

See CHANGELOG.md for release history.

Bugs, Feedback, Or Enhancement Requests

Please start an issue or discussion in the repository. For detailed documentation and guides, visit litegraph.readme.io.

Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 was computed.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 is compatible.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (1)

Showing the top 1 NuGet packages that depend on LiteGraph:

Package Downloads
Durable.LiteGraph

LiteGraph backend for Durable ORM (depends on the LiteGraph package): stores each entity row as a node of a LiteGraph property graph, maintains foreign keys as edges, uses deterministic node GUIDs for key lookups, supports atomic interactive transactions, includes and full LINQ query evaluation, so Durable data is first-class for LiteGraph traversals, algorithms and tools.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
10.3.3 10 12/4/2026
10.3.2 61 12/2/2026
10.3.1 68 12/2/2026
10.2.1 132 11/18/2026
10.2.0 604 10/7/2026
10.1.0 865 10/4/2026
10.0.0 174 9/30/2026
9.0.0 130 9/29/2026
8.1.0 978 9/2/2026
7.0.0 503 6/19/2026
6.0.3 165 6/13/2026
6.0.1 250 5/20/2026
6.0.0 856 4/18/2026
5.0.2 1,714 12/5/2025
5.0.1 270 12/4/2025
5.0.0 509 11/18/2025
4.1.9 282 10/21/2025
4.1.8 333 9/4/2025
4.1.7 298 9/3/2025
4.1.6 333 8/26/2025
Loading failed

v10.3.2: Query results are read directly from the data reader instead of DataTable.Load, which called GetSchemaTable; on SQLite that ran one full table scan per result column, so a read by GUID slowed down as the table grew (issue #39). PostgreSQL no longer skips every second result set of a multi-statement command. v10.3.1: Full-text search over the Data property of graphs, nodes, and edges (SearchRequest.DataQuery, EnumerationRequest.DataQuery, DataQuery parser, new ReadMany/ReadFirst/ReadMostConnected/ReadLeastConnected overloads). SQLite uses an FTS5 index maintained by triggers; PostgreSQL uses schema migration 3 (litegraph_data_tsv function and GIN indexes). Existing databases are indexed automatically on first start. Additive API; no breaking changes.