Search

Lib.rs

› Database interfaces
#vector-search #embedding #vector-database

anda_db

Anda DB is a Rust library designed as a specialized database for AI Agents, focusing on knowledge & memory

Owned by 0xZensh.

  • Install
  • API reference
  • Source
  • Repository link

60 releases

Uses new Rust 2024

0.7.28 Apr 29, 2026
0.7.24 Mar 26, 2026
0.7.2 Dec 31, 2025
0.7.1 Sep 13, 2025
0.4.4 Jul 24, 2025

#954 in Database interfaces

Download history 47/week @ 2026-01-18 22/week @ 2026-01-25 11/week @ 2026-02-01 4/week @ 2026-02-15 7/week @ 2026-02-22 16/week @ 2026-03-08 23/week @ 2026-03-15 47/week @ 2026-03-22 36/week @ 2026-03-29 35/week @ 2026-04-05 59/week @ 2026-04-12 18/week @ 2026-04-19 141/week @ 2026-04-26 158/week @ 2026-05-03

383 downloads per month
Used in 10 crates (5 directly)

MIT license

1MB
17K SLoC

anda_db

anda_db is the embedded database core of the AndaDB workspace. It gives Rust applications schema-aware collections, object-store-backed persistence, and three built-in retrieval modes: B-Tree for exact and range filters, BM25 for full-text search, and HNSW for vector similarity search.

What This Crate Provides

  • Database lifecycle management through AndaDB
  • Schema-aware collections and document CRUD
  • B-Tree, BM25, and HNSW index integration
  • Hybrid search with reciprocal-rank fusion reranking
  • Object-store-backed persistence with checkpoints, flushing, and recovery
  • Lightweight metadata extensions at database and collection scope

When to Use It

Use anda_db when you want:

  • an embedded database inside a Rust service
  • durable AI memory without operating an external database service
  • structured, lexical, and semantic retrieval in one collection model
  • local development on filesystem or in-memory storage, with optional cloud object storage in production

Getting Started

Add the crate to your project:

[dependencies]
anda_db = { version = "0.7", features = ["full"] }
object_store = { version = "0.13", features = ["fs"] }
tokio = { version = "1", features = ["full"] }
serde = { version = "1", features = ["derive"] }

For a complete runnable example, see:

  • examples/db_demo.rs
  • cargo run -p anda_db --example db_demo --features full

For a product-level introduction, see the workspace root README.

Technical Reference

Deep technical documentation for this crate lives in:

  • docs/anda_db.md
  • docs/anda_db_schema.md
  • docs/anda_db_btree.md
  • docs/anda_db_tfs.md
  • docs/anda_db_hnsw.md
  • docs/anda_object_store.md

Related Crates

  • anda_db_schema for field types, schemas, and documents
  • anda_db_derive for AndaDBSchema and FieldTyped
  • anda_db_btree for exact and range indexing
  • anda_db_tfs for BM25 full-text search
  • anda_db_hnsw for vector search
  • anda_object_store for metadata and encryption wrappers over object_store

License

MIT. See LICENSE.

Dependencies

~55MB
~784K SLoC

  • anda_db_btree
  • anda_db_hnsw
  • anda_db_schema
  • anda_db_tfs+full
  • anda_db_utils
  • async-compression+tokio+zstd
  • bytes
  • ciborium
  • croaring 2.3
  • futures+async-await+std
  • ic_auth_types+xid
  • log+kv+kv_serde
  • moka+future
  • object_store 0.13+tokio
  • parking_lot
  • rustc-hash 2.0+std
  • serde+std+derive
  • tantivy? tantivy-jieba? tantivy 0.26
  • tantivy-jieba? tantivy-jieba
  • thiserror 2.0
  • tokio+macros+sync+parking_lot+io-util+time
  • tokio-util
  • zstd-safe+experimental
  • dev anda_object_store
  • dev serde_json+std
  • dev structured-logger

Other feature

  • full
Related: anda_engine, anda_hippocampus, anda_cognitive_nexus, anda_kip, anda_db_hnsw, anda_db_utils, anda_assistant, anda_nexus
See also: lancedb, ruvector-core, velesdb-core, chromadb, contextdb-parser, contextdb-core, triviumdb, edgevec, faiss, hannoy

Lib.rs is an unofficial list of Rust/Cargo crates, created by kornelski. It contains data from multiple sources, including heuristics, and manually curated data. Content of this page is not necessarily endorsed by the authors of the crate. This site is not affiliated with nor endorsed by the Rust Project. If something is missing or incorrect, please file a bug.