AI Engineer World's Fair 2026
Why Agentic Systems Need Ontologies
Slide chapters
16 slide and demo groups · Timestamps are approximate.
Read the talk
Why Agentic Systems Need Ontologies
Frank Coyle explains how formal domain models, graph-based inference, and validation can constrain probabilistic agents before their proposed actions produce costly or incorrect outcomes.
From a talk by Frank Coyle
At a glance
Ideas worth remembering
Ontologies give agents an explicit domain model of entities, properties, and relationships instead of relying entirely on probabilistic language generation. 3:49
Top-down and bottom-up modeling are complementary approaches: experts can define core business concepts, while observed customer interactions can reveal additional entities and relationships. 5:23
RDFS and OWL add inference and constraints, enabling systems to derive classifications, follow transitive relationships, and reason about relationships that permit only one value. 9:18
Validate tool results inside the agent loop before accepting them; inconsistent outcomes can be returned to the model or escalated to a human. 14:39
Type checking and business-rule checking solve different problems: Pydantic validates parameter structure, while ontologies can identify duplicate refunds, misdirected payouts, and invalid status values. 17:43
Delay side effects and control iteration because agent loops can drift, run indefinitely, increase token costs, or commit incorrect changes before domain validation occurs. 13:13
Two traditions converge in agentic AI
Frank Coyle frames agentic systems as the convergence of two intellectual traditions: agents that perceive, decide, and act, and ontologies that describe the entities, relationships, and categories within a domain. His central argument is that useful autonomy requires more than a model that can generate plausible language; it also requires an explicit account of the world in which the agent operates. 1:30
An ontology provides a formal, shared conceptualization of that operating environment. Rather than leaving an organization’s assumptions implicit in prompts or scattered across application code, it identifies the concepts that matter and specifies how they relate. Coyle describes the combination of probabilistic language models with formal representations as neurosymbolic AI, joining neural-network capabilities with symbolic mechanisms such as rules and knowledge graphs. 3:49
The objective is not to eliminate the generative character of language models. Coyle treats their probabilistic, imaginative behavior as part of their value, while arguing that the same behavior makes them unreliable as the sole authority over domain-specific decisions. Symbolic structures can therefore serve as guardrails without replacing the model’s ability to interpret context and propose actions. 3:49
Suggest correction
This note stays in this page until you copy or download it. Nothing is submitted; reloading clears the draft.
Build a domain model that can evolve
At its simplest, an ontology represents entities, their properties, and the relationships connecting them. Coyle associates this approach with graph-based data structures, where additional properties or relationships can be attached as the domain evolves. He contrasts that flexibility with relational schemas, which he characterizes as more restrictive when new kinds of information require structural changes. 5:23
A top-down approach begins with domain experts defining the important concepts and relationships. In a business setting, that might include purchase orders, customers, and customer representatives, together with their respective properties and interactions. Coyle connects this method to earlier expert-system work while noting a historical limitation of those systems: they struggled to scale. 5:23
A bottom-up approach instead extends the ontology using information encountered in practice, such as customer interactions and the entities or relationships those interactions reveal. Existing vocabularies can also reduce the need to invent terminology from scratch; Coyle points to schema.org, Dublin Core, social-network modeling, and DBpedia as examples of prior work that can inform a domain model. 6:38
Suggest correction
This note stays in this page until you copy or download it. Nothing is submitted; reloading clears the draft.
Turn relationships into inference and constraints
A graph of named entities is useful, but Coyle emphasizes the additional value of technologies such as RDFS and OWL, which support inference and control over the graph. These mechanisms describe what relationships imply, allowing the system to derive information that was not explicitly entered as a separate fact. 9:18
For example, if a teaching relationship has the domain of teacher, a statement that Bob teaches scooter implies that Bob is a teacher. If all teachers are persons, the system can further infer that Bob is a person. If the same relationship has the range of student, scooter can also be classified as a student, expanding the system’s understanding through structured rules rather than additional model-generated guesses. 9:18
OWL-style properties extend this reasoning. A transitive property allows an ancestor relationship to carry across multiple generations: if Sue is an ancestor of Mary and Mary is an ancestor of Anne, Sue can be inferred to be an ancestor of Anne. A functional property permits only one value for a relationship; in Coyle’s example, two different names supplied for one person’s father imply that those names refer to the same individual. 10:29
Coyle presents these derivations and constraints as an auxiliary reasoning layer alongside the graph itself. That separation matters for agentic systems because the graph supplies domain facts, while the accompanying rules determine which conclusions or proposed relationships are consistent with the domain model. 9:18
Infer classifications from a teaching relationship
Read the diagram as text
- Bob teaches scooter. Asserted teaching relationship
- Bob is a teacher. Teaching domain is teacher
- Bob is a person. Every teacher is a person
- scooter is a student. Teaching range is student
- Bob teaches scooter → Bob is a teacher: Domain inference.
- Bob is a teacher → Bob is a person: Teacher implies person.
- Bob teaches scooter → scooter is a student: Range inference.
Suggest correction
This note stays in this page until you copy or download it. Nothing is submitted; reloading clears the draft.
Place ontology checks inside the agent loop
Agent loops give a system the ability to revisit a task, request tools, and continue iterating. Coyle links this pattern to established programming concepts—sequence, conditionals, and iteration—but stresses that loops introduce operational risks: they can become infinite, drift as agents interact, or accumulate significant token costs. Greater capability therefore also increases the need for explicit controls. 11:53
In his Claude agent example, the language model receives a prompt and information about an available tool. The model does not execute the tool itself; it proposes the call and its input parameters, after which application code inspects the model’s stop reason and executes the tool when the response indicates tool use. This distinction places responsibility for real-world execution in the surrounding system rather than in the model alone. 13:13
The critical intervention comes after the tool runs and before its result is accepted. Coyle proposes translating the returned information into a representation that a domain-aware validator can evaluate against the ontology. If the result is reasonable, the loop can continue; if it is inconsistent, the application can send the problem back to the model or involve a human. 16:15
This pattern treats ontology validation as part of the agent’s control flow, not merely as background documentation. The model contributes contextual interpretation and candidate actions, tools supply operational results, and the ontology provides a structured basis for deciding whether those results fit the organization’s established concepts and rules. 3:49
Validate tool results inside the agent loop
Read the diagram as text
- Model proposal. Tool call and input parameters
- Tool execution. Application executes requested tool
- Ontology validation. Check returned information against the domain model
- Accept result. Continue with a reasonable result
- Return to model. Explain why the result failed
- Human review. Escalate an unreasonable result
- Model proposal → Tool execution: Execute proposed call.
- Tool execution → Ontology validation: Validate tool output.
- Ontology validation → Accept result: Reasonable.
- Ontology validation → Return to model: Unreasonable.
- Ontology validation → Human review: Escalate.
Suggest correction
This note stays in this page until you copy or download it. Nothing is submitted; reloading clears the draft.
Separate type safety from business correctness
Coyle distinguishes structural validation from semantic validation. He recommends Pydantic for checking that incoming parameters have the expected types, then using the ontology to evaluate whether the resulting action or data makes sense within the domain. Correctly shaped inputs are necessary, but they do not establish that an operation respects business relationships or domain constraints. 17:43
He also recommends keeping agents free of consequential side effects until their proposed behavior has passed validation. In practical terms, an agent should not immediately alter a database or otherwise commit a change simply because a model proposed it. Running the proposal through ontology-based checks first makes it possible to reject or escalate a problematic action before it becomes durable. 16:15
The examples are concrete: a second refund on the same order, a payout routed to a support representative instead of the buyer, or an invented order status outside an allowed set such as paid, shipped, and refunded. Coyle argues that functional properties, disjoint categories, and constrained values make these failures more explicit than relying on natural-language instructions alone. 18:59
The proposed architecture is ultimately a layered one: probabilistic models interpret and propose, typed interfaces constrain inputs, tools perform execution, and ontology-backed reasoning checks domain consistency before important outcomes are accepted. Coyle presents this as a practical guardrail for agent behavior, while acknowledging that loops still require careful management because drift, runaway iteration, and token costs remain possible. 13:13
Suggest correction
This note stays in this page until you copy or download it. Nothing is submitted; reloading clears the draft.
Read the complete timestamped transcript
16 slide groups. Extracted from the recording; expand builds to follow changes. Timestamps are approximate.
- 0:00
[upbeat music] Um, okay, we're gonna launch here. [clears throat]
- 0:15
So my name, uh, is Frank Coyle. Um, I'm, uh, I'm an educator. I'm teaching at Berkeley now. I've been doing this, uh, computer science stuff for, oh, thirty, thirty-five years.
Why Agentic Systems Need Ontologies
Frank Coyle introduces how agents and ontologies fit together, pairing probabilistic reasoning inside with logical guardrails outside.
Text in image
AI ENGINEER WORLD'S FAIR · GRAPHS & ONTOLOGIES Why Agentic Systems Need Ontologies Probabilistic reasoning inside. Logical guardrails outside. Frank P. Coyle, PhD University of California, Berkeley July 2, 2026
- 0:26
And, um, I'm inter-- And right now it's kind of a critical time for, uh, poor computer science students. They used to be the-- used to be the only game in town, degree was a guaranteed job, and now thanks to AI, it's not.
- 0:40
But then again, five thousand people are here. So AI and, and agents are, um-- [smacks lip] seem to be the way to go. So the question is: How do we leverage this new universe that we are moving quickly into?
- 0:54
And so I wanna talk about how agents and ontologies, ooh, big word, fit together. But before you-- before I do that, I wanted to, um, [smacks lip]
- 1:05
wanted to give you my, uh, my educational philosophy. [clears throat] And this comes from, uh, someone called Sister Corita Kent, and it was made popular by John Cage, who was a, uh, an avant-garde musician.
My Teaching Philosophy
Coyle uses Sister Corita Kent’s Rule 6 to frame learning as making: experiment with code, build to understand, and treat a first attempt as a step toward the next version.
Text in image
MY TEACHING PHILOSOPHY Nothing is a mistake. There's no win and no fail. There's only make. Sister Corita Kent · Rule 6, Some Rules for Students and Teachers (1967) artist, educator, and nun — popularized by composer John Cage Experiment freely Run the code, break it, learn from what happens. Build to understand We learn AI by making with it — not just reading about it. Iterate without fear No final grade on a first attempt; only the next version.
- 1:19
And you gotta think about this a little bit. "Nothing is a mistake. There is no win, there's no fail, there's only make." And more and more today, that's what's important.
- 1:33
Get down and make stuff, and that's how you're gonna learn, not by necessarily reading. I'm also a big fan of writing. My early career was in neuroscience. I'm kind of coming back into it now that, uh, agentic AI is bringing, uh, kind of cognitive science back.
- 1:51
But engage your senses. Get a notebook, get a pen, a pencil, draw pictures, write stuff down. Just don't type, because when you type-- when you're typing, your brain is thinking about the letters on the keyboard.
- 2:06
When you're writing in a book, your whole brain, your, your whole sen-- all, all your sensory systems are engaged, and you're gonna learn faster that way. Okay, onto our talk.
Two Lineages
Agents perceive, decide and act; ontologies formalize a shared conceptualization. The slide contrasts probabilistic proposals with what symbols and inference permit.
Text in image
Two lineages A probabilistic substrate and a symbolic one. AGENT the neural lineage McCarthy (1956) — coins “artificial intelligence” Selfridge (1959) — Pandemonium: competing “demons” Minsky (1986) — Society of Mind Intelligence as many autonomous entities, not one monolith. RUSSELL & NORVIG — the rational agent PERCEIVE → DECIDE → ACT On a probabilistic neural net — proposes what is likely. ONTOLOGY the symbolic lineage origin: the philosophy of being — what exists, and how it's categorized Aristotle (~350 BC) Categories — the kinds of being Quine (1948) “to be is to be the value of a bound variable” Gruber (1993) a formal spec of a shared conceptualization Symbols + inference — declares what is permitted.
- 2:21
Agents and ontology. So there are two lineages here, and I wanna talk about both, give you a little philosophical background. Um,
- 2:29
agents, when did we start talking about agents? It well goes, goes back to the early initial days of AI. People like John McCarthy,
- 2:39
uh, uh, uh, uh, Selfridge, Marvin Minsky, Society of Mind. People started thinking about the fact that this new computing technology was going to lead us into some kind of artificial intelligence, which is a term that came in nineteen fifty-six when all these characters got together and tried to figure out where the future was going.
- 3:00
Okay? And the concept of an agent finally evolved, things that perceive and decide and then act, and that's what we're seeing now. Now, what about ontologies? Well, it turns out ontologies are not that new.
- 3:14
Okay? It was actually Aristotle who first came up with the concept of we need a philosophy of, of being. Like, whoa, kinda heavy. Um, but came up with categories of being, and this kind of relates to what people are doing now with graph databases and knowledge representation.
Two Lineages
Agents perceive, decide and act; ontologies formalize a shared conceptualization. The slide contrasts probabilistic proposals with what symbols and inference permit.
Text in image
Two lineages A probabilistic substrate and a symbolic one. AGENT the neural lineage McCarthy (1956) — coins “artificial intelligence” Selfridge (1959) — Pandemonium: competing “demons” Minsky (1986) — Society of Mind Intelligence as many autonomous entities, not one monolith. RUSSELL & NORVIG — the rational agent PERCEIVE → DECIDE → ACT On a probabilistic neural net — proposes what is likely. ONTOLOGY the symbolic lineage origin: the philosophy of being — what exists, and how it's categorized Aristotle (~350 BC) Categories — the kinds of being Quine (1948) “to be is to be the value of a bound variable” Gruber (1993) a formal spec of a shared conceptualization Symbols + inference — declares what is permitted.
- 3:33
And there are a couple of other people who kind of formalized it. Uh, Van Quine was a philosopher, and then this guy Gruber, nineteen ninety-three. And I think this captures what
- 3:45
knowledge and, uh, graph technology really represents. It is a, a formal specification of a shared conceptualization, and that's what we wanna give to our agents. We wanna give them our concept-- our conceptualization of the universe, our universe, our domains.
- 4:05
Okay? And now what's happening is you're getting the convergence of something that is probabilistic, the agents, the LLMs, with the, the more formal representations that you have with ontologies.
Two Lineages
Agents perceive, decide and act; ontologies formalize a shared conceptualization. The slide contrasts probabilistic proposals with what symbols and inference permit.
Text in image
Two lineages A probabilistic substrate and a symbolic one. AGENT the neural lineage McCarthy (1956) — coins “artificial intelligence” Selfridge (1959) — Pandemonium: competing “demons” Minsky (1986) — Society of Mind Intelligence as many autonomous entities, not one monolith. RUSSELL & NORVIG — the rational agent PERCEIVE → DECIDE → ACT On a probabilistic neural net — proposes what is likely. ONTOLOGY the symbolic lineage origin: the philosophy of being — what exists, and how it's categorized Aristotle (~350 BC) Categories — the kinds of being Quine (1948) “to be is to be the value of a bound variable” Gruber (1993) a formal spec of a shared conceptualization Symbols + inference — declares what is permitted.
The Convergence: Neurosymbolic AI
The speaker presents neurosymbolic AI as a probabilistic agent operating within an ontology’s formal guardrails: the agent proposes, and the ontology permits.
Text in image
The convergence: neurosymbolic AI Neither lineage is enough alone — the fracture from AI's founding, finally healed. AGENT Probabilistic engine. Powerful but uncertain — reasons over a domain it only partly understands. It proposes. + ONTOLOGY Formalized guardrails. Trustworthy but rigid — symbols and logic over a bounded domain. It permits. NEUROSYMBOLIC — the probabilistic agent operating inside formalized guardrails The agent proposes. The ontology permits. That is the synthesis. Probabilistic reasoning inside. Logical constraints outside.
- 4:22
And so this term is now being used, you're k- hearing this a lot, neurosymbolic AI. Sounds pretty fancy, but it's really neural networks tied into symbolic AI, which rule-based systems come under that category, um, as do the knowledge graphs that we're, that we're assembling.
- 4:46
And so what I'd like to argue is that neurosymbolic AI sort of represents a way to keep the LLM on its guardrails, because LLMs are by nature probabilistic.
- 5:02
People worry about hallucinations, but that's the feature. That's actually a feature of large language models. It's who we are. We hallucinate in a way. We imagine things that may not exist, and then we turn them into reality, and that's what large language models do in, in, in, in a way.
The Convergence: Neurosymbolic AI
The speaker presents neurosymbolic AI as a probabilistic agent operating within an ontology’s formal guardrails: the agent proposes, and the ontology permits.
Text in image
The convergence: neurosymbolic AI Neither lineage is enough alone — the fracture from AI's founding, finally healed. AGENT Probabilistic engine. Powerful but uncertain — reasons over a domain it only partly understands. It proposes. + ONTOLOGY Formalized guardrails. Trustworthy but rigid — symbols and logic over a bounded domain. It permits. NEUROSYMBOLIC — the probabilistic agent operating inside formalized guardrails The agent proposes. The ontology permits. That is the synthesis. Probabilistic reasoning inside. Logical constraints outside.
- 5:21
Okay? So let's just quickly overview what ontologies are. It's not-- They're not complicated. They're basically a representation of entities and their relationships to other entities, and these entities have properties.
Ontology: Data as Graphs
The example models customers, orders, refunds and products as nodes. Labeled edges connect them: a customer places an order, which contains products and can be refunded.
Text in image
Ontology → Data as Graphs Entities become nodes, relationships become edges, properties live inside. Customer name, email Order Refund amount, reason Product sku, price PLACED REFUNDED CONTAINS nodes = entities (typed) edges = relationships text inside = properties
- 5:38
And this whole concept of graph databases arose when p- people began to realize that relational databases, sticking data into tables, was too restrictive.
- 5:53
You wanted to add something new to a relational database, so you had to add a new column. Man, and then, and then you have to redo the whole structure.
- 6:02
With a, with a graph database, you can just attach another item. You can just attach a property. You can attach a relationship. Okay? So the question often arises, okay, I, I get it, I need to have an ontology to represent, in a formal way, what my organization is doing.
Ontology: Data as Graphs
The example models customers, orders, refunds and products as nodes. Labeled edges connect them: a customer places an order, which contains products and can be refunded.
Text in image
Ontology → Data as Graphs Entities become nodes, relationships become edges, properties live inside. Customer name, email Order Refund amount, reason Product sku, price PLACED REFUNDED CONTAINS nodes = entities (typed) edges = relationships text inside = properties
- 6:20
How do I do it? Okay, there are a couple of ways you can approach it. You can have a top-down approach or a bottom-up approach. Top-down approach is you get the experts together, and they sit down and analyze the domain, come up with the entities.
How to build an ontology for your organization
Experts can define an ontology top down while entities and relationships are extracted bottom up from documents and reviews. Existing general and domain vocabularies can optionally be reused.
Text in image
How to build an ontology for your organization Two approaches — not in conflict. Meet in the middle, and reuse what already exists. TOP DOWN · experts define entities, properties, relations & constraints “Expert Systems 2.0” Customer PLACED Order REFUNDED CONTAINS Refund Product BOTTOM UP · extract from docs & reviews — NER / LLM mining
- 6:35
What do we have? We have purchase orders, we have customers, we have customer representatives. And we're gonna structure them, they have properties, these are the relationships. Okay, that's one way, and this models what we were doing back in the '80s when I was involved in expert systems.
- 6:51
Everybody thought expert systems was the way to do AI. Symbolic AI was the way to go. Companies rose, millions of dollars were spent. Uh, the, uh, the Japanese created this, uh, Future World project in the late '80s.
- 7:09
People in America w- my, my son was taking Japanese in school because of these expert systems, and... But they couldn't scale. They couldn't scale, and then we went into a kind of AI winter.
How to build an ontology for your organization
Experts can define an ontology top down while entities and relationships are extracted bottom up from documents and reviews. Existing general and domain vocabularies can optionally be reused.
Text in image
How to build an ontology for your organization Two approaches — not in conflict. Meet in the middle, and reuse what already exists. TOP DOWN · experts define entities, properties, relations & constraints “Expert Systems 2.0” Customer PLACED Order REFUNDED CONTAINS Refund Product BOTTOM UP · extract from docs & reviews — NER / LLM mining
- 7:23
Where did neural networks came-- come from? Neural networks were put out there in the '60s, but they couldn't scale because we didn't happen to have NVIDIA, who was off making GPUs to make v- make reality of the v- of the video games fantastic.
- 7:41
And then someone said, "Let's turn these things over to the neural networks," and of course, that's kinda why we're here now. So,
- 7:49
the other way you can-- uh, that, that people are adding to or creating ontologies is, is from the bottom up. For example, customer reactions. What are the things the customers are involved in?
- 8:03
Hey, the, these entities, these relationships, let's add this to our ontology. Let's, let's add this information to the graph. Now, as, as a help,
- 8:14
it's helpful to be aware that there are existing taxonomies that people have been working on for the last fifteen to twenty years, things like Schema.org, which has a whole set of terms and relationships, so you don't have to reinvent the wheel.
How to build an ontology for your organization
Experts can define an ontology top down while entities and relationships are extracted bottom up from documents and reviews. Existing general and domain vocabularies can optionally be reused.
Text in image
How to build an ontology for your organization Two approaches — not in conflict. Meet in the middle, and reuse what already exists. TOP DOWN · experts define entities, properties, relations & constraints “Expert Systems 2.0” REUSE — general Schema.org Org, Person, Product FOAF people & organizations Dublin Core documents & metadata SKOS concepts & taxonomies optional Customer PLACED Order REFUNDED CONTAINS Refund Product optional REUSE — broad & domain Wikidata curated world entities DBpedia extracted from Wikipedia FIBO finance GoodRelations e-commerce BOTTOM UP · extract from docs & reviews — NER / LLM mining
- 8:29
In fact, you-- it's to your advantage to use some of these ontologies. FOAF, a Friend of a Friend, for modeling social networks. The Dublin Core, which was an early r- an early attempt to come up with terms for describing, uh, research papers and books and so forth.
- 8:50
So there's a whole series of things. In fact, Wikipedia is based on an ontology called DBpedia, so when you do a search on Wikipedia, it's looking things up in its giant graph database.
- 9:02
So this stuff has been out there underlying a lot of what we already do. So take advantage of these things that already exist.
RDFS infers. OWL constrains.
RDFS infers that Bob is a teacher and Scooter a student from teaches. OWL closes an ancestor chain and infers that two values of the same subject's functional property identify one individual.
Text in image
RDFS infers. OWL constrains. The graph isn't a drawing — it derives facts and enforces rules. RDFS Domain & range → inference teaches rdfs:domain Teacher teaches rdfs:range Student Bob teaches Scooter ↓ the reasoner derives, unasked: Bob a Teacher Scooter a Student OWL Transitive + functional TRANSITIVE — chains close ancestor a TransitiveProperty Sue ancestor Mary Mary ancestor Anne ⇒ Sue ancestor Anne FUNCTIONAL — at most one hasFather a FunctionalProperty Stewie hasFather Peter Stewie hasFather Peter_G ⇒ Peter owl:sameAs Peter_G These derivations and constraints don't just sit in the graph — they become the guardrails an agentic loop must obey. Next: the loop, and where it goes wrong.
- 9:12
Okay. Now, what do you do when you build your ontology? Okay, so what? I know the-- what these entities are, I know what their relationships are, they have properties.
RDFS infers. OWL constrains.
RDFS infers that Bob is a teacher and Scooter a student from teaches. OWL closes an ancestor chain and infers that two values of the same subject's functional property identify one individual.
Text in image
RDFS infers. OWL constrains. The graph isn't a drawing — it derives facts and enforces rules. RDFS Domain & range → inference teaches rdfs:domain Teacher teaches rdfs:range Student Bob teaches Scooter ↓ the reasoner derives, unasked: Bob a Teacher Scooter a Student OWL Transitive + functional TRANSITIVE — chains close ancestor a TransitiveProperty Sue ancestor Mary Mary ancestor Anne ⇒ Sue ancestor Anne FUNCTIONAL — at most one hasFather a FunctionalProperty Stewie hasFather Peter Stewie hasFather Peter_G ⇒ Peter owl:sameAs Peter_G These derivations and constraints don't just sit in the graph — they become the guardrails an agentic loop must obey. Next: the loop, and where it goes wrong.
- 9:22
How can I do anything with them? Well, there are other augmenting technologies, auxiliary technologies, things that we call-- things like RDFS, which is a technology, and OWL, which I'll talk more about.
- 9:35
So these have-- these kind of sit over to the side of your graph. So I'm not gonna talk about on-- I mean, ontology is a big word, and it's often confusing and used in many ways.
- 9:46
But think you have a graph data structure, okay? And you have the entities and relationships, but you want to apply some control over them, or you want to be able to make inference over them.
- 9:58
So for example, there is, uh, some terms in this technology called RDFS,
- 10:06
domain and range. So if I say, "Teaches has a domain of teacher," that means if I say, "Bob teaches Scooter," in my text, I can infer that Bob is a teacher.
RDFS infers. OWL constrains.
RDFS infers that Bob is a teacher and Scooter a student from teaches. OWL closes an ancestor chain and infers that two values of the same subject's functional property identify one individual.
Text in image
RDFS infers. OWL constrains. The graph isn't a drawing — it derives facts and enforces rules. RDFS Domain & range → inference teaches rdfs:domain Teacher teaches rdfs:range Student Bob teaches Scooter ↓ the reasoner derives, unasked: Bob a Teacher Scooter a Student OWL Transitive + functional TRANSITIVE — chains close ancestor a TransitiveProperty Sue ancestor Mary Mary ancestor Anne ⇒ Sue ancestor Anne FUNCTIONAL — at most one hasFather a FunctionalProperty Stewie hasFather Peter Stewie hasFather Peter_G ⇒ Peter owl:sameAs Peter_G These derivations and constraints don't just sit in the graph — they become the guardrails an agentic loop must obey. Next: the loop, and where it goes wrong.
- 10:21
And if I say, "All teachers are persons," then this statement lets me know if I say, "Bob teaches Scooter," now I know Bob is a person, Bob is a teacher.
- 10:29
What about Scooter? If I say, "Teaches has a range of student," that means, uh, the right side of the verb, then Scooter is a student. And now I have this extra information into my system.
- 10:43
OWL also has a series of, of, of properties that allow you to make some inferences. So a transitive property. Transitive property says, if Sue is an ancestor, like ancestor is a transitive property.
- 11:00
If Sue is an ancestor of Mary, and Mary is an ancestor of Anne, then Sue is an ancestor of Anne. Okay. This was not initially into my graph system, but with applying these functional properties, I can then add and augment the system with this extra data, so that's very useful.
RDFS infers. OWL constrains.
RDFS infers that Bob is a teacher and Scooter a student from teaches. OWL closes an ancestor chain and infers that two values of the same subject's functional property identify one individual.
Text in image
RDFS infers. OWL constrains. The graph isn't a drawing — it derives facts and enforces rules. RDFS Domain & range → inference teaches rdfs:domain Teacher teaches rdfs:range Student Bob teaches Scooter ↓ the reasoner derives, unasked: Bob a Teacher Scooter a Student OWL Transitive + functional TRANSITIVE — chains close ancestor a TransitiveProperty Sue ancestor Mary Mary ancestor Anne ⇒ Sue ancestor Anne FUNCTIONAL — at most one hasFather a FunctionalProperty Stewie hasFather Peter Stewie hasFather Peter_G ⇒ Peter owl:sameAs Peter_G These derivations and constraints don't just sit in the graph — they become the guardrails an agentic loop must obey. Next: the loop, and where it goes wrong.
- 11:21
Then there are some properties called functional properties, which means only one. So, has father is a functional property. You can only have one father. You can only have one mother.
- 11:36
That is a functional property. Okay? So that's, that can serve as a constraint. So when--
- 11:44
if you say, "Bob is my-- Bob is Jim's father, BB is Jim's father," well,
- 11:53
the inference here is that Bob and BB are two ways of representing the same individual, because that is a functional property. You can only have one. So these derivations and constraints don't sit in the graph.
- 12:06
They sit sort of on the side, and they can help- As we're gonna see, I'm gonna propose, when we deal with agents, how they can, they can help us out.
What about Agents?
An agent cycles from perception to decision to action and back. The speaker proposes using ontology derivations and constraints to help agents.
Text in image
What about Agents? We have the ontology. Now meet the thing it has to keep honest. PERCEIVE ACT DECIDE an autonomous loop
- 12:18
So what about agents? Everybody's talking about agents now, and everybody's talking about loops. Loops, loops, loops everywhere. Loops have been around for a long time. Back in the '60s, people were debating who has the best programming language, Fortran or COBOL?
CS keeps rediscovering the loop
Böhm and Jacopini’s sequence, conditionals and loop form the speaker’s account of computation. He presents iteration as the final piece, then connects it to loops in agent design.
Text in image
CS keeps rediscovering the loop BÖHM–JACOPINI (1966) — every computation needs three things SEQUENCE do this, then that CONDITIONAL if / then LOOP repeat until done 60 years later ↓ THE NEW PARADIGM IS THE LOOP “My job is to write loops.” Boris Cherny · creator of Claude Code, Anthropic “Design loops that prompt your agents.” Peter Steinberger · creator of OpenClaw
- 12:36
"No, mine is better." "No, mine is better." "Oh, you don't know anything. You don't know what you're talking about."
- 12:42
Böhm and Jacopini in nineteen sixty-six came out and said, "Okay, there is no real difference in programming languages if they have three aspects." Sequence, I can put statement A, statement B, statement C.
- 12:55
Fine. I have conditionals, I can have if/then. And the last piece, I have a loop. If I have a loop, if I have iteration, if I take these three things, the, the language is what's called Turing complete, can do any-- can compute anything that,
- 13:13
uh, can be computed by computational devices from the work of Alan Turing. Okay? And now we're seeing this in agentic AI. Agents are now have loops. Loops give us the last piece in the equation of giving us a technology that is capable of doing anything that computational devices can
- 13:38
do. The danger, though, of loops is that they can break. If you're, if you're a programmer, you know, you all go into an infinite loop.
The loop is where it breaks
Agent loops can run indefinitely, drift from their goals, and drive up token costs. The slide proposes bounded symbolic rules as guardrails around the probabilistic engine.
Text in image
The loop is where it breaks Unbounded iteration over a probabilistic engine — power without certainty. Infinite loops Goal drift Token-cost blowups “An agent called a broken tool 400 times in five minutes.” — documented production incident, 2026 THE OLD LESSON, REREAD Expert systems — symbolic AI — didn't scale. Hand-built rules couldn't cover an open world. So we abandoned them for the probabilistic engine. But we don't need them to scale. Only to serve as guardrails for the probabilistic engine — a bounded set of rules around an unbounded loop.
- 13:50
N-not good. Loops can drift as agents start talking to each other, things get all-- go off, off the rails. And loops can cost you money. Token counts crank up as the loops continue, so you don't-- you need to be careful, okay?
- 14:09
But in a way, we are revisiting some of the early stuff with symbolic AI. I would argue we're going back to the world of expert systems,
- 14:20
which is the symbolic part of the whole thing. So I want to show you an example using Claude agent. So a little code here. Don't get scared, but I know nobody does Python anymore, but y-you gotta look at what the agent's giving you, and you gotta, you gotta move in and, and manipulate it.
A Claude agent loop: call a tool, check stop_reason, repeat
The loop checks whether Claude requested a tool, then runs it and adds the result to the conversation. Pydantic checks the input before execution; an ontology checks the output before it propagates.
Text in image
AGENTIC LOOP ENGINEERING · the loop, and its two gates A Claude agent loop: call a tool, check stop_reason, repeat The model drives itself — each turn it asks for a tool or finishes. Two natural gates surround the tool call. context_list = [user_task] # the running memory while True: resp = client.messages.create( model=MODEL, tools=TOOLS, messages=context_list) if resp.stop_reason == "tool_use": call = get_tool_call(resp) # refund(A-91) # ↳ model PREDICTS tool + args; # our code names the block 'call' # ▶ GATE 1 — validate the INPUT here result = run_tool(call) # tool runs # ▶ GATE 2 — validate the OUTPUT here context_list.append( tool_result(call.id, result)) else: print(resp.text); break TWO GATES, ONE PURE TOOL context_list — the conversation so far; the loop grows it each turn. GATE 1 — INPUT before the tool runs. validate the call's shape. Pydantic GATE 2 — OUTPUT after the tool runs. validate the result's coherence. Ontology Same pattern both times: Pydantic guards what goes in, the ontology guards what comes out. We'll fill both gates next.- 14:39
So here's a, here's a loop, while True, classic Python loop. Okay? And so we have a client. So we're actually-- So the first little chunk here that you see, resp, the response, this is just some code where we have a model, and we have, uh, we have a prompt that's part of, part of the messages, and we
- 15:01
have a tool, and we're s-- we're asking the LLM to
- 15:08
solve this problem using a tool. Now, here's the, here's the catch.
- 15:14
LLMs can't do anything. All they can do is give us the next word with a high probability. Amazingly, we can now have these conversations with it, but they can't do anything.
- 15:25
But we can give it a tool, and we can give it what we want and say, "How do you think this tool can help us get what we want?"
- 15:36
And then the LLM will set up the parameters
- 15:41
and come back to us and say, "Okay, here's my response. I can't execute this tool, but I know what the input parameters are. I know what your context is.
- 15:53
I know what your prompt is. So here is the call that you need to make of the tool, because I can't do it. I'm the LLM. I'm just locked in this box."
- 16:03
Okay? So the second box, the second chunk is
- 16:08
stop_reason. So stop_reason means the LLM has stopped for some reason. The, the reason here is that it can't do anything, and if the reason is tool_use, "Ah, now it's time.
- 16:21
Let's go execute that tool." So that second line, get tool, it takes the response, which is formulating the, the parameters and triggering the action. Okay. Now, there's stuff in red here.
- 16:34
This is where I think the LLMs and other, uh... I'm sorry, not LLMs, the ontologies and stuff can come in. So
- 16:45
if you look down there, a-after the, the tool is called, it said, "Tool runs," this is where ontologies could come in. The tool's gonna give us information. We put the information in a form that our, our, our, our validator can use.
- 17:07
And th-think about the validator as operating with this-- these ontologies about our domain. Then we can
- 17:16
make some sense of whether the response of the LLM is reasonable. So this is the loop. Call a tool, check the stop reason. If it's a reasonable result, then let's go with it.
A Claude agent loop: call a tool, check stop_reason, repeat
The loop checks whether Claude requested a tool, then runs it and adds the result to the conversation. Pydantic checks the input before execution; an ontology checks the output before it propagates.
Text in image
AGENTIC LOOP ENGINEERING · the loop, and its two gates A Claude agent loop: call a tool, check stop_reason, repeat The model drives itself — each turn it asks for a tool or finishes. Two natural gates surround the tool call. context_list = [user_task] # the running memory while True: resp = client.messages.create( model=MODEL, tools=TOOLS, messages=context_list) if resp.stop_reason == "tool_use": call = get_tool_call(resp) # refund(A-91) # ↳ model PREDICTS tool + args; # our code names the block 'call' # ▶ GATE 1 — validate the INPUT here result = run_tool(call) # tool runs # ▶ GATE 2 — validate the OUTPUT here context_list.append( tool_result(call.id, result)) else: print(resp.text); break TWO GATES, ONE PURE TOOL context_list — the conversation so far; the loop grows it each turn. GATE 1 — INPUT before the tool runs. validate the call's shape. Pydantic GATE 2 — OUTPUT after the tool runs. validate the result's coherence. Ontology Same pattern both times: Pydantic guards what goes in, the ontology guards what comes out. We'll fill both gates next.- 17:32
If it's not reasonable, go back to the LLM. Say, "Oh, this is, this is not working," or get a human in the loop. But the idea is
- 17:43
to surround the input with checks. Now, I've got this-- Something that you, that you should be at least taking a look at if you're doing some of this coding is something called Pydantic.
- 17:52
Pydantic is a way to specify s-- the types of-- what you want the types of the parameters to be. Those of you who, who do know Python, know Python is a unstructured type language.
- 18:06
So you can have a variable X equals twenty, X equals hello, no problem. There's no typing. Pydantic adds typing to that. So you wanna check your types with Pydantic, and then check your results with the ontology.
A Claude agent loop: call a tool, check stop_reason, repeat
The loop checks whether Claude requested a tool, then runs it and adds the result to the conversation. Pydantic checks the input before execution; an ontology checks the output before it propagates.
Text in image
AGENTIC LOOP ENGINEERING · the loop, and its two gates A Claude agent loop: call a tool, check stop_reason, repeat The model drives itself — each turn it asks for a tool or finishes. Two natural gates surround the tool call. context_list = [user_task] # the running memory while True: resp = client.messages.create( model=MODEL, tools=TOOLS, messages=context_list) if resp.stop_reason == "tool_use": call = get_tool_call(resp) # refund(A-91) # ↳ model PREDICTS tool + args; # our code names the block 'call' # ▶ GATE 1 — validate the INPUT here result = run_tool(call) # tool runs # ▶ GATE 2 — validate the OUTPUT here context_list.append( tool_result(call.id, result)) else: print(resp.text); break TWO GATES, ONE PURE TOOL context_list — the conversation so far; the loop grows it each turn. GATE 1 — INPUT before the tool runs. validate the call's shape. Pydantic GATE 2 — OUTPUT after the tool runs. validate the result's coherence. Ontology Same pattern both times: Pydantic guards what goes in, the ontology guards what comes out. We'll fill both gates next.Two gates and a rule that makes them safe
Pydantic checks the tool call’s structure before execution; the ontology checks the result against domain rules afterward. A side-effect-free agent lets the result be rejected before changes reach the world.
Text in image
Two gates, and a rule that makes them safe AGENTIC LOOP ENGINEERING · two gates, no side effects Validate the input on the way in, the result on the way out — and keep the agent itself side-effect free. Pre-tool check PYDANTIC AT THE DOOR Validate the call's INPUT — shape, types, ranges, required fields. Structural correctness, caught before execution. PreToolUse Post-tool check ONTOLOGY AT THE LEDGER Validate the RESULT against domain rules — cardinality, roles, world-state coherence. Caught before it propagates. PostToolUse Functional discipline PURE AGENT, NO SIDE EFFECTS The agent computes and returns — it doesn't mutate the world mid-loop. Then post-validation is always safe to reject. do one thing
- 18:23
So Pydantic at the door, ontology at the ledger, and pure agents... Oh, by the way, your agents should try to have no side effects.
- 18:32
That helps the whole logic, meaning they're not running off doing something, that they're, they're changing, they're changing things in a database. Not yet. You wanna run them through the ontology first and make sure that works.
- 18:44
Okay. I only got an- I've, I've got another... Just a short time. I'm gonna try to show you some of the things that, um, that you can... Some logical constructs from, from something called OWL, the, the, uh,
OWL catches what prose can't pin down
The slide pairs owl:oneOf with a fixed list of statuses to catch values such as “probably shipped.” It also presents a functional property as a check against a second refund.
Text in image
OWL catches what prose can't pin down A sentence in a spec is a hope; an OWL axiom is a rule a machine enforces. THE RULE, IN ENGLISH | THE OWL AXIOM | THE ERROR IT CATCHES An order can be refunded at most once. :refunded a owl:FunctionalProperty A second refund on the same order — the double-payout bug. A buyer and a support-desk employee are never the same account. :Customer owl:disjointWith :SupportRep A payout sent to the support desk instead of the buyer. Order status is one of a fixed set — not free text. :Status owl:oneOf (paid shipped refunded) A made-up value like “probably shipped” no tool can read. A refund must point back to an order that exists. :refunded rdfs:domain :Order A refund attached to the wrong kind of thing — a bad call.
- 18:59
the Web Object Language for, for objects. So you have these functional properties, disjoint properties. I'll just put these... You can look at the slides. But essentially, the errors it can catch, look over in the, the right-hand column.
- 19:12
A second refund on the same order is a, is, is a problem. [laughs] Ontologies could catch it, whereas it's ver- it's very tricky to do that in, in English. A payout sent to the support desk instead of the buyer, okay?
OWL catches what prose can't pin down
The slide pairs owl:oneOf with a fixed list of statuses to catch values such as “probably shipped.” It also presents a functional property as a check against a second refund.
Text in image
OWL catches what prose can't pin down A sentence in a spec is a hope; an OWL axiom is a rule a machine enforces. THE RULE, IN ENGLISH | THE OWL AXIOM | THE ERROR IT CATCHES An order can be refunded at most once. :refunded a owl:FunctionalProperty A second refund on the same order — the double-payout bug. A buyer and a support-desk employee are never the same account. :Customer owl:disjointWith :SupportRep A payout sent to the support desk instead of the buyer. Order status is one of a fixed set — not free text. :Status owl:oneOf (paid shipped refunded) A made-up value like “probably shipped” no tool can read. A refund must point back to an order that exists. :refunded rdfs:domain :Order A refund attached to the wrong kind of thing — a bad call.
- 19:27
You can catch that with an OWL disjoint property, where customer and support rep are two separate entities, okay? Uh, oneOf, made, a made-up value, like probably shipped. You can specify, you must have certain kinds of values.
- 19:44
So, uh, the status, paid, shipped, or refunded, nothing else. And when you're in the pure text world, this can get, this can get funky because the, the LLMs are, again, probabilistic and, um,
The reasoner as a validation layer
A reasoner checks LLM-generated triples against an ontology, then flags, rejects or sends violations for repair. The slide illustrates checks using transitivity, inverse relations, asymmetry, disjointness and domain or range.
Text in image
The reasoner as a validation layer The LLM emits candidate triples; a reasoner checks them against the ontology; violations are flagged, rejected, or fed back for repair. LLM emits candidate triples Reasoner checks against the ontology Verdict flag · reject · repair MORE OWL PROPERTY CHARACTERISTICS — each enables a consistency check owl:TransitiveProperty P(a,b) ∧ P(b,c) → P(a,c) partOf, ancestorOf — validates that chained claims stay consistent. owl:inverseOf hasParent ≡ inverse of hasChild an assertion one way implies the other — cross-checks both directions. owl:Symmetric / Asymmetric siblingOf sym; parentOf asym asymmetry catches contradictions: A parentOf B ∧ B parentOf A. owl:propertyDisjointWith parentOf disjoint siblingOf the same pair can't hold both relations — flags a category error. Domain / range typing rdfs:domain · rdfs:range the endpoints must be the right kinds — catches malformed links.
- 20:00
return some crazy stuff. Okay. Uh, so really what-- the point I wanna make here is use these reas- you can have a reasoner built on ontology to check, keep the LLM on track, have guardrails to keep it honest, okay?
The guardrail: ontologies, RDFS and OWL
Coyle proposes RDFS vocabulary and OWL inference as a bounded guardrail around the probabilistic loop: anti-patterns identify what to forbid, and ontology constraints specify what the thing is not.
Text in image
The guardrail: ontologies, RDFS + OWL The bounded symbolic layer the loop is missing — declares what the engine may NOT do. RDFS the vocabulary Classes, properties, domain & range — what kinds of things connect to what. OWL adds inference Functional properties, cardinality, disjointness — the logic that says this is forbidden. The anti-pattern tells you what to forbid. The ontology specifies what the thing is NOT. Bounded, not scaled. A small set of declared constraints around the probabilistic loop — symbolic AI doing the one job it was always good at.
- 20:18
And for the guardrails, I'm referring to these concepts relat- these support technologies with RDFS and OWL.
Thank you
Coyle closes with an invitation to keep making. He named his site Code Supreme after John Coltrane’s Love Supreme and says it includes music.
Text in image
THANK YOU Nothing is a mistake. There is no win, no fail. Only MAKE. Frank Coyle · Dr-C · [redacted] linkedin.com/in/frank-coyle medium.com/@coyle_41098 @coyle_frankp codesupreme.ai MAKE
- 20:29
And my, my bottom line is nothing is a mistake. There's no win, no fail, only make. Okay. Feel free to reach out to me, [REDACTED:email_address]. I've got a, I've got a, I've got a little website, codesupreme.ai.
- 20:44
I'm a big fan of, if you're John Coltrane, has a, has a, some jazz called, uh, called Love Supreme, so I've named my site Code Supreme, and if you go there, I got some music, and it's all good.
- 20:57
Okay. Thanks very much. [audience applauding] 20 minutes. [outro music]