Schema to Server
in Seconds
The database framework designed for AI agents. Pre-built skills make schema design, access control, and data operations simple for LLMs — 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)Privacy & Access Control
Fine-grained access policies on every read. Model ownership, roles, and complex privacy rules with chainable checkers.
# Owner can read their own data
# Admins can read everything
# Chain multiple policies per typeVersioned Storage
Every write is tracked with automatic version control. No lost updates, no conflicts, full audit trail.
set --schema FileAtom \
--key photo-001 \
--version 1 # conflict-free writesAI-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
Define your schema, generate code, and deploy. No boilerplate.
Define Your Schema
Define Your Schema
Write a .star file using the atom() and field() macros to declare your data types and relationships.
# my_app/MyAtom.star
atom(
"MyData",
[field("title", required=True),
field("owner"),
field("count", type="int64"),
field("active", type="bool",
default="true")],
[], # edges
{}, # namespaces
)Define Request Context
Define Request Context
Create a context proto to carry caller identity — name, role, and custom claims — with every request.
# my_app/context.proto
syntax = "proto3";
message RequestContext {
string name = 1;
string role = 2;
}Generate & Build
Generate & Build
Add build targets. Code generation produces handlers, protobuf definitions, and the server binary.
# my_app/BUILD.bazel
atom_proto_rule(
name = "my_atom_gen",
srcs = ["MyAtom.star"],
package = "my_app",
languages = ["rust"],
)
atom_object(
name = "my_atom_object_gen",
star = "MyAtom.star",
package = "my_app",
checkers = {
"MyData": ["//checker:allow_all"],
},
)
molecule(
name = "my_molecule_gen",
handler_crate_names = ["my_atom_object"],
port = 50051,
)Deploy & Query
Deploy & Query
Build the server, start it, and interact with your data through the CLI or any gRPC client.
$ bazel run //my_app:my_molecule
Server listening on 0.0.0.0:50051
$ atom_cli set --schema MyData \
--key item-001 \
--json '{"title":"Hello","owner":"alice"}' \
--version 1
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.