The embedded database with git-like powers

Branch, time-travel, merge, and search — across six built-in data primitives. Built from scratch.

branch visualization
main
user: {"name": "Alice"}
config: {"theme": "dark"}
state: {"step": 1}
>>>db.kv.put("user", {"name": "Alice"})
6
Primitives
250K+
Ops/sec
<1ms
Branch switch
60+
MCP Tools
Scroll
The Problem

Your data deserves version control

Traditional databases overwrite state and lose history. They can't branch, can't travel through time, and can't search across all your data at once.

Without Strata
  • Experiments pollute production data
  • No way to query past state or travel through time
  • Juggling Redis + Postgres + Pinecone + more
  • Complex infrastructure for simple application state
With Strata
  • Branch data for safe, isolated experiments
  • Travel through time with point-in-time snapshots via db.at(timestamp)
  • One library: KV, vectors, events, JSON, state + intelligent search
  • Zero dependencies, embedded in your process

Branch & Merge

Fork your data state in microseconds. Run experiments in isolation. Merge successful changes back — just like git.

Travel Through Time

Query any past state with point-in-time snapshots. Built-in versioning tracks every change with timestamps.

Search Intelligently

Natural language search across all your data. StrataDB finds relevant results in KV, events, JSON, and vectors — with automatic query expansion and reranking.

Six Primitives

One database, every data type

Purpose-built primitives that work together. Each optimized for specific workflows.

kv

Key-value storage where every write is versioned. Full history, prefix scanning, and time-travel queries built in.

db.kv.put("user:1", {"name": "Alice"})
db.kv.get("user:1")  # {"name": "Alice"}
db.kv.history("user:1")  # Every version, timestamped

event

Append-only event streams for audit trails, replay debugging, and deterministic execution.

db.events.append("actions", {"type": "click"})
db.events.list("actions", after=10, limit=5)
# Replay from any point in history

state

Single-value containers with compare-and-swap for safe concurrent access across processes.

db.state.set("counter", 0)
db.state.cas("counter", 1, expected=0)  # OK
db.state.cas("counter", 2, expected=0)  # Fail

json

Structured documents with path-based access and atomic partial updates.

db.json.set("profile", "$.user", {"name": "Alice"})
db.json.get("profile", "$.user.name")  # "Alice"
db.json.set("profile", "$.user.role", "admin")

vector

Semantic similarity search with HNSW indexing for embeddings and RAG workflows.

coll = db.vectors.create("docs", dimension=384)
coll.upsert("d1", embedding, metadata=meta)
coll.search(query_vec, k=5)

branch

Fork, diff, and merge your entire data state. Instant branch creation with full isolation.

db.branches.create("experiment")
db.checkout("experiment")
# ...make changes, then merge or delete
Developer Experience

See it in action

Four capabilities that change how you think about data.

1 Safe experimentation

experiment.py
Strata
# Fork your data to try something risky
db.branches.create("redesign")
db.checkout("redesign")

# Change anything — main is untouched
db.kv.put("config", {"theme": "new-look"})
db.json.set("layout", "$", new_layout)

# Worked? Merge it. Didn't? Delete it.
db.merge("redesign")

2 Time travel

time_travel.py
Strata
# Something broke. What changed?
snapshot = db.at(yesterday)
old = snapshot.kv.get("config")
new = db.kv.get("config")

# Full version history for any key
db.kv.history("config")
# [{"value": ..., "version": 3, "timestamp": ...}, ...]

3 Built-in auto embedding

embed.py
Strata
# One flag — every write becomes searchable
db = Strata.open("./mydb", auto_embed=True)

# Write data normally across any primitive
db.kv.put("user:1", {"name": "Alice", "role": "engineer"})
db.events.append("logs", {"msg": "Deploy v2.3 started"})

# Search across everything with natural language
db.search("who is an engineer?")  # Finds user:1

4 Native LLM integration

ask.py
Strata
# Point at any OpenAI-compatible endpoint
db.configure_model(
    endpoint="http://localhost:11434/v1",
    model="qwen3:1.7b",
)

# Ask complex questions across all your data
results = db.search(
    "what changed before the deploy failed?",
    mode="hybrid", expand=True, rerank=True,
)
Performance

Speed when you need it

Built in Rust with zero-copy operations and async I/O. Benchmarked, measured, proven.

250K+
ops/second

Single-threaded Cache mode. 800K+ with 4 threads.

<10
microseconds

P99 read latency on fast path. Memory-mapped for speed.

<1
millisecond

Branch creation and switching. Zero-copy fork semantics.

Choose your durability

Three modes to match your use case

Mode Throughput Durability Best for
Cache 250K+ ops/s None (memory only) Testing, caches, development
Standard 50K+ ops/s Periodic fsync (batched) Most production workloads
Always ~500 ops/s fsync every commit Critical data, zero loss
Verified crash recovery
Fuzzing tested
100% memory safe (Rust)
Apache 2.0 licensed
Get Started

Up and running in seconds

Choose your preferred language and start building.

terminal
$ pip install stratadb

Current version: 0.12.5 View changelog

Ready to upgrade your data layer?

StrataDB is open source and production-ready. Branching, time travel, auto embedding, intelligent search, and six data primitives — in one embedded library.

Apache 2.0 License
Active Development
Growing Community