LiteGraph 8.1

Multi-modal AI data platform

LiteGraph stores relationships, metadata, JSON data, and vectors in one graph database — with native LLM chat that answers questions straight from your data, streaming, tool-calling, and retrieval-augmented. MCP makes LiteGraph a tool surface and memory for agents, and Prometheus, OpenTelemetry, Loki, and Grafana watch every request out of the box.

Chat With Your Graph Native Graph Query Graph Transactions HNSW Vector Search PostgreSQL Ready MCP Server MIT License

Ready For Production AI Applications

LiteGraph brings the core database, server, native LLM chat, SDKs, MCP tools, console, dashboard, and a full observability stack into one coordinated release.

Chat With Your Graph

Ask questions in natural language. The server runs your model, executes graph tool calls under your own RBAC, grounds answers with vector retrieval, and streams the result over SSE.

Built-In Observability

Prometheus metrics for every REST route, MCP tool, and chat turn; OpenTelemetry traces; logs in Loki; and provisioned Grafana dashboards from first boot.

Native Graph Query

Run Cypher/GQL-inspired graph reads, traversals, filters, aggregates, supplied-vector search, and child-object mutations inside one tenant and one graph.

Graph Transactions

Commit or roll back graph-scoped node, edge, label, tag, and vector changes as a single unit with structured operation results.

Graph Plus Vector Search

Attach vectors to graph objects and use HNSW indexing, metadata filters, and graph context together instead of splitting data across separate systems.

RBAC And Scoped Credentials

Protect REST, MCP, and chat access with built-in roles — including a delegable Chat Admin role — custom roles, credential scopes, and immutable system roles.

Chat With Your Graph

LiteGraph 8.1 builds LLM chat into the server. Register completion and embedding endpoints for your own models, and the model answers by actually querying your graph — with tool calls, retrieval, and telemetry visible in the stream.

# OpenAI request body, graph-scoped LiteGraph URL
POST /v1.0/tenants/{tenant}/graphs/{graph}/chat/completions
{
  "model": "gpt-oss:20b",
  "stream": true,
  "messages": [
    { "role": "user",
      "content": "Which node has the most edges?" }
  ]
}

data: {"object":"chat.completion.chunk",
       "choices":[{"delta":{"role":"assistant"}}]}
data: {"object":"chat.completion.chunk",
       "choices":[{"delta":{"content":"Ada, with 14 edges."}}]}
data: [DONE]

# Native API: SSE with retrieval, tool, and usage events
POST /v1.0/tenants/{tenant}/chat/completions
data: {"event":"tool_call","name":"node/neighbors","iteration":1}
data: {"event":"delta","content":"The most connected node is Ada..."}
data: {"event":"usage","usage":{"TimeToFirstTokenMs":412.6,
       "TokensPerSecondOverall":51.2,"ToolCallCount":2}}
data: [DONE]

Native LLM integration

The model queries the graph

Chat runs an in-process tool loop under the caller's own tenant and RBAC: the model calls graph, node, edge, vector, label, and tag tools and answers from real data instead of guessing. Mutation tools stay off unless the tenant opts in.

  • ProvidersOpenAI and OpenAI-compatible servers, Ollama, Google Gemini, Anthropic (completion), VoyageAI (embedding)
  • RetrievalGraph-bound threads get automatic vector RAG through the tenant's embedding endpoint
  • StreamingSSE with delta, thinking, retrieval, tool, usage, and error events
  • TelemetryTTFT, tokens per second, per-stage timings, tool transcripts, and a trace ID on every turn
  • ProtocolsGraph-scoped routes speak OpenAI and Ollama wire formats, so existing clients connect without learning a new API
Read the chat architecture

Bring Your Own Model

Tenant-scoped endpoint management: register completion and embedding endpoints per tenant, mix providers freely, and keep API keys server-side — they always come back redacted.

Endpoint Health Monitoring

Background health probes with debounced state transitions, uptime history, on-demand connectivity tests, and a litegraph_chat_endpoint_healthy gauge on the dashboard.

Per-Turn Telemetry

Every turn persists time to first token, tokens per second, retrieval and tool timings, retries, and a trace ID — even failed turns leave a diagnosable trail.

Feedback And History

Thumbs-up/down feedback capture, full thread and turn history with retention sweeps, and a delegable Chat Admin role for endpoints, settings, and tenant-wide history.

Point Any OpenAI Or Ollama Client At A Graph

Graph-scoped endpoints accept OpenAI chat-completions and Ollama /api/chat request bodies — and answer in kind, streaming included — so any app that can talk to OpenAI or Ollama can chat with a specific graph using its existing client library.

Built For Agentic Applications

Agents use LiteGraph two ways: as a tool surface they can call, and as durable memory they can keep.

# JSON-RPC over HTTP, TCP, or WebSocket
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "node/neighbors",
  "params": {
    "tenantGuid": "00000000-0000-0000-0000-000000000000",
    "graphGuid":  "00000000-0000-0000-0000-000000000000",
    "nodeGuid":   "11111111-1111-1111-1111-111111111111"
  }
}

MCP tool surface

