A Graph Database for HTAP Workloads
NeuG (pronounced "new-gee") is a graph database for HTAP (Hybrid Transactional/Analytical Processing) workloads. It provides two modes that you can switch between based on your needs:
- Embedded Mode: Optimized for analytical workloads including bulk data loading, complex pattern matching, and graph analytics
- Service Mode: Optimized for transactional workloads for real-time applications and concurrent user access
For more information, please refer to the NeuG documentation.
- 2026-06 — NeuG v0.1.3: GDS extensions,
COPY TEMP, Node.js client - 2026-05 — NeuG v0.1.2:
LOAD FROM, Parquet & HTTPFS extensions - 2026-03 — NeuG v0.1 released
- 2025-06 — Shattered LDBC SNB Interactive Benchmark world record with 80,000+ QPS
The packages work on Linux, macOS, and Windows (via WSL2). For more detailed instructions (including C++ from source), see the installation guide.
Python · requires Python 3.8+
pip install neugNode.js · requires Node.js 18+ (since v0.1.3)
npm install @graphscope-neug/neugPython
import neug
db = neug.Database("/path/to/database")
db.load_builtin_dataset("tinysnb")
conn = db.connect()
# Find triangles in the graph
result = conn.execute("""
MATCH (a:person)-[:knows]->(b:person)-[:knows]->(c:person),
(a)-[:knows]->(c)
RETURN a.fName, b.fName, c.fName
""")
for record in result:
print(f"{record[0]}, {record[1]}, {record[2]} are mutual friends")
# Switch to service mode
conn.close()
db.serve(port=8080)Node.js
const { Database } = require('@graphscope-neug/neug');
const db = new Database({ databasePath: '', mode: 'w' });
const conn = db.connect();
conn.execute("CREATE NODE TABLE person(id INT64, fName STRING, PRIMARY KEY(id));");
conn.execute("CREATE REL TABLE knows(FROM person TO person);");
conn.execute("CREATE (:person {id: 1, fName: 'Alice'}), (:person {id: 2, fName: 'Bob'}), (:person {id: 3, fName: 'Carol'});");
conn.execute("MATCH (a:person {id: 1}), (b:person {id: 2}), (c:person {id: 3}) CREATE (a)-[:knows]->(b), (b)-[:knows]->(c), (a)-[:knows]->(c);");
// Find triangles in the graph
const result = conn.execute(`
MATCH (a:person)-[:knows]->(b:person)-[:knows]->(c:person),
(a)-[:knows]->(c)
RETURN a.fName, b.fName, c.fName
`);
for (const record of result) {
console.log(`${record[0]}, ${record[1]}, ${record[2]} are mutual friends`);
}
conn.close();
db.close();For building NeuG from source, see the Development Guide. We welcome contributions — please read the Contributing Guide before submitting issues or pull requests.
AI-Assisted Workflow
We apply an AI-assisted Spec-Driven workflow inspired by GitHub Spec-Kit:
- 🐛 Bug Reports: Use
/create-issuecommand in your IDE, or submit an issue manually - 💻 Pull Requests: Use
/create-prcommand in your IDE, or submit a PR manually
For more details, see the AI-Assisted Development Guide.
NeuG builds upon the excellent work of the open-source community. We would like to acknowledge:
- Kùzu: Our C++ Cypher compiler is adapted from Kùzu's implementation
- DuckDB: Our runtime value system and extension framework are inspired by DuckDB's architecture
NeuG is distributed under the Apache License 2.0.