|
| 1 | +--- |
| 2 | +title: "The Ontology Is the Software" |
| 3 | +description: "Enterprise software has changed its interface three times and its user never. Agents are the first new user in forty years, and what they need is not an API but an ontology — one the runtime can run, AI can write, agents can operate, and the enterprise owns." |
| 4 | +author: ObjectStack Team |
| 5 | +date: 2026-10-05 |
| 6 | +tags: [ai, ontology, architecture, positioning, agents] |
| 7 | +--- |
| 8 | + |
| 9 | +Enterprise software has changed its interface three times. Terminals and forms, |
| 10 | +where people adapted to the software. Web and mobile, where the software adapted |
| 11 | +to people. And now a conversation box, where the software seems to disappear |
| 12 | +into language. Through all three, one thing never changed: the user was a |
| 13 | +person. The API was written for a programmer, the documentation for a reader, |
| 14 | +the audit log for an auditor. |
| 15 | + |
| 16 | +That is the part that changes now, and it changes more than the interface ever |
| 17 | +did. The first user of the next generation of enterprise software is an agent. |
| 18 | +Objects are tools. Actions are tools. Permissions decide what an agent may call, |
| 19 | +and audit records what it did. A conversation box is only the place where a |
| 20 | +person talks to *their* agent; what the agent then talks to is the enterprise. |
| 21 | + |
| 22 | +So the question is not what the next interface looks like. It is what an |
| 23 | +enterprise has to be, so that an agent can read it, run it, and be stopped by |
| 24 | +it. Our answer is a single sentence that now opens this project's README: |
| 25 | + |
| 26 | +> **The ontology is the software.** One executable business ontology. AI writes |
| 27 | +> it, the runtime runs it, agents operate it, you own it. |
| 28 | +
|
| 29 | +This post is the long form of that sentence: what we mean by the word, why code |
| 30 | +recedes, why this is possible now and was not five years ago, which mechanisms |
| 31 | +back each of the four promises, what the ontology is *not*, and what we have not |
| 32 | +figured out. |
| 33 | + |
| 34 | +## What an enterprise actually wants to say |
| 35 | + |
| 36 | +Strip any business application down to what the business meant by it, and you |
| 37 | +get one sentence with five parts: *what we have, how it relates, what can be |
| 38 | +done to it, who may do it, and what happens when.* |
| 39 | + |
| 40 | +- **What we have** — the objects and their fields. A ticket has a subject, a |
| 41 | + priority, a status, a due date. |
| 42 | +- **How it relates** — lookups and master-detail links. A ticket belongs to an |
| 43 | + account; a line item belongs to an order. |
| 44 | +- **What can be done** — actions. *Resolve* a ticket; *convert* a lead. |
| 45 | +- **Who may do it** — permissions. Role-based access, row-level and field-level |
| 46 | + security, sharing rules. |
| 47 | +- **What happens when** — flows. A record trigger, a scheduled job, an approval |
| 48 | + chain, a workflow state machine. |
| 49 | + |
| 50 | +That sentence is the enterprise's **business ontology**. For forty years it has |
| 51 | +been translated into code: the same "phone number is required" intent restated as |
| 52 | +a database constraint, an ORM annotation, a form validator, and a line in the |
| 53 | +API documentation, four places that drift independently. The codebase is not the |
| 54 | +business; it is the business's translation into the only form a computer could |
| 55 | +run. |
| 56 | + |
| 57 | +Here is the same sentence written once, as ObjectStack reads it: |
| 58 | + |
| 59 | +```ts |
| 60 | +import { ObjectSchema, Field } from '@objectstack/spec/data'; |
| 61 | + |
| 62 | +export const Ticket = ObjectSchema.create({ |
| 63 | + name: 'support_desk_ticket', |
| 64 | + label: 'Ticket', |
| 65 | + sharingModel: 'private', |
| 66 | + fields: { |
| 67 | + subject: Field.text({ label: 'Subject', required: true, searchable: true }), |
| 68 | + status: Field.select({ |
| 69 | + label: 'Status', |
| 70 | + required: true, |
| 71 | + options: [ |
| 72 | + { label: 'Open', value: 'open', default: true }, |
| 73 | + { label: 'Resolved', value: 'resolved' }, |
| 74 | + ], |
| 75 | + }), |
| 76 | + due_date: Field.date({ label: 'Due Date' }), |
| 77 | + }, |
| 78 | +}); |
| 79 | +``` |
| 80 | + |
| 81 | +The moment that object exists, its table exists, its REST endpoint exists, its |
| 82 | +list and form views exist, and its MCP tool exists. Nobody writes the |
| 83 | +controller. The ontology is not a design document that a codebase then |
| 84 | +implements. It is the thing that runs. |
| 85 | + |
| 86 | +Two boundaries keep the word honest, and we state them every time we use it. |
| 87 | +First, the ontology core is those five things plus the agent and tool |
| 88 | +definitions an app ships with. Views, dashboards, apps, and translations are |
| 89 | +authored in metadata too, but they are **projections** of the core, not part of |
| 90 | +it: change the core and the projections follow; delete a projection and the |
| 91 | +business it showed is unchanged. Second, this is an **executable** ontology, not |
| 92 | +a knowledge-representation one. There is no class inheritance, no axioms, no |
| 93 | +reasoner. The definition is validated, then run. |
| 94 | + |
| 95 | +## Why code recedes |
| 96 | + |
| 97 | +Code is the ontology's translation. For as long as translation had to be done by |
| 98 | +hand, the translation *was* the product: the thing you hired for, the thing you |
| 99 | +maintained, the thing that rotted. Three things follow once the translation can |
| 100 | +be skipped. |
| 101 | + |
| 102 | +**The ontology becomes the asset and the code becomes a derivative.** A runtime |
| 103 | +that executes the definition directly, or a toolchain that generates the |
| 104 | +derivatives on demand, turns the codebase into something you no longer hand- |
| 105 | +write, the way nobody hand-writes assembly. Code does not disappear. It moves |
| 106 | +*into the runtime*: the driver that maps an object to a Postgres table, the |
| 107 | +server that mounts the endpoint, the enforcement of a permission on every call. |
| 108 | +What remains in the application itself is small and declared: hooks and action |
| 109 | +bodies, CEL expressions in formulas and predicates, constrained JSX for custom |
| 110 | +pages that is parsed into a UI tree and never executed as code. |
| 111 | + |
| 112 | +**The whole system becomes small enough to be held.** The bundled example CRM in |
| 113 | +this repository — accounts, contacts, leads, opportunities, activities, views, a |
| 114 | +dashboard, a lead-conversion flow, permission sets, actions, translations — is |
| 115 | +31 files and roughly sixteen thousand tokens. That is the whole application, not |
| 116 | +a module of it. An agent can load it end to end, answer *what breaks if I change |
| 117 | +this*, and refactor across data, API, UI, and permissions in a single change. |
| 118 | +We wrote about why that number is the one that matters in |
| 119 | +[The Constraint Isn't Typing Speed. It's the Context Window.](/blog/context-window-is-the-constraint) |
| 120 | +This post is its successor: once the system fits, the question becomes what the |
| 121 | +system *is*. |
| 122 | + |
| 123 | +**The definition becomes checkable in a way code never was.** A codebase can |
| 124 | +only be run. A definition can be validated: `os validate` parses every CEL |
| 125 | +predicate, checks that each `record.field` resolves, verifies every widget |
| 126 | +binding, and refuses a missing security posture, with a located, corrective |
| 127 | +message an agent can read and fix. Most AI mistakes in metadata type-check and |
| 128 | +then fail silently at runtime; a gate that rejects them at authoring time is |
| 129 | +what makes "AI writes it" survivable. |
| 130 | + |
| 131 | +## Why now |
| 132 | + |
| 133 | +None of this was possible five years ago, and three conditions had to mature at |
| 134 | +the same time. |
| 135 | + |
| 136 | +1. **Models read and write structured definitions.** A language model that can |
| 137 | + author a typed, validated schema from a sentence of business language, and |
| 138 | + fix its own located errors, turns "AI writes it" from a demo into a loop. |
| 139 | +2. **The context window holds an enterprise's ontology.** When the definition |
| 140 | + of a whole business system fits in one window, the agent is no longer |
| 141 | + grepping and hoping. It reasons about the whole. |
| 142 | +3. **Agents can operate the definition directly.** The Model Context Protocol |
| 143 | + gave agents a standard way to call tools. An ontology whose objects and |
| 144 | + actions *are* tools is what makes that call mean something. |
| 145 | + |
| 146 | +Andrej Karpathy's framing of the third generation of software is that the |
| 147 | +context window is the program. For enterprise software, we think the program is |
| 148 | +the ontology, and the context window is where it is read. |
| 149 | + |
| 150 | +## Four promises, four mechanisms |
| 151 | + |
| 152 | +The slogan is a stance. The descriptor under it is a set of promises, and each |
| 153 | +promise is a mechanism you can inspect in this repository. |
| 154 | + |
| 155 | +### The runtime runs it |
| 156 | + |
| 157 | +From the compiled artifact the runtime **derives** the database schema on an |
| 158 | +interchangeable driver, a generated REST and realtime API, server-driven UI for |
| 159 | +the Console, and an MCP server. And it **enforces** the definition on every |
| 160 | +call: RBAC, row-level and field-level security, sharing, and audit apply to a |
| 161 | +REST request, a Console click, and an agent's tool call alike. Nothing is |
| 162 | +reasoned over at runtime. What runs is what was validated. |
| 163 | + |
| 164 | +### AI writes it |
| 165 | + |
| 166 | +The scaffolder installs the AI skills bundle and writes an `AGENTS.md`, so a |
| 167 | +coding agent starts with the protocol's rules loaded rather than with generic |
| 168 | +"write me some TypeScript" priors. The agent writes the definition. Four gates |
| 169 | +stand between it and production: strict TypeScript and Zod catch shape errors |
| 170 | +in the editor; `os validate` catches the mistakes that type-check and would fail |
| 171 | +silently; a human approves a small, readable diff in the Console; and the |
| 172 | +runtime's governance means that even a wrong app stays inside the fence. The |
| 173 | +division of labor is deliberate: the agent handles the mechanical, error-prone |
| 174 | +surface, and the person handles the one question no schema can check, *did it |
| 175 | +build the thing I meant?* |
| 176 | + |
| 177 | +### Agents operate it |
| 178 | + |
| 179 | +Because the app is typed metadata, the runtime serves it as an MCP server, on by |
| 180 | +default. Point any MCP client at it and an agent can inspect and operate the |
| 181 | +app, under the same permissions and row-level security as a human. Objects are |
| 182 | +exposed automatically; actions opt in with `ai: { exposed: true }`. An agent's |
| 183 | +reach is exactly what the ontology says it is, which is the only kind of agent |
| 184 | +an enterprise can afford to let loose. An agent needs an ontology; a tool |
| 185 | +surface that is not one is a liability, and a chat box bolted onto a REST API |
| 186 | +is the most common way to build one. |
| 187 | + |
| 188 | +### You own it |
| 189 | + |
| 190 | +The ontology lives in your repository as ordinary TypeScript, versioned in your |
| 191 | +VCS, reviewable as a diff, compiled into a checksummed artifact, specified and |
| 192 | +licensed Apache-2.0. Change the runtime, change the model, change the vendor, |
| 193 | +and the definition comes with you. The conversation boxes will converge; the |
| 194 | +agents will multiply; the one thing an enterprise truly owns, and only needs to |
| 195 | +own, is this definition. The more specific your business is, the less of it any |
| 196 | +model has seen, and the more the ontology is worth. That is also the strongest |
| 197 | +reason not to let anyone else hold it. |
| 198 | + |
| 199 | +## What it is not |
| 200 | + |
| 201 | +The word "ontology" carries two thousand years of philosophy and thirty years of |
| 202 | +knowledge engineering, and most of what the enterprise-AI market means by it |
| 203 | +today is something else. Being precise is what keeps the claim defensible. |
| 204 | + |
| 205 | +**Not a knowledge ontology.** In Gruber's 1993 definition an ontology is "an |
| 206 | +explicit specification of a conceptualization"; in OWL and RDF it carries class |
| 207 | +hierarchies and axioms and is reasoned over by an inference engine. Guarino's |
| 208 | +1998 program of *ontology-driven information systems* put ontologies at the |
| 209 | +center of system design, but as a description to design against, not a thing to |
| 210 | +run. ObjectStack's ontology describes nothing in general. It is one business's |
| 211 | +application, defined precisely enough to execute, and the `abstract` key was |
| 212 | +removed from the spec for exactly that reason. |
| 213 | + |
| 214 | +**Not the industry's semantic layer.** Palantir's Ontology, and the semantic |
| 215 | +layers now being built into Databricks, Snowflake, and their peers, map |
| 216 | +existing systems onto business concepts so that an agent can reason about them. |
| 217 | +They are read-mostly, and the systems they describe live elsewhere. Our ontology |
| 218 | +*is* the system; federating an external datasource into it is possible, |
| 219 | +read-only by default, and early. |
| 220 | + |
| 221 | +**Not Salesforce's metadata, either, though that is the closest ancestor.** |
| 222 | +Weissman and Bobrowski's 2009 paper on the Force.com multitenant architecture |
| 223 | +described a compiled runtime kernel executing per-tenant metadata, and it worked |
| 224 | +at scale. What it was not: an open format, a thing you could take with you, or a |
| 225 | +thing written for an agent to read. Each of the four lineages above holds one or |
| 226 | +two of the four promises. Holding all four in one definition is the position |
| 227 | +this project occupies. |
| 228 | + |
| 229 | +## What we have not figured out |
| 230 | + |
| 231 | +A positioning statement that admits no open problems is marketing. These are |
| 232 | +ours. |
| 233 | + |
| 234 | +**The size ceiling.** "Small enough to hold whole" is a measured fact for a |
| 235 | +CRM and an argument for an enterprise. Context windows grow, and the core versus |
| 236 | +projection split bounds what an agent must load, but an ontology with hundreds |
| 237 | +of objects will test the claim. We would rather state the limit than hide it. |
| 238 | + |
| 239 | +**Responsibility.** When an agent acts inside the fence and the outcome is still |
| 240 | +wrong, the fence did its job and someone is still accountable. Our working rule |
| 241 | +is that reversible actions go to agents and irreversible ones stay with people, |
| 242 | +and that the boundary is written into the definition, not left to judgment at |
| 243 | +runtime. It is a rule, not a solution. |
| 244 | + |
| 245 | +**Interoperability.** One enterprise, one ontology is the easy case. Two |
| 246 | +enterprises whose agents need to transact is where an open protocol stops being |
| 247 | +a principle and becomes infrastructure. The format is open; the shared |
| 248 | +vocabulary is not yet there. |
| 249 | + |
| 250 | +**Classification is power.** Who gets to define what a "customer" is was a |
| 251 | +philosophical question for two millennia and is a departmental one in every |
| 252 | +company. Making the ontology explicit does not settle that argument. It moves it |
| 253 | +into a diff, where at least it can be seen. |
| 254 | + |
| 255 | +## Where this leaves the stack |
| 256 | + |
| 257 | +Everything in this repository is the open stack: protocol, microkernel, SDK, |
| 258 | +CLI, and the production runtime, Apache-2.0 with no open-core asterisks. You |
| 259 | +build and ask with Claude Code or any coding agent; the agent writes the |
| 260 | +ontology in your repo and operates the running app over MCP. The same loop, |
| 261 | +hosted, is [ObjectOS](https://www.objectos.ai). |
| 262 | + |
| 263 | +Start with one object: |
| 264 | + |
| 265 | +```bash |
| 266 | +npm create objectstack@latest my-app && cd my-app |
| 267 | +``` |
| 268 | + |
| 269 | +Describe the business in plain language, let the agent write the definition, run |
| 270 | +`npm run validate`, open the Console, and then connect an agent: |
| 271 | + |
| 272 | +```bash |
| 273 | +claude mcp add --transport http my-app http://localhost:3000/api/v1/mcp |
| 274 | +``` |
| 275 | + |
| 276 | +What you will have is not an app that AI happened to write. It is an ontology |
| 277 | +the runtime runs, AI can write, agents can operate, and you own. The ontology is |
| 278 | +the software. |
| 279 | + |
| 280 | +--- |
| 281 | + |
| 282 | +*Further reading.* Thomas R. Gruber, "A Translation Approach to Portable |
| 283 | +Ontology Specifications" (1993). Nicola Guarino, "Formal Ontology and |
| 284 | +Information Systems" (FOIS 1998). Craig D. Weissman and Steve Bobrowski, "The |
| 285 | +Design of the Force.com Multitenant Internet Application Development Platform" |
| 286 | +(SIGMOD 2009). In this documentation: [Business Ontology](/docs/concepts/ontology), |
| 287 | +[How AI Development Works](/docs/getting-started/how-ai-development-works), |
| 288 | +[Connect an MCP Client](/docs/ai/connect-mcp). |
0 commit comments