Schema to Server
in Seconds
The database framework designed for AI agents. Field-level access control, versioned storage, and policy-as-code checkers give you the privacy controls teams need for GDPR-ready data layers — with guardrails that prevent destructive mistakes.
# MediaAtom.star
atom(
"FileAtom",
[field("name", required=True),
field("path", required=True),
field("size", required=True),
field("owner", required=True,
indexable=index_query_type.EQUALITY),
field("status", default="active")],
[],
{},
)
atom(
"MediaAtom",
[field("label", required=True),
field("some_field", required=True),
field("owner", required=True,
indexable=index_query_type.EQUALITY)],
[edge("MediaFileEdge", "FileAtom",
edge_direction.BOTH)],
{},
)Built for teams building
Everything You Need
A complete data layer with code generation, access control, and versioned storage.
Declarative Schemas
Define your data model once and everything is generated — types, validation, API endpoints, and storage.
atom("FileAtom",
[field("name", required=True),
field("size", type="int64")],
[], {},
)Graph Relationships
Model real-world connections between data types. Relationships are first-class with built-in traversal and lifecycle management.
edge("MediaFileEdge",
"FileAtom",
edge_direction.BOTH)GraphQL Out of the Box
One schema, two APIs. Every molecule serves an auto-generated GraphQL endpoint alongside gRPC — same types, same access policies, zero SDL to maintain.
{ note(key: "n1") {
title
noteTagEdge { label }
} }Privacy & Access Control
Fine-grained access policies on every read and write. Model ownership, roles, and graph relationships — "is there an admin edge to this record?" is one policy line.
# Owner can read their own data
# Admins can read everything
# Graph-aware: has_edge() policiesGDPR-Ready Data Layers
Field-level access control, versioned storage, and policy-as-code checkers map directly to GDPR primitives — minimization, right-to-erasure, and reviewable audit trails by design.
# Subject-keyed deletes for Art. 17
# Versioned writes = rectification trail
# Checkers = policy-as-code (Art. 25)
# Field-level reads = data minimizationVersioned Data & Schemas
Every write is version-tracked, and so is every schema: each revision is kept forever, so old data stays readable and names can be safely reused across generations.
set --schema FileAtom \
--key photo-001 \
--version 1 # conflict-free writes
schema-revisions --schema FileAtom
v1 62c1e3… # full history keptProduction Observability
Prometheus metrics on every layer — requests, storage ops, policy verdicts, background jobs — with ready-made Grafana dashboards shipped in every release.
"metrics": {
"listen_addr": "0.0.0.0:9464"
}
# + grafana_dashboards.zipAI-First Development
Pre-built skills let AI agents create schemas, checkers, and queries. Declarative design means fewer destructive operations and safer AI-driven development.
# AI agent uses skills to:
/create-atom # define schemas
/create-checker # set access policies
/create-context # configure authSecure Identity
Cryptographically signed request context ensures tamper-proof identity for every operation.
--ctx name=alice \
--ctx role=admin
# Signed and verified per requestFour Steps to a Running Server
Drop in the binary, declare your schema, and start querying. No code generation, no build step.
Get the Binary
Get the Binary
MoleculeDB is in early access. Reach out and we'll send you the moleculedb server plus the atom_cli client — single static binaries, no toolchain required.
# After you receive the binaries, drop them on your PATH:
$ chmod +x moleculedb atom_cli
$ mv moleculedb atom_cli /usr/local/bin/
$ moleculedb --help
Usage: moleculedb
Loads ./atom_config.json (or $ATOM_CONFIG)Define Your Schema
Define Your Schema
Write a .star file using the atom() and field() macros. moleculedb loads schemas at startup — no code generation, no rebuild.
# MyAtom.star
atom(
"MyData",
[field("title", required=True),
field("owner"),
field("count", type="int64"),
field("active", type="bool",
default="true")],
[], # edges
{}, # namespaces
)Configure the Server
Configure the Server
Point moleculedb at your schema and pick a storage backend. DynamoDB and Spanner are both supported for production scale-out — swap to Filesystem for local dev.
{
"backend": "DynamoDb",
"dynamodb": {
"region": "us-east-1",
"table_name": "atom_storage",
"auto_create_table": true
},
"port": 50051,
"schema_files": ["./MyAtom.star"]
}Run & Query
Run & Query
Start the server, then create and read data with atom_cli over gRPC.
$ moleculedb
Loaded 1 schemas: ["MyData"]
Starting moleculedb on 0.0.0.0:50051
$ atom_cli set --schema MyData \
--key item-001 --version 1 \
--json '{"title":"Hello","owner":"alice"}'
OK version=1
$ atom_cli get --schema MyData \
--key item-001 --json
{"title":"Hello","owner":"alice",
"active":"true","count":"0"}Interested in MoleculeDB?
We're building the next generation of schema-driven data infrastructure. Register to stay updated.