LoraDB
The graph database for connected systems.
An in-process graph store with a Cypher-like query engine — small enough to embed in an agent, a robot, or a stream processor.
Embedded · Rust · Cypher-like · Rust · Node · Python · WASM · Go · Ruby · HTTP · Zero daemons · runs in your process · Open source · readable end-to-end
Overview
LoraDB is an embeddable property-graph database written in Rust. It parses, analyzes, compiles, and executes a Cypher-like query language against an in-process graph store — with no daemons, no clusters, and no schema migrations. VECTOR is a first-class value type, so embeddings live next to the graph they describe.
The graph belongs inside your process. Reach for LoraDB when you're building:
- AI agents & LLM pipelines — context, memory, and tool graphs that live with the agent, with embeddings and similarity search on the same nodes
- Robotics & scene graphs — local reasoning over typed relationships
- Event pipelines & streams — graph-shaped state inside a stream processor
- Real-time reasoning — read/write Cypher without standing up a database server
- Embedded graph storage — ship graph queries in a single static binary or WASM module
Every stage of the pipeline — parser, analyzer, compiler, executor, store — is implemented in this workspace. No external query engine, readable end-to-end.
Installation
LoraDB ships a single Rust engine with bindings for the major application runtimes, plus a standalone HTTP server. Pick the surface that matches your host.
Rust (crates.io)
# Cargo.toml
[dependencies]
lora-database = "0.1"→ crates.io/crates/lora-database
Node.js / TypeScript (npm)
npm install @loradb/lora-node→ npmjs.com/package/@loradb/lora-node
Python (PyPI)
pip install lora-python→ pypi.org/project/lora-python
WebAssembly (npm)
npm install @loradb/lora-wasm→ npmjs.com/package/@loradb/lora-wasm
Go (Go modules)
go get github.com/lora-db/lora/crates/lora-goThe Go binding is a thin cgo layer over lora-ffi; builds require the
liblora_ffi static library on disk. See
crates/lora-go/README.md for the local
checkout path and the prebuilt-archive path.
Ruby (RubyGems)
gem install lora-ruby
# or in a Gemfile
gem "lora-ruby"Standalone server (GitHub Releases)
Prebuilt lora-server binaries for Linux, macOS (Intel + Apple Silicon), and Windows are attached to every tagged release.
→ github.com/lora-db/lora/releases
Quick start
Node.js
import { createDatabase } from "@loradb/lora-node";
const db = await createDatabase();
await db.execute(`
CREATE (a:User {name: 'Alice'}),
(b:User {name: 'Bob'}),
(a)-[:FOLLOWS {since: 2024}]->(b)
`);
const result = await db.execute(`
MATCH (a:User)-[:FOLLOWS]->(b:User)
RETURN a.name AS follower, b.name AS followee
`);
console.log(result.rows);Python
from lora_python import Database
db = Database.create()
db.execute("CREATE (:User {name: 'Alice'})")
result = db.execute("MATCH (n:User) RETURN n.name AS name")
print(result["rows"])Go
package main
import (
"fmt"
"log"
lora "github.com/lora-db/lora/crates/lora-go"
)
func main() {
db, err := lora.New()
if err != nil { log.Fatal(err) }
defer db.Close()
if _, err := db.Execute(
"CREATE (:User {name: $n})",
lora.Params{"n": "Alice"},
); err != nil { log.Fatal(err) }
r, err := db.Execute("MATCH (n:User) RETURN n.name AS name", nil)
if err != nil { log.Fatal(err) }
fmt.Println(r.Columns, r.Rows)
}Ruby
require "lora_ruby"
db = LoraRuby::Database.create
db.execute("CREATE (:User {name: $n})", { n: "Alice" })
result = db.execute("MATCH (n:User) RETURN n.name AS name")
puts result["rows"]Rust
use lora_database::Database;
let db = Database::in_memory();
db.execute("CREATE (:User {name: 'Alice'})", None)?;
let result = db.execute("MATCH (n:User) RETURN n.name", None)?;HTTP (standalone server)
cargo run --bin lora-server
# => LoraDB server running at http://127.0.0.1:4747
curl -s localhost:4747/query \
-H 'Content-Type: application/json' \
-d '{"query": "CREATE (:User {name: \"Alice\"}) RETURN *"}'Result formats: rows, rowArrays, graph (default), combined. See loradb.com for the full API.
Documentation
📖 loradb.com — language reference, cookbook, function catalogue, and API guides.
In-repo references:
| Area | Link |
|---|---|
| Architecture overview | docs/architecture/overview.md |
| Graph engine internals | docs/architecture/graph-engine.md |
| Cypher support matrix | docs/reference/cypher-support-matrix.md |
| Value model | docs/internals/value-model.md |
| Adding Cypher features | docs/internals/cypher-development.md |
| Known limitations | docs/design/known-risks.md |
| Release process | RELEASING.md |
Development setup
LoraDB is a Cargo workspace with Node, Python, WASM, Go, and Ruby bindings hanging off dedicated crates, plus a shared lora-ffi C ABI that the Go binding links against.
Prerequisites
- Rust stable (pinned in
rust-toolchain.toml—rustfmt+clippycomponents) - Node.js 20+ (only for
lora-node,lora-wasm, and theloradb.comsite) - Python 3.8+ with
maturin(only forlora-python) - Go 1.21+ and a C toolchain with cgo enabled (only for
lora-go) - Ruby 3.1+ with
bundler(only forlora-ruby)
Clone and bootstrap
git clone https://github.com/lora-db/lora.git
cd lora
cargo build --workspaceRepository layout
lora/
├── crates/
│ ├── lora-ast/ AST types
│ ├── lora-parser/ PEG grammar + lowering
│ ├── lora-analyzer/ Semantic analysis
│ ├── lora-compiler/ Logical + physical planning
│ ├── lora-executor/ Plan interpreter
│ ├── lora-store/ In-memory store, temporal/spatial types
│ ├── lora-database/ Pipeline entry point
│ ├── lora-server/ Axum HTTP server
│ ├── lora-ffi/ C ABI over lora-database (used by lora-go)
│ ├── lora-node/ Node.js bindings (napi-rs)
│ ├── lora-python/ Python bindings (PyO3 / maturin)
│ ├── lora-wasm/ WebAssembly bindings
│ ├── lora-go/ Go bindings (cgo over lora-ffi)
│ ├── lora-ruby/ Ruby bindings (Magnus / rb-sys)
│ └── shared-ts/ Shared TypeScript types
├── apps/loradb.com/ Documentation site (Docusaurus)
└── docs/ Design docs and internals
Building
# Full workspace
cargo build --workspace
# Release build of the HTTP server
cargo build --release --bin lora-server
# Node.js bindings
cd crates/lora-node && npm run build
# Python bindings (produces a wheel)
cd crates/lora-python && maturin build --release
# WebAssembly bindings
cd crates/lora-wasm && npm run build
# Shared FFI (static library consumed by lora-go)
cargo build --release -p lora-ffi
# Go bindings (requires lora-ffi built above)
cd crates/lora-go && go test -race ./...
# Ruby bindings (native extension via rb-sys)
cd crates/lora-ruby && bundle install && bundle exec rake compileTesting
cargo test --workspace # Rust unit + integration tests
cargo clippy --workspace # Lints
cargo fmt --all --check # Formatting
cargo bench # Criterion benchmarksIntegration coverage lives in crates/lora-database/tests/ (one file per feature area) and crates/lora-server/tests/http.rs. Benchmarks are Criterion-driven and tracked by the benchmarks workflow — see docs/performance/benchmarks.md.
CI/CD
LoraDB ships via GitHub Actions. Every push and pull request runs the full quality gate; tagged releases fan out to crates.io, npm, PyPI, and GitHub Releases.
| Workflow | Purpose |
|---|---|
workspace-quality |
cargo fmt, clippy, test --workspace on every PR |
lora-node |
Build + test Node.js bindings across platforms |
lora-python |
Build + test Python wheels across platforms |
lora-wasm |
Build + test WebAssembly bindings |
lora-go |
Build lora-ffi, run go vet + go test -race on the Go binding |
lora-ruby |
Compile the Ruby native extension + run rake test across Ruby versions |
lora-server |
Build standalone server binaries |
benchmarks |
Criterion performance regression tracking |
release |
Tag-driven release of server binaries |
packages-release |
Tag-driven publish of npm / PyPI / RubyGems + verify-only path for the Go module |
cargo-release |
crates.io publish orchestration |
loradb-docs |
Deploys loradb.com |
commitlint |
Conventional-commit enforcement |
Conventional Commits are enforced on every PR via commitlint + Husky. Releases are driven by git-cliff — see RELEASING.md.
Contributing
Contributions are welcome. Before opening a PR, please read CONTRIBUTING.md and SECURITY.md.
- Use Conventional Commits (
feat:,fix:,docs:, …) — enforced by commitlint - Run
cargo fmt,cargo clippy, andcargo test --workspacebefore pushing - Open an issue first for anything larger than a bug fix or docs change
License
LoraDB is licensed under the Business Source License 1.1. Each covered release converts to Apache 2.0 on its Change Date (April 19, 2029 for the current release line).
You can use LoraDB for development, testing, evaluation, internal business use, internal production, and embedded in your own applications. You can't offer LoraDB as database-as-a-service, a hosted API for third parties, or a competing resale offering. See docs/license/usage.md for plain-English guidance.
The apps/loradb.com documentation site is separately MIT-licensed.