A tool catalog agents already speak

The MCP server exposes graph, node, edge, vector, label, and tag operations — CRUD, search, traversal, queries, transactions, and JSONL export/import — to Claude, Claude Code, Cursor, and any MCP-compatible client over HTTP, TCP, and WebSocket transports.

  • One vocabularyThe built-in chat advertises the same tool names as the MCP catalog, so an agent built against MCP transfers directly
  • AuthorizedEvery tool call passes through REST-boundary authentication and RBAC
  • MeasuredEvery MCP tool reports rate, latency, and errors to Prometheus alongside REST
Open the MCP API reference
MEM

Agentic Memory

Give agents durable long-term memory: graphs hold entities and relationships, vectors hold semantic recall, and labels and tags keep it all queryable — per tenant, under RBAC.

MCP

Tool Surface

Connect an MCP client and agents can create, query, traverse, and mutate graph data through a maintained tool catalog instead of hand-rolled database glue.

CLI

Query From The Terminal

Install the lg console (the LiteGraphConsole dotnet tool) for an interactive shell over a local SQLite database or a remote server, with one-shot --execute queries and script files.

API

Inference In Your App

The REST and SDK chat endpoints let your application infer with AI directly against its own data: send a message, get a grounded, telemetry-instrumented answer back.

Query Relationships Directly

LiteGraph native graph query is a parser-backed, LiteGraph-native profile inspired by familiar graph query models.

MATCH (person:Person)-[works:WORKS_ON]->(project:Project)
WHERE person.data.role = $role
RETURN person, works, project
ORDER BY person.name
LIMIT 10

Execution surfaces

Query from every surface

Use the same graph-scoped query model from embedded applications, HTTP clients, MCP tools, and terminal workflows.

  • C# embeddedclient.Query.Execute(...)
  • RESTPOST /v1.0/tenants/{tenantGuid}/graphs/{graphGuid}/query
  • MCPgraph/query
  • Consolelg --execute "MATCH (n) RETURN n"
Open the query language guide

Operationally Ready

Everything is measured. Every REST route, every MCP tool, and every chat turn reports to Prometheus under one metric scheme, traces flow through OpenTelemetry, and logs land in Loki — side by side in Grafana.

PostgreSQL Production Backend

SQLite remains the local default. PostgreSQL is the recommended production backend with provider-specific SQL, JSON filtering, transactions, and parallel write scaling.

Unified Prometheus Metrics

REST and MCP emit the same metric names split by a component label, plus repository, query, vector, transaction, authorization, and litegraph_chat_* series.

OpenTelemetry Traces

Trace request, repository, query, vector index, authorization, and chat activity — including per-turn spans for retrieval, tool calls, and each provider attempt — with optional OTLP export.

Provisioned Grafana Dashboards

The Compose stack preloads seven per-domain LiteGraph dashboards — Overview, API Requests, Graphs and Queries, Vector Search, Storage, Logs, and Chat and Inference — covering request rate, latency, errors, TTFT, token throughput, tool calls, and endpoint health.

Logs In Loki

Structured logs ship through Grafana Alloy into Loki, stamped by component and severity, so a metric spike and the log line that explains it sit side by side in Grafana.

Chat Turn Records

Every chat exchange persists TTFT, tokens per second, per-stage timings, tool transcripts, retries, and a trace ID that links straight to its distributed trace.

Request History

Use recent request details for debugging while Prometheus and OpenTelemetry carry aggregate monitoring and tracing.

LiteGraphConsole

Install the lg global tool for an interactive shell over a local database or remote endpoint, similar to using sqlite3.

Where LiteGraph Fits

Use LiteGraph when graph structure, vector similarity, object metadata, and operational control need to live together.

AI

RAG Beyond Vectors

Combine semantic search with graph relationships, labels, tags, and JSON data — or let the built-in chat retrieval ground your model's answers automatically.

KG

Knowledge Graphs

Model people, systems, documents, assets, events, and relationships with queryable metadata and typed graph edges.

AG

Agent Memory

Expose LiteGraph through MCP so AI agents can store context, inspect relationships, query history, and update graph state as durable long-term memory.

OP

Operational Graphs

Track infrastructure, identity, security, lineage, and dependency networks with transactional updates and production monitoring.

Get Started In Minutes

Run the full stack with Docker Compose, chat with your data over REST, use LiteGraph embedded in .NET, or install the lg console.

git clone https://github.com/litegraphdb/litegraph.git
cd litegraph/docker
docker compose up -d

# LiteGraph REST: http://localhost:8701
# LiteGraph MCP:  http://localhost:8702
# Dashboard:      http://localhost:3001
# Prometheus:     http://localhost:9090
# Grafana OSS:    http://localhost:3000
# Stream a chat completion grounded in your graph
curl -N -X POST http://localhost:8701/v1.0/tenants/${TENANT}/chat/completions \
  -H "Authorization: Bearer ${TOKEN}" \
  -H "Content-Type: application/json" \
  -d '{
    "GraphGUID": "00000000-0000-0000-0000-000000000000",
    "Message": "What are the most connected nodes in this graph?",
    "Stream": true,
    "EnableTools": true,
    "EnableRag": true
  }'

