LiteGraph 8.1
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.
LiteGraph brings the core database, server, native LLM chat, SDKs, MCP tools, console, dashboard, and a full observability stack into one coordinated release.
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.
Prometheus metrics for every REST route, MCP tool, and chat turn; OpenTelemetry traces; logs in Loki; and provisioned Grafana dashboards from first boot.
Run Cypher/GQL-inspired graph reads, traversals, filters, aggregates, supplied-vector search, and child-object mutations inside one tenant and one graph.
Commit or roll back graph-scoped node, edge, label, tag, and vector changes as a single unit with structured operation results.
Attach vectors to graph objects and use HNSW indexing, metadata filters, and graph context together instead of splitting data across separate systems.
Protect REST, MCP, and chat access with built-in roles — including a delegable Chat Admin role — custom roles, credential scopes, and immutable system roles.
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
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.
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.
Background health probes with debounced state transitions, uptime history, on-demand connectivity tests, and a litegraph_chat_endpoint_healthy gauge on the dashboard.
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.
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.
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.
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
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.
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.
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.
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.
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.
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
Use the same graph-scoped query model from embedded applications, HTTP clients, MCP tools, and terminal workflows.
client.Query.Execute(...)POST /v1.0/tenants/{tenantGuid}/graphs/{graphGuid}/querygraph/querylg --execute "MATCH (n) RETURN n"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.
SQLite remains the local default. PostgreSQL is the recommended production backend with provider-specific SQL, JSON filtering, transactions, and parallel write scaling.
REST and MCP emit the same metric names split by a component label, plus repository, query, vector, transaction, authorization, and litegraph_chat_* series.
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.
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.
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.
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.
Use recent request details for debugging while Prometheus and OpenTelemetry carry aggregate monitoring and tracing.
Install the lg global tool for an interactive shell over a local database or remote endpoint, similar to using sqlite3.
Use LiteGraph when graph structure, vector similarity, object metadata, and operational control need to live together.
Combine semantic search with graph relationships, labels, tags, and JSON data — or let the built-in chat retrieval ground your model's answers automatically.
Model people, systems, documents, assets, events, and relationships with queryable metadata and typed graph edges.
Expose LiteGraph through MCP so AI agents can store context, inspect relationships, query history, and update graph state as durable long-term memory.
Track infrastructure, identity, security, lineage, and dependency networks with transactional updates and production monitoring.
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"
Official C#, Python, and JavaScript SDKs cover graphs, vectors, transactions, and the chat surface.
Use LiteGraph embedded with SQLite or consume a LiteGraph Server through the C# SDK.
Use the JavaScript SDK for browser and Node.js applications that call LiteGraph Server.
npm i litegraphdb
Use the Python SDK for scripts, ingestion jobs, and application services.
pip install litegraph_sdk
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.
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.
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
# 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.
One login, one dashboard: graph management, chat, authorization, request history, API exploration, settings, and operational monitoring in a single capability-mapped hierarchy.
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