GitHub - 0nelight/sutra-os: Scarce Units, Typed, Related, Actionable. An open-source, self-hosted ontology platform.
Pangram verdict · v3.3
We believe this text is mainly AI, with some human-written content.
AI likelihood · overall
AIArticle text · 1,385 words · 25 segments analyzed
Scarce Units, Typed, Related, Actionable.
An open-source, self-hosted ontology platform.
Your data becomes one model you own: typed, linked, changed only through rules the server enforces, and every number traces back to its source.
Quick start · How it works · Proposals · Python SDK · Contributing Beta.
Only small parts are still alpha: the model language and APIs may still change between versions, and parts of the user interface and docs are unfinished.
Maintainers wanted.
Sutra-OS is a one-person project so far.
See Contributing.
Motivation Sutra-OS began in late 2025 as a thought experiment: a free version of the system described in Ontology-Oriented Software Development, whose creators I deeply admire.
Much talent today goes into software that sells attention, while the software everything else runs on is mostly free: by a rough estimate, 70–90% of US economic output depends on free software at some critical point.
That openness is not guaranteed. In November 2026, Nvidia's board parted with the founder who had its AI models released openly. Sutra-OS adds to the commons under the AGPL, so that it stays readable by anyone.
The past ten years have shown what it costs when nobody can see what depends on what. In 2017, NotPetya spread through a single Ukrainian accounting program and stopped Maersk's ports and Merck's factories. In 2023, a corrupted file in one FAA system halted every domestic departure in the US. In 2024, one faulty CrowdStrike update crashed millions of Windows machines, and airlines, hospitals and banks stood still. In November 2026, a single vendor took Outlook down for a day and some cities went back to fax. That same week, data flooded the FAA's telecommunications network, aging routers buckled, and the US saw only the third nationwide ground stop in its history. No one, it seems, had those routers on the map of what keeps planes in the air, so no one could ask beforehand what would stop if they failed. That question is what Sutra-OS is built for. Every system, device, dataset and decision becomes an object with links to what it feeds and what feeds it, and every number can be traced back to its source. Whoever holds such a model can ask, before the outage, what stops when one piece fails, and get an answer, at every scale from a single person to a government (hopefully never a world government). Many small ontologies, each held by those it describes, keep power spread out; one model of everything would not. Scarce Units: energy, water, land, housing and time will shape the coming decades. Whoever counts what is scarce decides how it is shared, and today that bookkeeping sits with a few platforms; for most people, the only trace their own data leaves in their life is the tendinitis from the hundredth weary click on "Accept all" in a cookie banner. Sutra-OS keeps the bookkeeping with those it concerns, under rules everyone can read: households, farms, workshops, clubs, newsrooms and public administrations get their records back, and their wrist with them. That is what a democracy needs from its software: a council that can trace the number behind a decision to its source, a change that stays a proposal until someone answers for it, and a public administration accountable to its voters rather than to a vendor under another country's law.
Who it is for Almost everyone.
Whoever you are, someone else keeps a better-connected record of your affairs than you do.
Sutra is for anyone who wants their own.
Quick start Requirements: Linux x86_64, JDK 21, the Clojure CLI, Node.js, Python 3, git. git clone <repository-url> sutra && cd sutra (cd clients/frontend && npm install) bin/sutra-solo This starts an embedded PostgreSQL and the server on 127.0.0.1 and prints the address. Data lives in $SUTRA_HOME (default ~/.local/share/sutra). The admin password is in zugang.edn ("access") there.
Run the bin/sutra bind … line it prints once.
How it works Three ideas carry the whole platform: object types, link types and action types. The examples below use the farm model in resources/presets.
1.
Object types: what is there You start by saying what exists: a lot of hay, from one field and one cut; a sale, to one buyer. Each is a typed thing with a kind and a key. :objects {:lot {:name "Hay lot" :plural "Hay lots" :symbol "🌾" :title :name :primary-key :name :match-keys [:name] :attributes [[:name :string {:name "Lot"}] ; "North Meadow, 1st cut 2026" [:baled :integer {:name "Bales made" :constraints {:min 0}}] [:sold :integer {:derived {:expression [:connected-sum :sales :bales]}}] [:in-barn :integer {:name "In the barn" :visibility :prominent :derived {:language :clojure :expression [:- [:get :baled] [:get :sold]] :inputs [:baled :sold]}}]]} :sale {:name "Sale" :symbol "🤝" :primary-key :sale-nr :match-keys [:sale-nr] :attributes [[:sale-nr :string] [:lot :string] [:buyer :string] [:bales :integer {:constraints {:min 1}}] [:price-per-bale :decimal] [:sold-on :date] [:sold-by :string]]}} Nobody types or counts :in-barn: it is the bales made minus every bale sold, computed by the server. :bales is an integer, so "about forty" or -3 is refused before anything is written. An object type is a typed table with a name, a face in the UI and a class in the generated SDK. Properties are typed, constrained and can be derived, so a value nobody typed in still shows up like any other column.
2.
Link types: who belongs to whom A sale on its own is just a number. A sale linked to the lot it came out of is a fact everyone can see. :links [[:sale-lot :sale :lot :many-to-one {:fk :lot :forward-api-name :lot :reverse-api-name :sales}]] The sale names its lot and the link follows it: from the lot you see its sales, from a sale its lot, and :connected-sum above sums across that link. One line, and the barn knows what is in it. Links are first-class: named in both directions, navigable in the UI, traversable in the SDK (lot.sales), and usable in derived values, filters and object sets.
3.
Action types: what you're allowed to do In most systems anybody may change anything, and nobody can say who did. Here there is no "update row". There are only actions: named decisions with typed inputs and rules the server enforces. Selling hay is one of them, and it has a condition. :sell-hay {:on :lot :params {:lot {:type :lot :required true} :sale-nr {:type :string :required true} :buyer {:type :string :required true} :bales {:type :integer :required true :constraints {:min 1}} :price-per-bale {:type :decimal} :sold-on {:type :date :prefill :now} :sold-by {:type :string :exposure :hidden :prefill :current-user}} :submission-criteria [{:message "Not that many bales in the barn." :test {:want [:get :bales] :have [:get :lot :in-barn]} :pred [:<= :want :have]}] :rules [{:op :create :object-type :sale :values {:sale-nr [:get :sale-nr] :lot [:get :lot :name] :buyer [:get :buyer] :bales [:get :bales] :price-per-bale [:get :price-per-bale] :sold-on [:get :sold-on] :sold-by [:get :sold-by]}}] :edits [{:object-type :sale}]} Ask to sell more bales than are in the barn and the server refuses and says why, with the same sentence for the phone, the CLI, the Python script and the AI agent. A refused action writes nothing. Every sale records who made it, and nobody can put someone else's name there. Actions are the only write path: typed parameters, validation, submission criteria and state transitions, defined once and enforced everywhere. Every rule you would otherwise keep in your head has this shape: a fact the server computes, and an action that checks it. Declare it once, and stop remembering it. The same three ideas run the arable side of the farm. A field's margin is derived from its paid harvests and the hay sold off it, two links away. A harvest moves from planted to harvested, delivered and paid only through its actions, and Sell harvest refuses to run without a signed delivery note and a quality test of your own. Nothing happens until you say so In most software, deciding and doing are one step. In Sutra they are two. When you sell hay, the server first writes down what would change: one new sale, forty bales, your name on it. Nothing has happened yet. Only when that note is approved does the barn change. Everything else follows from that: You can always ask first. "Would this work?" is the same question, without the last step. An agent can only make suggestions. What it hands back is the note, never the change.
You decide.