← all writing

[ ARCHITECTURE · 2026-11-02 · 4 MIN ]

Ontology, From Tables to Agents

by Burak Emre Kabakcı

FIG_01 [ cover · architecture ] © lobu v1

I want an agent to know what a connection means before it follows it. A column called company_id gives a program a key. It takes a domain model to explain whether that company owns the record, sells it, or is affected by it.

An ontology is an explicit model of a domain’s concepts and relationships. It gives those concepts names, defines their meaning, and can state rules about them. A customer, an incident and a contract become concepts that different programs can refer to consistently.

The idea predates agents

Ontology comes from philosophy, where it concerns what exists and how things are categorized. AI researchers borrowed the term to describe knowledge in a form that programs could share. In his widely cited 1993 paper, Tom Gruber called an ontology “an explicit specification of a conceptualization.” The practical goal was reusable knowledge across systems.

The Semantic Web gave this work standard representations. RDF represents facts as subject–predicate–object triples. OWL can express logical axioms about classes and relationships. For example, if every Employee is a Person, a reasoner can derive that Anika is a Person from the fact that Anika is an Employee.

Those are different levels of commitment. A shared vocabulary helps programs agree on terms. A formal ontology can also support inference. I would be precise about which one a product actually implements.

Tables already have relationships

A relational database can represent all the records in our example. An issues table has a company_id. A contracts table has another. Foreign keys enforce references, and a SQL join connects the rows. There is no need to replace the database to follow that connection.

The additional value is a shared domain model. We can name the connection affects, define its meaning, and say that its endpoints are an Issue and a Company. A CRM’s account and a support tool’s customer can map to that same Company concept, even when their storage differs.

A well-designed database schema and its documentation already capture some of this meaning. An ontology makes the model explicit and reusable across applications. It does not automatically resolve duplicate identities or discover the correct mappings. Someone still has to establish that two systems refer to the same company.

The four views below keep the facts fixed. Switch between them to see what each layer contributes.

When does the affected customer’s contract renew?

Tables store the records and keys.

issues
idtitlecompany_id
101Login failures42
companies
idname
42Northstar
contracts
idcompany_idrenewal_date
7422027-01-15

The matching company key connects these rows. SQL joins can already answer the question.

Switch views to see the same facts at each layer. Synthetic records, illustrative tables and a real Lobu method signature. No live request is made here.

Graphs expose paths through the model

A graph represents records as nodes and relationships as edges. The ontology describes the kinds of nodes and relationships, and what they mean. The graph contains particular facts: this issue affects Northstar, and Northstar has this contract.

A graph query asks for a pattern in those facts. To find a renewal date, match an issue, follow affects to a company, then follow has_contract to a contract. SPARQL expresses patterns over RDF graphs. Other graph query languages work with other graph models. SQL can express many of the same questions through joins and recursive queries.

Storage, meaning and querying are separate choices. An ontology can sit over relational tables. A graph database can contain edges with barely documented meaning. A query engine needs configured reasoning rules before it will infer additional facts from an ontology.

Agents can use the model as a map

An agent can inspect the available types and relationships before choosing its tools. For the renewal question, the schema tells it which path is meaningful. The agent reads the issue’s links, finds the company, follows its contract link and reads the renewal date. The answer can cite the actual records it used.

Without an exposed model, an agent may have to infer those connections from column names or retrieved text. An agent with a documented SQL schema can already do much of this. The benefit grows when a consistent model spans several tools and saves each agent from reconstructing their conventions.

The same model can constrain writes. A schema can reject a relationship with the wrong endpoint type or metadata with an invalid shape. That check cannot prove the claim is true. Sources establish evidence; permission policies determine whether the agent may read or act.

What we built in Lobu

Lobu exposes a practical typed domain model: entity types, JSON Schema metadata and relationship rules. Its stored entity graph uses PostgreSQL tables. Agents can navigate through the entity API, including one-hop link reads, and choose their next read from the result. Source-backed records can stay in their connected systems.

This is the layer I mean when I describe ontology in Lobu. It gives agents a workspace-defined vocabulary and explicit links. We are not claiming a complete OWL reasoner or a SPARQL endpoint. Logical inference beyond supported capabilities needs application logic or agent reasoning, and its own verification.

I would start with a useful question, model the concepts it needs, and keep the evidence attached. The model earns its place when another agent can inspect it and use the same connections without rebuilding the domain from prose.

Implementation: Lobu’s entity schema contract and entity model.

Read next: Memory Is a Hard Business.