A deeper look at the architectural divide between Property Graphs and TypeDB — and what it means for the next generation of AI agents

When teams evaluate TypeDB against Neo4j, Neptune, or ArangoDB, they usually start with a feature checklist: “Does it traverse fast? Does it have a query language? Can I draw nodes and edges?” The checklist answer is almost always “yes” — and it almost always misses the point.

The choice between a Property Graph and TypeDB is not about features. It is about two fundamentally different approaches to data architecture:

Connectivity-First vs. Knowledge-First.

Property graphs ask: how are these things connected? TypeDB asks: what do these things mean, and what must be true about them?

This is the core thesis of my new book, TypeDB for Edge AI Agents, and it is the difference that decides whether your agent can actually reason — or whether it is just following breadcrumb trails through a pile of edges.


Structural Sophistication: Hypergraphs vs. Reified Graphs

The most profound architectural difference lies in how “truth” is represented.

Property Graphs (the binary constraint). Every relationship is a simple bridge between two points — Node A → Node B. That is the entire contract. When your domain has a real-world interaction involving three or more participants — a clinical trial with a patient, a doctor, a medication, a hospital, and a regulatory approver — the graph must be reified. You invent an artificial “Prescription” or “TrialEnrollment” node in the middle, then glue everything to it with four or five binary edges.

The cost is not cosmetic. As Chapter 1 of the book shows with a full Cypher example, a single n-ary fact explodes into five nodes and four edges, none of which the database understands as a unit. The semantic meaning of prescription dissolves the moment you write it down. Nothing enforces that all four participants must be present. You enforce it in application code, documentation, and hope.

TypeDB (the hypergraph model). TypeDB uses genuine n-ary relations — a single relation “diamond” can connect any number of entities simultaneously, each playing a named role. From Chapter 1:

define
  relation prescription,
    relates subject,       # the patient
    relates prescriber,    # the doctor
    relates medication,    # what's prescribed
    relates site,          # where it happened
    owns prescription-date;

One relation. Four roles. Zero artificial intermediate nodes.

This is not a syntactic convenience. Chapter 15, Hypergraphs and PERA as Natural Hyperedges, proves the mathematical point: a PERA relation is a true hyperedge — a member of P(V)P(V) rather than a pair in V×VV×V. And because relations in TypeDB are themselves vertices, they can participate in other relations — giving you second-order structure (meta-relations, provenance over facts, context over context) that property graphs simply cannot express without another layer of reification.

The analytical benefit: you preserve the semantic unit. Instead of traversing five edges to understand one deal, you query one relation. No data bloat. The database stays aligned with the business domain.


Operational Rigor: Schema Enforcement

The “schema-optional vs. strongly-typed” debate felt academic five years ago. It does not feel academic anymore — every serious team running a property graph at scale eventually hits the same wall: data rot.

The problem with schema-optional. In Neo4j you can accidentally connect a Person to a Building with a MarriedTo relationship. The database will happily store it. Nothing stops you from attaching surgical_hours to a GeneralPractitioner node, or from having three different spellings of the same label across three microservices. Over time, the graph becomes a museum of everyone’s mistakes, and application code grows a thick crust of defensive validation that should have lived in the database.

TypeDB’s type system. TypeDB uses a formal ontology baked directly into the schema. It enforces role-player constraints at write time:

  • a marriage relation must have exactly two spouse roles,

  • only an entity of type person (or a subtype of person) is allowed to play that role,

  • a surgeon inherits everything from doctor and the database knows it.

Invalid states are rejected at write time — not discovered at 3 AM when your agent makes a wrong decision.

Chapter 6, The PERA Model, and Chapter 8, Dependent Types in TypeDB, go deeper: TypeDB’s type system is not a superficial label check. It is grounded in dependent type theory, which means constraints can depend on values, not just types. Chapter 9 explains why TypeDB operates under a Closed World Assumption — if a fact is not in the database, it is false, not “unknown.” For an autonomous agent making real decisions, that distinction is load-bearing.

As the book puts it: TypeDB is moving toward a compiled data model, where the database itself prevents malformed data and acts as a single source of truth for both data and business rules.


Computation: Traversal vs. Deduction

The way these two systems “think” about data leads to radically different performance profiles — and radically different use cases.

