CozoDB

Stale
GitHub Rust MPL-2.0

Description

CozoDB is a transactional, relational-graph-vector database that uses Datalog for queries. Designed as the hippocampus for AI, it unifies graph traversal, vector search, and relational queries.

Key Features

  • Datalog query language: powerful recursive queries with composable rules, superior to SQL for graph operations
  • Embeddable database: runs in-process like SQLite or in client-server mode for higher concurrency
  • Graph-native: handles graph traversal and algorithms (PageRank, community detection) natively within Datalog
  • Vector search: HNSW indices integrated within Datalog for seamless vector-graph relational queries
  • Time travel: track data changes over time and query historical states
  • Multi-platform: available for Rust, Python, Node.js, Java, Clojure, Go, Swift, Android, and browser WASM

Use Cases

💡 AI applications needing unified graph traversal, vector search, and relational queries
💡 Knowledge graph storage and reasoning with recursive Datalog rules
💡 RAG pipelines requiring both semantic vector search and graph-based context retrieval
💡 Embedded AI agents that need a lightweight, embeddable database with graph capabilities
💡 Data analysis combining classical graph algorithms with vector similarity search

Categories

Quick Start

Install via Cargo ('cargo add cozo'), pip ('pip install pycozo'), or npm ('npm install cozo-node'). Create a DB instance, define relations, and run Datalog queries. See docs.cozodb.org for the full tutorial.

Related Projects