# SSE events: started, retrieval, tool_call, tool_result,
# delta, usage (TTFT, tokens/sec, tool calls), [DONE]
curl -X POST http://localhost:8701/v1.0/tenants/${TENANT}/graphs/${GRAPH}/query \
  -H "Authorization: Bearer ${TOKEN}" \
  -H "Content-Type: application/json" \
  -d '{
    "Query": "MATCH (n:Person) WHERE n.data.role = $role RETURN n LIMIT 10",
    "Parameters": {
      "role": "engineer"
    },
    "MaxResults": 100,
    "TimeoutSeconds": 30
  }'
using System.Collections.Generic;
using LiteGraph;
using LiteGraph.GraphRepositories.Sqlite;

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 = "Knowledge graph"
});

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

GraphQueryResult result = await client.Query.Execute(
    tenant.GUID,
    graph.GUID,
    new GraphQueryRequest
    {
        Query = "MATCH (n:Person) RETURN n LIMIT 10"
    });
curl -X POST http://localhost:8701/v1.0/tenants/${TENANT}/graphs/${GRAPH}/transaction \
  -H "Authorization: Bearer ${TOKEN}" \
  -H "Content-Type: application/json" \
  -d '{
    "Operations": [
      {
        "OperationType": "Create",
        "ObjectType": "Node",
        "Payload": {
          "Name": "Ada",
          "Labels": ["Person"],
          "Data": { "role": "engineer" }
        }
      }
    ],
    "MaxOperations": 100,
    "TimeoutSeconds": 30
  }'
# From the LiteGraph repository root
install-tool.bat

# Local SQLite database
lg --database litegraph.db \
  --tenant 00000000-0000-0000-0000-000000000000 \
  --graph 00000000-0000-0000-0000-000000000000

# Remote server
lg --endpoint http://localhost:8701 \
  --tenant ${TENANT} \
  --graph ${GRAPH} \
  --token ${TOKEN} \
  --execute "MATCH (n) RETURN n LIMIT 5"

Clients And Packages

Official C#, Python, and JavaScript SDKs cover graphs, vectors, transactions, and the chat surface.

C# / .NET

NuGet

Use LiteGraph embedded with SQLite or consume a LiteGraph Server through the C# SDK.

LiteGraph NuGet version LiteGraph NuGet downloads
Install via NuGet

JavaScript

npm

Use the JavaScript SDK for browser and Node.js applications that call LiteGraph Server.

npm i litegraphdb
View on npm

Python

PyPI

Use the Python SDK for scripts, ingestion jobs, and application services.

pip install litegraph_sdk
View on PyPI

REST And MCP

HTTP

Call REST directly — including the chat completion routes — or expose LiteGraph to AI tools through HTTP, TCP, and WebSocket MCP transports. A Postman collection covers the API.

Docker Deployment

The checked-in Compose stack starts PostgreSQL, LiteGraph Server, LiteGraph MCP, the dashboard, and a complete observability stack: Prometheus, Loki, Grafana Alloy, and Grafana OSS.

Server And Dashboard Images

docker pull jchristn77/litegraph:v8.1.0
docker pull jchristn77/litegraph-mcp:v8.1.0
docker pull jchristn77/litegraph-ui:v8.1.0

cd docker
docker compose up -d

Observability

# Prometheus scrapes REST and MCP:
http://localhost:8701/metrics
http://localhost:8705/metrics

# Grafana with provisioned LiteGraph
# and Chat dashboards:
http://localhost:3000

# Logs ship through Grafana Alloy
# into Loki, queryable in Grafana.

What Starts

  • PostgreSQL 17 with one-shot schema and default-data initialization
  • LiteGraph REST server on port 8701
  • LiteGraph MCP server on ports 8702 (HTTP), 8703 (TCP), and 8704 (WebSocket)
  • Dashboard on port 3001
  • Prometheus on port 9090 scraping REST and MCP metrics
  • Loki and Grafana Alloy for log aggregation
  • Grafana OSS on port 3000 with provisioned LiteGraph and Chat dashboards

Dashboard And Administration

One login, one dashboard: graph management, chat, authorization, request history, API exploration, settings, and operational monitoring in a single capability-mapped hierarchy.

Dashboard Features

  • Graph Management - Create and manage graphs, nodes, edges, labels, tags, and vectors
  • Chat - Talk to your graphs, manage endpoints and health, and review turn telemetry
  • Authorization - Manage roles, scopes, immutable built-in roles, and assignments
  • Request History - Inspect recent requests, timing, outcomes, JSON, and diagnostics
  • API Explorer - Send REST calls and query templates from the browser
  • Visualization - Explore graph structure with 2D and 3D views
  • Settings - System administrators edit server configuration from a form

Run The Dashboard

docker run -d --name litegraph-ui -p 3001:3000 \
  -e LITEGRAPH_SERVER=http://localhost:8701 \
  jchristn77/litegraph-ui:v8.1.0

# Or run from the monorepo
cd dashboard
npm install
npm run dev