Graph traversal (pathfinding). Property graphs are optimized for index-free adjacency. They are unbeatable at finding the shortest path between two accounts in a fraud ring, tracing a supply chain, or running PageRank over a social network. They excel at the question: “Where does this go?” If your problem is topological, a property graph is the right tool and TypeDB is not pretending otherwise.

Logical deduction (inference). TypeDB focuses on something property graphs cannot do at all: logical reasoning. Using rules and backward-chaining, it does not just look for existing edges — it derives them.

In a property graph, to find a “Cousin,” you write a complex variable-length path query and hope the planner does something sensible. In TypeDB, you define:

rule cousins-are-children-of-siblings:
  when {
    (parent: $p1, child: $c1) isa parentship;
    (parent: $p2, child: $c2) isa parentship;
    (sibling: $p1, sibling: $p2) isa siblings;
  } then {
    (cousin: $c1, cousin: $c2) isa cousinship;
  };

…and then you simply query cousinship. The database deduces it. You are querying latent knowledge that was never explicitly stored.

Chapter 10 (Knowledge Graphs), Chapter 11 (OWL Ontology Migration), and Chapter 12 (Beyond OWL) walk through why this matters for regulatory, medical, and compliance domains — places where “the answer” is not a path but a derivation from dozens of interacting rules.


Strategic Trade-offs

DimensionProperty Graph (Neo4j, Neptune, ArangoDB)TypeDBPhilosophy“Store the graph, explore the paths.”“Store the model, reason the facts.”Relationship arityBinary only; n-ary via reified nodes.Native n-ary relations with named roles.Type systemLabels and conventions.Polymorphic, inheriting, dependent types.SchemaOptional; drift is normal.Mandatory; invalid states impossible.ComputationTraversal, shortest path, centrality.Rule-based deduction and inference.Best forFraud rings, PageRank, real-time traversal.Knowledge graphs, regulatory domains, AI reasoning.Edge/agent fitGreat for topology; weak on semantics.Purpose-built for agents that must reason under constraint.


Why This Matters for Edge AI Agents

Edge AI agents operate under constraints that amplify every architectural decision:

  • Every reified node is extra traversal your agent pays for on constrained hardware.

  • Every missing type constraint is a silent failure waiting to corrupt a decision.

  • Every OWL-to-data translation layer is latency and complexity your edge device cannot afford.

  • Every schema drift is an agent assumption that will break in production.

Chapter 4 of the book (TypeDB at the Edge with Rust) explains why TypeDB 3.x — rewritten in Rust, with a new storage engine — is the first version of TypeDB where on-device knowledge graphs are actually feasible. The book also covers the memory architectures that sit on top of it: semantic memory (Chapter 17), semantic spacetime (Chapter 18), and promise graphs (Chapter 19) — patterns for agents that remember, reason, and coordinate rather than just embed and retrieve.


Summary

If your problem is computational — “find the 10th-degree connection between these two accounts” — a property graph is the superior tool. Use Neo4j. It is excellent.

If your problem is conceptual — “determine whether this corporate structure violates a new tax rule, given fifty interacting regulations” — TypeDB is the superior tool, because it pushes the logic out of your application code and into the data itself, where it can be enforced, inherited, and reasoned over.

Property graphs store the graph. TypeDB stores the model.

For edge AI agents — systems that must reason over real structure rather than flat embeddings, often on constrained hardware, often without the luxury of a human in the loop — that distinction is the whole ballgame.


About the Book

TypeDB for Edge AI Agents by Volodymyr Pavlyshyn is a journey from the foundational why to the practical how. Across 24 chapters and five parts, it covers:

  • Part I — Foundations: why relational, document, and graph databases fall short; why agents need ontologies; TypeDB internals; edge deployment with Rust.

  • Part II — The PERA Model: entities, relations, attributes; polymorphism and inheritance; TypeQL deep dive; dependent types and type-theory foundations.

  • Part III — Logic and Knowledge: open-vs-closed world assumptions; knowledge graphs; OWL migration; what lies beyond OWL.

  • Part IV — Advanced Structures: hypergraphs, metagraphs, and why PERA is a hyperedge in its truest form.

  • Part V — Agent Memory: semantic memory, semantic spacetime, promise graphs, and what comes next for knowledge-native agents.

The book is written for AI engineers, ML architects, and developers who need their agents to reason over real structure — not flat vectors.

Your graph database got you halfway. TypeDB gets you the rest of the way.

Get the book on Leanpub →


References

Originally published on Sovereign Agentic AI on Substack.