惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

雷峰网
雷峰网
L
LangChain Blog
GbyAI
GbyAI
F
Fortinet All Blogs
腾讯CDC
Last Week in AI
Last Week in AI
A
About on SuperTechFans
J
Java Code Geeks
Microsoft Azure Blog
Microsoft Azure Blog
博客园 - Franky
B
Blog
D
Docker
G
Google Developers Blog
月光博客
月光博客
博客园 - 三生石上(FineUI控件)
S
SegmentFault 最新的问题
Apple Machine Learning Research
Apple Machine Learning Research
酷 壳 – CoolShell
酷 壳 – CoolShell
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
T
Tailwind CSS Blog
宝玉的分享
宝玉的分享
U
Unit 42
Blog — PlanetScale
Blog — PlanetScale
B
Blog RSS Feed

DEV Community

Authentication Security Deep Dive: From Brute Force to Salted Hashing (With Java Examples) Why AI Systems Don’t Fail — They Drift Spilling beans for how i learn for exam😁"Reinforcement Learning Cheat Sheet" I Replaced Chrome with Safari for AI Browser Automation. Here's What Broke (and What Finally Worked) How Python Borrows Other People's Work The $40 Architecture: Processing 1 Billion API Requests with 99.99% Uptime Vibe Coding: A Workflow Guide (From Zero to SaaS) Most webhook security guides protect the wrong side. The scary part is delivery. Headless CMS for TanStack Start: Build a Blog with Cosmic EU Age Verification App "Hacked in 2 Minutes" — What Actually Happened Comfy Cloud’s delete function does not actually remove files Running AI Models on GPU Cloud Servers: A Beginner Guide Event-driven media intelligence with AWS Step Functions and Bedrock I scored 500 AI prompts across 8 quality dimensions — here's what broke How to Call Google Gemini API from Next.js (Free Tier, No Backend Needed) The Portal Protocol: Reclaiming Human Connection in the Age of AI How to Fix Your Team's Scattered Knowledge Problem With a Self-Hosted Forum Intro to tc Cloud Functors: A Graph-First Mental Model for the Modern Cloud Designing Multi-Tenant Backends With Both Ownership and Team Access I Built a Neumorphic CSS Library with 77+ Components — Here's What I Learned PostgreSQL Performance Optimization: Why Connection Pooling Is Critical at Scale Cómo construí un SaaS multi-rubro para gestionar expensas en Argentina con FastAPI + Vue 3 🚀 I Built an Ethical Hacking Scanner Tool – Open Source Project I Replaced /usage and /context in Claude Code With a Single Statusline A Pythonic Way to Handle Emails (IMAP/SMTP) with Auto-Discovery and AI-Ready Design I Collected 8.9 Million Polymarket Price Points — Here's What I Found About How Markets Really Move EcoTrack AI — Carbon Footprint Tracker & Dashboard Everyone's Using AI. No One Agrees How. 5 self-hosted ebook managers worth trying in 2026 Building Your First AI Agent with LangChain: From Chatbot to Autonomous Assistant
Minigraf 1.0: An Embedded Bi-Temporal Datalog Database in...
Aditya Mukho · 2026-05-02 · via DEV Community

Today I'm releasing Minigraf 1.0 — a single-file embedded graph database written in Rust, with Datalog as its query language and bi-temporal semantics built in.

If you've ever wanted Datomic but embedded, or SQLite but for connected data with full history, this is that. One .graph file, no server, no clustering, no Java runtime. It runs natively, in WebAssembly, on Android, on iOS, and inside agent processes.

The shape of the problem

Most agent memory today is one of two things: a vector store, or a pile of JSON files. Both are wrong for the same reason — they don't model the relational structure of what an agent knows, and they don't preserve when it knew it.

A coding agent that decided last Tuesday to use Postgres over MongoDB needs to remember not just the decision, but the rationale, the alternatives considered, and what the codebase looked like at the time. A vector store can find a similar-sounding chunk; it can't reconstruct the decision graph. A JSON pile can store the data; it can't query "show me every decision motivated by performance concerns made before the v2 refactor."

That second query — graph traversal scoped by time — is what Minigraf is built for.

What 1.0 actually ships

The core query model is Datalog over EAV triples (entity-attribute-value), which is the same model Datomic and XTDB use. Minigraf's contribution is the packaging:

  • Bi-temporal by design. Every fact carries both transaction time (when it was recorded) and valid time (when it was true in the world). Retract a fact and the history is preserved — you can replay the database state at any past moment.
  • Single file, embedded. Minigraf::open("data.graph") and you're running. No daemon, no port, no config. The entire database is one file you can ship, version, or sync.
  • Recursive Datalog rules. Multi-hop graph traversals are native, not bolted on. Reachability, transitive closure, and path queries are one rule each.
  • Prepared statements. Parse and plan once, execute thousands of times with $slot bind tokens. Roughly the same ergonomics as sqlite3_prepare_v2.
  • Window functions in :find. sum, count, min, max, avg, rank, row_number with :over (partition-by … :order-by …). Aggregations without dropping out of Datalog.
  • Mobile and WASM. Native Kotlin (.aar) and Swift (.xcframework) bindings via UniFFI. Browser WASM via wasm32-unknown-unknown, server WASM via wasm32-wasip1.
use minigraf::{Minigraf, OpenOptions};

let db = OpenOptions::new().path("agent.graph").open()?;

db.execute(r#"
    (transact [[:decision-42 :decision/chose "postgres"]
               [:decision-42 :decision/considered "mongodb"]
               [:decision-42 :motivated-by :perf-concern]])
"#)?;

// What did we believe at transaction 100?
db.execute(r#"
    (query [:find ?choice
            :as-of 100
            :where [?d :decision/chose ?choice]
                   [?d :motivated-by :perf-concern]])
"#)?;

Enter fullscreen mode Exit fullscreen mode

What it isn't

Minigraf is deliberately not distributed, not cluster-scale, and not client-server. It's optimised for sub-million-node graphs that live next to a single process — an agent, a mobile app, a browser tab. If you have a billion nodes and a fleet of services, you want XTDB or Neo4j. If you have an agent that needs to remember a month of decisions and replay any past state, you want Minigraf.

It's also not a time-series database. Time-series tools (InfluxDB, Prometheus) are optimised for measurements at a point in time. Minigraf is optimised for facts with full retraction history — different problem, different shape.

Why now

The bi-temporal-graph thesis isn't new. Datomic has had it since 2012; XTDB built on the idea; my own previous project, RecallGraph, was pursuing the same vision in 2019. What's new is the audience.

Agents are the use case bi-temporal databases were waiting for. An agent's memory has all the structural properties — entities with relationships, beliefs that get corrected, decisions with provenance, states that need to be reconstructed at past moments — that bi-temporal Datalog was designed for. The vector store wave gave us "find similar," but agents that reason need "what did I believe and why." Minigraf is built for that second question.

How to try it

[dependencies]
minigraf = "1.0"

Enter fullscreen mode Exit fullscreen mode

Or:

cargo add minigraf

Enter fullscreen mode Exit fullscreen mode

The repo is at github.com/project-minigraf/minigraf. The README has a quickstart, the wiki has a Datalog reference and a comparison page (vs XTDB, Cozo, Neo4j, SQLite), and there's a working agent memory skill at github.com/project-minigraf/temporal_reasoning that demonstrates the bi-temporal model end to end.

If you build something on Minigraf, I want to hear about it — open a Discussion on the repo or reach out directly. The next phase of the project is shaped by what people actually use it for, and 1.0 is when that conversation starts.

⭐ Star the repo if the thesis resonates — it helps surface the project to others working on similar problems.