The application native graph database

Write queries in the language of your application, not a query language. Get the same performance with ten records or ten billion.
cargo add agdb
use agdb::{Db, DbId, DbType, QueryBuilder};

#[derive(Debug, DbType)]
struct User { db_id: Option<DbId>, name: String }

let db = Db::new("db_file.agdb")?;
let users = vec![User { db_id: None, name: "Alice".into() }];
db.exec_mut(QueryBuilder::insert().nodes().values(&users).query())?;

let alice: User = db
    .exec(QueryBuilder::select().elements::<User>().search().elements()
        .where_().key("name").value("Alice").query())?
    .try_into()?;
println!("{alice:?}"); // User { db_id: Some(DbId(1)), name: "Alice" }

Why agdb

A database that is native to your application: simple to build with, use and scale.
No query language
Queries are objects built in your application's language with a builder. No text to parse, no SQL injection, no context switching.
Constant-time queries
The cost of lookups and traversals depends on the part of the graph you query, not on the size of the database.
Typed, schema-less graph
Nodes and edges carry typed key-value properties. Map your own structs with a derive and change the data with no migrations.
ACID and persistent
A single, platform-agnostic, memory-mapped file with a write-ahead log. Or keep it purely in memory.
Server and cluster
Run it embedded, as a server with users, roles and backups, or as a Raft cluster. TLS is built in.
Small and safe
Written in safe Rust with a minimal footprint. No third-party runtime dependencies by default.

One database, everywhere

Start embedded and move to a server or a cluster when you need it. The queries stay the same.
Db
The embedded database. Add it to any Rust application.
Server
agdb over HTTP: users, roles, backups and clustering.
Studio
The web GUI of the server: run queries, explore the graph, build dashboards.
API clients
OpenAPI clients for Rust, TypeScript, PHP and more.
Cloud
Hosted agdb, managed for you. Available on request.

Use it from any language

Official clients for Rust, TypeScript and PHP. Generate a client for any other language from the OpenAPI specification.
rusttsjsphppythonjavaccppcsharp

Not sure agdb fits your project?

Talk to the people who build it. We help with architecture, performance tuning and integration. The first 30 minutes are free.