| layout | default |
|---|---|
| nav_order | 1 |
| nav_exclude | true |
| description | Official FalkorDB documentation — the high-performance graph database for GraphRAG, Cypher queries, and knowledge graphs powering accurate GenAI applications. |
| permalink | / |
FalkorDB delivers an accurate, multi-tenant RAG solution powered by a low-latency, scalable graph database technology.
-
Purpose-built for development teams working with complex, interconnected data—whether structured or unstructured—in real-time or interactive user environments.
-
Supports the OpenCypher query language with proprietary enhancements that streamline interactions with graph data. Its efficient graph traversal and query capabilities make it well-suited for production environments.
- Graph Database Path: If you're interested in using FalkorDB as a property graph database with OpenCypher support, continue with the sections below.
- GraphRAG Path: If you're aiming to implement advanced graph reasoning and generative AI tasks, explore our GenAI Tools section, starting with the GraphRAG SDK.
- Adopts the Property Graph Model
- Supports OpenCypher query language with proprietary extensions
- Offers Full-Text Search, Vector Similarity, and Range indexing for efficient querying
- Supports both RESP and Bolt protocols for flexible connectivity
- Uses sparse adjacency matrix representation for efficient graph storage
- Provides GraphRAG capabilities through the GraphRAG SDK for advanced graph reasoning and generative AI tasks
Launch an instance using Docker, or use FalkorDB Cloud
docker run -p 6379:6379 -p 3000:3000 -it --rm falkordb/falkordb:latest-
6379 (FalkorDB Server)
Use this port to connect via the CLI or any FalkorDB-compatible client. -
3000 (FalkorDB Browser)
Access the FalkorDB web UI by opening your browser at: http://localhost:3000
Once loaded, you can interact with FalkorDB using any of the supported client libraries
📖 New to FalkorDB? Follow the step-by-step Getting Started guide for a complete walkthrough — from setup to modeling, loading, and querying your first graph.
Here we'll use FalkorDB Python client to create a small graph representing a subset of motorcycle riders and teams taking part in the MotoGP league, once created we'll start querying our data.
{% capture python_code %} from falkordb import FalkorDB
db = FalkorDB(host='localhost', port=6379)
g = db.select_graph('MotoGP')
g.delete() g.query("""CREATE (:Rider {name:'Valentino Rossi'})-[:rides]->(:Team {name:'Yamaha'}), (:Rider {name:'Dani Pedrosa'})-[:rides]->(:Team {name:'Honda'}), (:Rider {name:'Andrea Dovizioso'})-[:rides]->(:Team {name:'Ducati'})""")
res = g.query("""MATCH (r:Rider)-[:rides]->(t:Team) WHERE t.name = 'Yamaha' RETURN r.name""")
for row in res.result_set: print(row[0]) # Prints: "Valentino Rossi"
res = g.query("""MATCH (r:Rider)-[:rides]->(t:Team {name:'Ducati'}) RETURN count(r)""")
print(res.result_set[0][0]) # Prints: 1 {% endcapture %}
{% capture javascript_code %} import { FalkorDB } from 'falkordb';
const db = await FalkorDB.connect({ // username: 'myUsername', // password: 'myPassword', socket: { host: 'localhost', port: 6379 } })
console.log('Connected to FalkorDB')
const graph = db.selectGraph('MotoGP')
await graph.query(CREATE (:Rider {name:'Valentino Rossi'})-[:rides]->(:Team {name:'Yamaha'}), (:Rider {name:'Dani Pedrosa'})-[:rides]->(:Team {name:'Honda'}), (:Rider {name:'Andrea Dovizioso'})-[:rides]->(:Team {name:'Ducati'}))
const result = await graph.query(MATCH (r:Rider)-[:rides]->(t:Team) WHERE t.name = $name RETURN r.name,
{params: {name: 'Yamaha'}})
console.log(result) // Valentino Rossi
console.log(await db.list()) console.log(await db.info())
db.close() {% endcapture %}
{% capture java_code %} package com.falkordb;
import com.falkordb.; import java.util.;
public class FalkorDBExample { public static void main(String[] args) { // Connect to FalkorDB Driver driver = FalkorDB.driver("localhost", 6379);
// Select the graph
Graph graph = driver.graph("MotoGP");
// Create graph data
graph.query("CREATE (:Rider {name:'Valentino Rossi'})-[:rides]->(:Team {name:'Yamaha'}), " +
"(:Rider {name:'Dani Pedrosa'})-[:rides]->(:Team {name:'Honda'}), " +
"(:Rider {name:'Andrea Dovizioso'})-[:rides]->(:Team {name:'Ducati'})");
// Query with parameters
Map<String, Object> params = new HashMap<>();
params.put("name", "Yamaha");
ResultSet resultSet = graph.query(
"MATCH (r:Rider)-[:rides]->(t:Team) " +
"WHERE t.name = $name RETURN r.name", params);
// Process query results
for (Record record : resultSet) {
String riderName = record.getValue("r.name").toString();
System.out.println(riderName); // Valentino Rossi
}
// Close the connection
driver.close();
}
} {% endcapture %}
{% capture rust_code %} use falkordb::{FalkorClientBuilder, FalkorConnectionInfo};
#[tokio::main] async fn main() -> Result<(), Box> { // Connect to FalkorDB let connection_info: FalkorConnectionInfo = "falkor://127.0.0.1:6379" .try_into() .expect("Invalid connection info");
let client = FalkorClientBuilder::new_async()
.with_connection_info(connection_info)
.build()
.await?;
// Select the 'MotoGP' graph
let mut graph = client.select_graph("MotoGP");
// Clear out this graph in case you've run this script before.
graph.delete().await?;
graph
.query(
r#"CREATE
(:Rider {name:'Valentino Rossi'})-[:rides]->(:Team {name:'Yamaha'}),
(:Rider {name:'Dani Pedrosa'})-[:rides]->(:Team {name:'Honda'}),
(:Rider {name:'Andrea Dovizioso'})-[:rides]->(:Team {name:'Ducati'})"#,
)
.execute()
.await?;
// Query which riders represent Yamaha?
let mut nodes = graph
.query(
r#"MATCH (r:Rider)-[:rides]->(t:Team)
WHERE t.name = 'Yamaha'
RETURN r.name"#,
)
.execute()
.await?;
for node in nodes.data.by_ref() {
println!("{:?}", node);
}
// Query how many riders represent team Ducati?
let mut nodes = graph
.query(r#"MATCH (r:Rider)-[:rides]->(t:Team {name:'Ducati'}) RETURN count(r)"#)
.execute()
.await?;
for node in nodes.data.by_ref() {
println!("{:?}", node);
}
Ok(())
} {% endcapture %}
{% capture shell_code %} $ redis-cli -h localhost -p 6379
127.0.0.1:6379> GRAPH.QUERY MotoGP "CREATE (:Rider {name:'Valentino Rossi'})-[:rides]->(:Team {name:'Yamaha'}), (:Rider {name:'Dani Pedrosa'})-[:rides]->(:Team {name:'Honda'}), (:Rider {name:'Andrea Dovizioso'})-[:rides]->(:Team {name:'Ducati'})"
-
- "Labels added: 2"
- "Nodes created: 6"
- "Properties set: 6"
- "Relationships created: 3"
- "Cached execution: 0"
- "Query internal execution time: 9.155705 milliseconds"
127.0.0.1:6379> GRAPH.QUERY MotoGP "MATCH (r:Rider)-[:rides]->(t:Team) WHERE t.name = 'Yamaha' RETURN r.name"
-
- "r.name"
-
-
- "Valentino Rossi"
-
-
- "Cached execution: 0"
- "Query internal execution time: 5.389149 milliseconds"
127.0.0.1:6379> GRAPH.QUERY MotoGP "MATCH (r:Rider)-[:rides]->(t:Team {name:'Ducati'}) RETURN count(r)"
-
- "count(r)"
-
-
- (integer) 1
-
-
- "Cached execution: 0"
- "Query internal execution time: 1.153678 milliseconds" {% endcapture %}
{% include code_tabs.html id="code_tabs_0" python=python_code javascript=javascript_code java=java_code rust=rust_code shell=shell_code %}
For additional demos please visit Demos.
Language-specific clients have been written by the community and the FalkorDB team. The full list and links can be found on the Client Libraries page.
When loading large graphs from CSV files, use the falkordb-bulk-loader:
pip install falkordb-bulk-loader
falkordb-bulk-insert GRAPHNAME -n nodes.csv -r edges.csvSee the Bulk Loader documentation for the full reference.
Got questions? Please contact us at the FalkorDB forum.
FalkorDB is licensed under the the Server Side Public License v1 (SSPLv1).
{% include faq_accordion.html
title="Frequently Asked Questions"
q1="What is FalkorDB and how does it differ from other graph databases?"
a1="FalkorDB is a high-performance graph database built as a Redis module. Unlike traditional graph databases, it uses a sparse adjacency matrix representation (based on GraphBLAS) for efficient storage and fast traversals. It supports OpenCypher queries, both RESP and Bolt protocols, and provides built-in GraphRAG capabilities for GenAI applications."
q2="What are the main use cases for FalkorDB?"
a2="FalkorDB excels at use cases involving complex, interconnected data: social networks, recommendation engines, knowledge graphs, fraud detection, and GraphRAG for GenAI applications. Its low-latency design makes it ideal for real-time and interactive user environments."
q3="How do I get started with FalkorDB?"
a3="The quickest way is Docker: docker run -p 6379:6379 -p 3000:3000 -it --rm falkordb/falkordb:latest. This starts the server and a browser UI at http://localhost:3000. Then install a client library and follow the Getting Started guide."
q4="Does FalkorDB support cloud deployment?"
a4="Yes. FalkorDB Cloud provides a fully managed, multi-tenant graph database service. You can create a free instance and skip local setup entirely."
q5="What query language does FalkorDB use?"
a5="FalkorDB uses OpenCypher with proprietary extensions. It supports full-text search, vector similarity search, and range indexing. See the Cypher documentation for the complete query language reference."
%}
