Ontology overview

Architecture and design: how Markland Street builds and runs your implementation. At its centre is the Ontology, a live model of your operation. It turns the rows in your ERP, plant historian, point of sale, lab system and carrier feeds into one model: the objects the operation runs on, the links between them and the actions that change them. Every screen, agent and automation reads from it and writes through it

ObjectsTyped records for every real thing: a silo, a batch, a shop, a reefer run
LinksRelationships you can traverse, filter and aggregate across
ActionsThe only way state changes: typed, permissioned, logged
FunctionsVersioned logic that reads objects and computes edits

In the platform today

Built
  • The platform service runs on sample data for three demo companies: an airline, an ice cream maker and a general contractor
  • It covers object, link and action types read from ontology.yaml, pipelines over Delta Lake tables, actions with conditions, approvals, writeback to raw tables or a system's own API and a hash-chained audit log, scheduled and triggered pipelines with quarantine, contracts and rollback, scheduling boards, discussion and object history, attachments, trained and forecast models, monitors, a directory with SCIM, retention and erasure, solution packages, agents, AI functions, the Assistant, and the REST API under /api/v2
  • Pages marked Built describe it
In the demo
  • The demo app shows the parts marked In the demo, running in the browser on sample data
On request
  • The rest of these pages is delivered in each implementation, and each page says which it is under its title
  • The status guide explains the statuses

Why an ontology

Most operations already have the data they need. It is spread across a dozen systems that each describe a different slice of the same reality, with different keys, different refresh rates and different owners. A planner who wants to know whether Saturday's shops will run short has to join the point-of-sale export to the production schedule to the carrier's ETA by hand, and by the time the spreadsheet is done the answer has changed

The Ontology does that join once, continuously, and in the language of the business. A Scoop shop object carries its stock by flavour from the point of sale, its freezer temperature from the sensor gateway and its staffing from the scheduling tool. It is linked to the Reefer delivery objects that serve it, which are linked to the Production batch objects they carry, which are linked to the QA test results that released them. A question that used to take an afternoon becomes a traversal that takes milliseconds

Because decisions are also modelled, the Ontology does not stop at reporting. When a person or an agent decides to add tubs to a truck, the change is an action on the Ontology: validated against its rules, checked against the person's permissions, written back to the system of record and recorded in the action log with the data it was based on

The two layers

We describe the Ontology in two layers. The model layer says what the operation is made of. The action layer says how it changes. A model with only the first is a data catalogue. A model with both is a system that can run an operation

Applications and agents Operations view · simple view · assistant · agents · reports · SDK clients read objects write through actions Model layer What the operation is Object typesShop, Batch, Silo, Farm PropertiesValue types, units, access labels Link typesdelivery → shop, batch → test Action layer How the operation changes Action typesReroute, hold, release FunctionsRunway, cover, recall scope AutomationsConditions that start work edits sync and index writeback Source systems ERP · MES and historian · point of sale · LIMS · telematics · email · files
Applications never read source tables directly. They read objects and write through actions, which is what lets one permission model, one audit trail and one writeback path serve every screen and every agent

Model elements

ElementWhat it isExample
Object typeA kind of thing the operation tracks, such as a batch or a truck run, filled from one or more datasetsProduction batch, keyed on batch number
PropertyA typed attribute of an object type, optionally constrained by a value typefreezerTemp, a temperature in °C through the shared property temperatureC
Link typeA named relationship between two object types, with a cardinalityA Reefer delivery delivers to many Scoop shops
InterfaceA shape that several object types implement, so tools can work across themCold storage asset: anything that keeps milk or product cold, with a temperature and a setpoint
Value typeA reusable, constrained base type with meaningtemperature-c, Temperature °C, from −60 to 100

Action elements

ElementWhat it isExample
Action typeA governed set of edits with parameters, action conditions and side effectsplace-hold: stop a batch from shipping until QA releases it, notify quality
FunctionVersioned TypeScript or Python logic over objects, callable from actions, apps and agentsweekend_cover(shopId) returns a shop's weekend demand against stock and arrivals, by flavour
AutomationA condition on objects that starts an agent, a function or an actionWhen a silo passes 60 hours, ask the milk receiving agent, agt-milk, for a draw plan
AgentA configured reasoner with tools over the Ontology that proposes actions for a person to approveWeekend readiness planner, agt-weekend

