Your agent does not need an ontology; it needs a conceptual model, and the two are not the same thing. A conceptual model is a much larger idea than a graph, and most teams discover this only after spending months on the wrong problem.
Here is how the story usually goes. Graphs are everywhere. Ontologies are everywhere. Knowledge graphs are having a renaissance, this time for agents, and everyone has absorbed the message that an agent needs an ontology. Nobody is quite sure what that means for their own case, but the process starts anyway.
First comes a database battle that lasts weeks. The team picks a labeled property graph because it is the most approachable option for developers. Then they discover that a labeled property graph does not really support an ontological core. So the argument flips to RDF. Consultants and ontologists are hired. A few months later there is a polished ontology in which every term is carefully defined.
And the agent still cannot answer a single question about it.
Disappointment follows, and it is worth asking why. The team started from the wrong end. They chose a storage technology first, then a formalism, and only at the very end asked what the agent actually needs to understand about the world. This long read is about reversing that order: start from the meaning, model it in a form that humans and agents can both read, and let databases, schemas and ontologies fall out as derivatives.
What ontologies are actually for
Ontologies are still useful. The problem is that the word is very broad, and we use it for things it was never meant to do.
What an ontology gives you is a common understanding: the ability to share meaning and to interchange data between parties. That is the core idea. An ontology is shareable meaning. Its natural habitat is the boundary between organizations, systems and communities that need to agree on what a term denotes before they exchange anything.
Notice what this implies about order of operations. Before you build a graph, and long before you pick a database, you have to think about meaning. An ontology can be useless if that thinking never happened, or if it happened inside one person’s head and was then frozen into a file nobody else reads.
The biggest value of an ontology is therefore not the artifact. It is the process of building shared meaning between different parts of the organization, between humans, and between agents. Getting a product owner, a domain expert, an engineer and an agent to agree on what “customer” or “order” means is the real work. The OWL file is the receipt.
This is why the ontology-first journey so often disappoints. A team can produce the receipt without doing the work, and an agent cannot learn from a receipt. What it can use is the model of the world that the conversation produced, stated in a form it can actually consume.
The conceptual model is bigger than a graph
What teams want in practice is not RDF, not OWL and not a perfect ontological core. They want a conceptual model.
Conceptual modeling is about meaning and about the facts that describe the world around you. It is a much older and much wider discipline than knowledge graphs, and many of its forms look nothing like a graph. A conceptual model can be a set of plain-language facts, a catalogue of actors and the protocols between them, a collection of state machines, a body of rules, or all of these at once.
It helps to separate three things that a real world model has to describe, because each one asks for a different representation:
Things and the facts about them. Who and what exists, how they relate, and which constraints hold. This is the static structure of the domain.
Processes. Which actors exist, what they say to each other, and which states each of them can be in. This is the dynamic part: not only entities, but active interaction between entities.
Rules. What follows from what, what is allowed, what is forbidden, and what can be derived. This is the reasoning part.
A graph can carry a rendering of any of these, but it is not the home of any of them. Treat the graph as one derivative among several, produced when you need to traverse or retrieve, rather than as the place where the meaning lives.
The ontology deserves the same demotion. In practice an ontology is just a derivative of your conceptual model. If the model is solid, you can generate the ontology, the database schema and other artifacts from it. If you start from the ontology and try to work backwards to the model, you are reconstructing meaning from its shadow.
The practical test I use is whether you can verbalize the model. Can you say it out loud, in sentences, to a domain expert and to an agent, without first translating it into some intermediate format? Agents work much better when they understand the concepts, and when the conceptual model can be expressed without a layer of additional representation in between. The rest of this piece looks at three ways to build such a model, one for each kind of content above.
Facts you can read aloud: Object-Role Modeling and Factum
One conceptual modeling approach that sits far from the knowledge-graph world is Object-Role Modeling, or ORM. It focuses on plain facts that read like sentences. It is attribute-free: instead of declaring that a table has a column, you state that a person works for a company, and then say which constraints govern that fact. You can still describe properties of entities, but the primary unit is the elementary fact.
That gives you a human-like language that your agent and your people can both understand and review. This is the main reason I am such a fan of ORM, and the reason I built Factum.
Here is what such a model looks like when verbalized. These sentences are an illustration, not output from a real project:
Each Customer places some Order.
Each Order is placed by exactly one Customer.
Each Order contains at least one OrderLine.
It is obligatory that each Order has a ShippingAddress.Nobody needs a graph theory background to review those four lines. A domain expert can say “no, an order can be placed by a company, not just a person” and the model changes in the right place. An agent can be given the same text and reason with it directly. Every constraint is stated explicitly, so a wrong assumption has nowhere to hide.
From facts to everything else
The workflow I care about runs in one direction. You write down the facts first. From the facts you extract entities and properties. From the ORM mapping you build the complex artifacts: database schemas, ontologies, and everything else. The ontology is a derivative; the facts are the source.
Factum is a free, MIT-licensed VS Code extension for ORM 2 built around this workflow. You draw a conceptual schema, read it back as plain-language sentences, and derive database schemas from it. A few things it does that matter for agents:
Live verbalization. Sentences are generated from the constraints, so they always match the diagram, and clicking a sentence selects the element it describes.
Complete constraint vocabulary. Uniqueness, mandatory roles, frequency, ring constraints, subset, exclusion, equality, value and cardinality, each either alethic (must hold) or deontic (ought to hold).
Sample populations. Example rows are substituted into the sentences and the validator checks constraints against them, which is how domain experts catch wrong models early.
Derived outputs. Relational DDL for PostgreSQL, SQL Server, MySQL, SQLite or ANSI SQL, and a property graph schema for LadybugDB, where n-ary facts are reified as nodes. The graph output also lists the constraints a property graph cannot enforce, which is an honest reminder that the graph is a lossy view.
Agent access. A CLI with
validate,verbalize,diff,drift(compares a model against existing SQL) andderive, a GitHub Action that comments on pull requests with schema changes expressed as sentences, and an MCP server,factum-mcp, that lets coding agents such as Claude Code or Copilot read the conceptual schema directly.
The model lives in a plain .orm.json file, so it versions like code. I call the agents that work from such a model fact-driven agents: they work on facts, they understand facts, and you explain the world around them as facts. You can even explain interaction between entities the same way, as a fact that this party can do this for that party. It is a very simple idea, and that is its strength.
When the world is a process: statecharts, actors and Vertep
Facts describe what is true. But sometimes your world model is a set of processes. It is not only entities; it is active interaction between entities. Think of a loan application moving through underwriting, a claim passing between a customer, an adjuster and a reviewer, or an agent negotiating with another agent.
Here the right building blocks are communication protocols and state machines. You describe the actors, the relations between the actors, and the state machine inside each actor. Organizations often describe this kind of knowledge in BPMN-style workflow notations. It is workflow-shaped knowledge, and you may express it as a graph later, or you may decide you never need a graph for it at all.
A flat graph is a poor fit for this content. It can store the nodes and edges of a workflow, but it does not tell the agent what it is allowed to do next, what must happen before the next step, or what a failed step means. A statechart does. It declares the states, the transitions, and which events are legal from where you are.
Vertep
Vertep is my answer to this half of the conceptual model. It is a library for building explainable, auditable agents. The central move is to let a language model choose only among the moves a statechart allows, and to record every step before it happens, so that any decision can be replayed and explained later without the model.
That targets decisions someone may need to justify afterwards, such as loan underwriting, healthcare prior authorizations and insurance claims. Vertep is built around three guarantees: a model cannot pick a move the chart does not offer, every input is journaled before it is acted on, and a run can be replayed without the model.
A few design points make it relevant to the conceptual-modeling argument:
Statecharts are data. Charts can be written in SCXML, YAML or a Rust macro, and all of them compile to one typed representation. Charts can also be projected to RDF with SHACL shapes, which means the process model can live next to your fact model in the same semantic layer. Each chart’s version is a hash of its canonical form.
Actors are durable and addressable. Actors are long-lived processes addressed by IRI. They move only along transitions defined in their chart, and the runtime supports durable timers and a transactional outbox.
Decisions are explicit. A decide state offers the enabled events to a decider, which can be an LLM, a person or a guard. The answer is accepted only if it is one of the offered candidates, and fallbacks, deadlines and decision budgets are declared in the chart rather than buried in prompts.
Everything enters as an event. Time, randomness, model output and network messages arrive as events in a mailbox, and each one is journaled before a pure step function processes it. Replaying the journal reproduces the same states on a server, in a browser, or in the Lean 4 model of the core.
The core is written in Rust with WebAssembly for the browser, and it is checked against the W3C SCXML conformance suite and a model in Lean 4. It is young software, version 0.1.x, and I would present it that way. There is also a visual designer and simulator called Vertepnyk, and the project covers clustering and federation across trust boundaries using DIDs.
The point for this essay is simpler than the feature list. If your agent’s world is a process, give it a process model. Forcing a protocol into a triple store and hoping the agent infers the legal moves is the same mistake as forcing a conceptual model into an ontology file.
When the world has rules: symbolic AI and lean-elpi
The third kind of content is the one the current knowledge-graph wave tends to forget: rules. What follows from what, what is permitted, what can be deduced from the facts you already hold. Sometimes the honest answer to “what database do we need?” is that you need a heavy rule-based, deductive system rather than a bigger graph store.
This is the neuro-symbolic world, the world of rules and symbolic reasoning, and a very large part of AI’s own history lives there. Language models are good at fluent, flexible interpretation. They are not good at guaranteeing that a conclusion follows from a premise. A symbolic layer can do exactly that, and a conceptual model that includes rules gives it something to work on.
Why Elpi, and why Lean 4
My choice for the rule layer is Elpi, an embeddable interpreter for λProlog. According to its package description, Elpi is a variant of λProlog enriched with Constraint Handling Rules, designed to be embedded in larger applications as an extension language. Its native support for variable binding, hypothetical context and backtracking search is what makes it pleasant for writing rules over structured terms: you describe what should hold, and the engine searches for how.
Lean 4 brings the complementary strength. It is a proof assistant and a programming language, so definitions have types and claims can be checked rather than trusted. The two sides cover different jobs. Types in Lean describe what kinds of things exist in the domain. Rules in Elpi describe what can be derived from them.
lean-elpi joins them: Lean 4 for the typed vocabulary and the verified core, Elpi and λProlog for the rules that run over it. In my book Bulletproof Knowledge I use it as the basis for proof-checked memory for AI agents, with ontology types defined in Lean 4 and rules written in λProlog.
What this adds to the conceptual model
Place the three pieces side by side and the shape of a conceptual model becomes clearer:
Facts say what is true, and ORM with Factum verbalizes and checks them.
Processes say what can happen next, and statecharts with Vertep constrain and journal them.
Rules say what follows, and lean-elpi derives it, with Lean 4 guarding the types underneath.
A graph database can be a good way to store or traverse some of this. It is not required for any of it, and it is certainly not the thing to decide first. That is the same point the rest of this piece makes from different angles: choose representations for the kind of knowledge you have, not for the kind of database you happen to know.
One model, many derivatives
Put the pieces together and the architecture is easy to describe, and it runs in the opposite direction from the ontology-first journey in the opening.
The conceptual model sits on top and holds three kinds of content: facts, processes and rules. Relational schemas, property graphs, RDF with an ontology, and agent-readable text hang below it as outputs, each generated for a particular job.
This changes the questions you ask. A graph database becomes a derived artifact you generate when a workload needs traversal. An ontology becomes the thing you publish when a partner needs to exchange data with you and must agree on terms. Neither is where you do your thinking.
It also changes the role of language. Because facts can be verbalized, because statecharts can be read as allowed moves, and because rules read as logic, the same model can be handed to a human reviewer and to an agent without an intermediate format. When the domain expert and the agent read the same text, a misunderstanding surfaces in review instead of in production.
The same idea extends to code. If you are working in a codebase, I built Typed Graph, an Obsidian plugin that helps build conceptual models for your own coding work, so that the model of the system is written down rather than implied by the code.
Questions to ask before you choose a database
The most useful change you can make to an agent project is to postpone the database decision and ask better questions first. Instead of debating which graph database to buy, ask:
- 1.
Do we need a graph database, or a graph-processing agent? The first is storage. The second is behavior. Many projects need the second and buy the first.
- 2.
Do we need a graph at all? Could fact-based modeling carry the meaning, with a graph generated later only if a workload demands it?
- 3.
Is our world really a process? Could statecharts or workflow charts describe it better than nodes and edges?
- 4.
What kind of world, and how complex, are we trying to explain to the agent? And what does the agent actually have to do with it?
- 5.
Do we need rules and deduction? If conclusions have to follow from premises, you may need a rule-based or deductive system, not only retrieval.
None of these questions assumes an answer. A graph may well come out of the exercise, and ontologies remain valuable wherever parties must agree on shared meaning. The claim is only that they should be outputs of understanding, not the starting point.
Where to start
Write ten facts about your domain as sentences, and have a domain expert correct them. If you want tooling for this, Factum is free and runs in VS Code.
Pick one process that matters and draw it as a statechart, with every legal move written down. Vertep shows what it looks like when an agent may choose only among those moves and every step is journaled.
Pick one rule that your agent keeps getting wrong and state it as logic. lean-elpi is where I do that with Lean 4 types and λProlog.
Next time I want to go deeper into the neuro-symbolic side, the world of rules and symbolic reasoning that we have collectively forgotten about. The conceptual model is the foundation for that conversation too.
Sources and tools
Factum (factum-orm.com): features, outputs and tooling as described on the project page.
Vertep (vertep.org): guarantees, statecharts, actors and runtime as described on the project page.
lean-elpi: the author’s Lean 4 and Elpi project.
Elpi package description: language features of Elpi, the λProlog interpreter.
Typed Graph: Obsidian plugin for conceptual models of code.