Get Started¶
Velr is an embedded property-graph database for local-first, edge, and AI-native applications. It is implemented in Rust, stores data in a standard SQLite database file, and is queried with openCypher.
It also includes BM25 full-text search and vector approximate nearest neighbor (ANN) search for retrieval-heavy graph applications.
Note
Velr is currently in public alpha. The public drivers are usable today, but APIs may still evolve before 1.0.
Fastest Path¶
The quickest way to try Velr locally is with the released CLI.
Install Velr with Homebrew on macOS, Linux, or Windows Subsystem for Linux:
Verify the install and run a first query against an in-memory database:
Use a database file when you want persistent state:
velr graph.db -e 'CREATE (:Person {name: "Ada"});'
velr graph.db -e 'MATCH (p:Person) RETURN p.name AS name;'
For direct binary downloads, Windows installs, manual setup, output formats, REPL commands, and scripting workflows, see Velr CLI.
First Embedded Query¶
If you want to embed Velr in an application, Python is the fastest driver path for AI, notebooks, pandas, Polars, and Arrow workflows.
Install the Python package:
Create an in-memory graph, bind a parameter, and read a result:
from velr.driver import Velr
with Velr.open(None) as db:
db.run(
"CREATE (:Person {name: $name})",
params={"name": "Ada Lovelace"},
)
with db.exec_one("MATCH (p:Person) RETURN p.name AS name") as table:
rows = table.collect(lambda row: [cell.as_python() for cell in row])
print(rows)
Use Velr.open("graph.db") instead of Velr.open(None) for a file-backed database.
Pick A Driver¶
All public drivers use the same embedded Velr runtime and SQLite-backed file format. Choose the driver that fits your application.
Best for AI, data science, notebooks, pandas, Polars, and Arrow workflows.
Python 3.12 or newer is required.
- Package: velr on PyPI
- Site docs: Python Driver
- Examples: velr-python-examples
Best for embedded systems, edge runtimes, high-performance services, and native applications.
- Crate: velr on crates.io
- API docs: velr on docs.rs
- Site docs: Rust Driver
- Driver repository: velr-rust-driver
- Examples: velr-rust-examples
Best for services, tools, agents, and infrastructure software that wants a small embedded graph layer.
Go 1.22 or newer is required.
- Module: velr-go-driver
- API docs: velr-go-driver on pkg.go.dev
- Site docs: Go Driver
- Examples: velr-go-examples
Best for Node.js applications, worker-thread workflows, tooling, and JavaScript/TypeScript agents.
Node.js 22 or newer is required.
- Package: @velr-ai/velr on npm
- Site docs: JavaScript / TypeScript Driver
- JavaScript examples: velr-javascript-examples
- TypeScript examples: velr-typescript-examples
Best for JVM and Android applications that need embedded graph queries with native runtime performance.
For Android, use implementation("ai.velr:velr-java-driver-android:0.2.35").
- Maven Central JVM artifact: velr-java-driver
- Maven Central Android artifact: velr-java-driver-android
- JVM API docs: Java JVM docs
- Android API docs: Java Android docs
- Site docs: Java Driver
- Examples: velr-java-examples
Best for Kotlin JVM and Android applications. The Kotlin artifact includes the Java core classes plus Kotlin extension helpers.
repositories {
mavenCentral()
}
dependencies {
implementation("ai.velr:velr-kotlin-driver:0.2.35")
}
For Android, use implementation("ai.velr:velr-kotlin-driver-android:0.2.35").
- Maven Central JVM artifact: velr-kotlin-driver
- Maven Central Android artifact: velr-kotlin-driver-android
- JVM API docs: Kotlin JVM docs
- Android API docs: Kotlin Android docs
- Site docs: Kotlin Driver
- Examples: velr-kotlin-examples
The same query model is available from every driver. The language-specific driver pages show richer examples for transactions, parameters, Arrow, BM25 full-text search, and vector/ANN search.
Retrieval Built In¶
Velr alpha includes retrieval features directly in the embedded engine:
- BM25 full-text indexes with
CREATE FULLTEXT INDEX - Full-text queries with
CALL db.index.fulltext.queryNodes(...) - Vector/ANN indexes with
CREATE VECTOR INDEX - Vector queries with
CALL db.index.vector.queryNodes(...) - Application-provided embedders for vector index maintenance and query text
The driver pages include examples for the public APIs.
Where Next¶
- Driver references: Python, Rust, JavaScript / TypeScript, Go, Java, and Kotlin
- Public hub: velr-ai/velr
- Community questions: GitHub Discussions
- Bug reports and feature requests: GitHub Issues