How data becomes objects

Source data never becomes an object by accident. It moves through a fixed path, and every hop is observable in lineage

  1. Connect. A connector syncs a source table into a raw dataset in your open table storage, through an edge agent on the plant network or directly from a cloud system. Change data capture keeps it current; batch and file sources run on a schedule
  2. Shape. A pipeline cleans, joins and keys the raw data into a backing dataset with one row per object. Pipelines are incremental, so only changed partitions recompute. Quality checks block a build that would publish bad rows
  3. Index. The sync service reads the backing dataset's change feed and writes object versions into the object store and the search index, in order, exactly once
  4. Serve. The object query service answers filters, traversals, searches and aggregations, applying the reader's permissions to every object and every property
  5. Act. An action validates and applies edits. Edits land in the object store immediately and are written back to the system of record through its writeback connector
Edits and source data never fight

Every property records whether its current value came from the source or from an action. When a source later changes a value a person edited, the conflict policy on the object type decides which wins: the source, the edit, or the most recent of the two. The default keeps the edit and raises a review task

A worked example

The examples in these docs use an illustrative ice cream maker with a creamery, raw milk silos, two production lines, a fleet of refrigerated trucks and fourteen scoop shops. Here is the slice of its ontology that answers the question "will an open shop run short this weekend, and what can we do about it"

Dairy farm12 objects Milk pickuptanker runs Raw milk silo72 h limit Production batchB-0841 on hold Reefer deliveryDLV-5521, at risk Scoop shoptubs by flavour QA testfill, fat, grading picks up fills draws ships delivers to tested by
Seven object types and six link types are enough to trace a tub in a shop back to the farm whose milk made it, and forward from a failed quality check to every shop holding the affected lot

In code, through the generated Client SDK, the question reads the way a planner would ask it

import { Client } from "@marklandstreet/ontology-client";
// ontology-types.ts is generated from your ontology
import { Shop, topUpDelivery, type Ontology } from "./ontology-types.ts";

const mso = new Client<Ontology>("https://creamery.ontology.marklandstreet.com", { getToken });

// Open shops, and the runs not yet on the road to them
const atRisk = await mso.objects(Shop)
  .where({ status: { $ne: "Closed" } })
  .follow("delivery-stop-shop")
  .follow("delivery-stop-delivery")
  .where({ status: { $in: ["Scheduled", "At risk"] } })
  .page({ pageSize: 50, orderBy: "eta" });

On request, the same question can filter on a function's result, such as the tubs each shop will be short this weekend

  .derive({
    short: { function: "weekend_cover", args: { shopId: "$key" }, property: "short" },
  })
  .where({ short: { $gt: 0 } })

The answer is not a report. Each returned Reefer delivery exposes the actions the caller is allowed to run on it, so the same screen that shows the risk offers the fix

const result = await mso.actions(topUpDelivery).run(
  { delivery: atRisk.data[0], tubs: 12 },
  { includeEdits: true }
);
// result.edits: 2, the run's tubs and pallets and a new manifest line
// result.writeback: the dispatch manifest update
// result.logId: "alog_01M5Y75C50…", in the action log with the caller and the parameters

Who uses the Ontology, and how

Guarantees

These are the properties the Ontology is specified to hold for every object type, every action and every caller, whether it is a person, an app or an agent

GuaranteeHow it holds
One permission modelRow and field access are evaluated in the query service on every read, for every client. An agent reads with the permissions of the person it acts for, never more
Atomic actionsAll edits of one action commit in one transaction or not at all, with optimistic concurrency on every object version touched
Read-your-writesA caller that applies an action sees its own edits on the next read, before the index has caught up. Other readers see them within the indexing target, under two seconds
Complete auditEvery action, every agent step and every administrative change lands in an append-only, hash-chained audit log that can be exported to your own storage
Your data, openBacking datasets live as open tables in storage you control. You can read every row without us, and leave with all of it

Where to go next