Sovereign Agentic AI (Volodymyrs View) Podcast

Metagraph Empowering of AI Agents


Listen Later

Hey, long time no see! So, we’re on our Philosophical Wednesdays, and today we will talk about one of my favorite topics: the metagraphs. And, you know, my journey to the metagraphs was quite long because I was building the AI memory—conversational memory for Keen—and I hit the wall: that binary relations somehow do not describe the complexity of the cognitive processes that humans have.

And then I started reading, by the way, a lot of materials about human cognition: how the memory works, how the semantical memory and episodical memory interact with each other, and all of these things. Then I discovered for myself the question of time, and different scales of time, and how we process time in the brain. And the structure that was described was not fitting well to the graphs. It was fitting well to the complex, multi-layered networks that have cross-relations between the layers.

It was a lot of nested and hierarchical structures that also coreference each other; and in some context, what you have as a node could deal actually as a connection between the entities and all of these things. So, it was a mind-blowing structure, but when you try to model something like that as a directional graph, it was extremely cluttered. And I’m not a mathematician, actually—I have some mathematical background—I’m more the engineer. So, I don’t care about the beauty of the structures; I just need to fix, or let’s say, make something working.

But I figured out that my approach is simply not working. And then I started my research. The first thing that I found was the hypergraphs. And hypergraphs have really good mathematical models; we know how to use them. It’s a lot of papers; we even have some databases that allow us to work with hypergraph or hypergraph-like structures. And for sure, if you, for example, use TypeDB, you already somehow have the hypergraphs capability, and this database is really good for the hypergraphs. And they even have some good concepts—some modeling framework that allows you to think better about the hypergraph. Strongly recommended.

But my problem with the hypergraphs was that if I have the hyperedge, and the main idea of the hypergraph [is] that your edges could connect multiple nodes—not just two, but any amount of nodes—and if you have directed hypergraph, then you just mark the nodes, what is in input nodes, what is in output nodes, and so on. But my need was more. I was keen to build the structures that have the ability to have the hierarchies—and the hierarchies are nested graphs.

So, and sometimes I had the need to reference the hyperedge as a node, and I called it “metanodes.” And I decided that I invented something great and cool—until I Googled and learned about the metagraphs. And I even found one book—you could imagine, it’s mind-blowing idea—that really have the huge application in AI space. And right now, we have only one book and tons of papers from one author that actually talking about it since decades.

So, as you see, sometimes the great idea could be lost until they gets needed again. And what idea of the metagraph? Metagraph is the highest abstraction of the graphs that say that node could contain another graphs, the edges could contain another graphs, and edges could be used as a node. So, it’s three building blocks that allows you to build completely mind-blowing recursive, hierarchical, any kind of structures that you could even imagine.

And even the structures that you couldn’t imagine because your brain simply not able to depict such things. And even if you ask me how to visualize the metagraph, I don’t have the good answer because for the hypergraphs, we could use something like Venn diagrams—and even with this it’s not always possible—but with the metagraphs, I still have no idea how I could depict such things, to be honest. So, it’s a challenge itself, and it’s a challenge of our brain capacity to describe this.

But metagraphs is mind-blowing mathematical structure. We have some mathematical theory, but unfortunately, we have zero to nothing databases that are capable to model such kind of things, unfortunately. So, we’re not there. I know some projects that built on top of TerminusDB that try to combine the graph databases with the JSON-LD documents as a nodes, and they gets closer to the metagraph future.

To some extent, you could use the TypeDB to model the metagraphs with some ramifications. And, you know, at the time when I was working for Keen, we have no embedded databases for the graphs. It was practically only the RDF boxes with some magical license that was not ready for the devices licensing and all of these things. So, it was the question: so what to do? And I haven’t found anything then just use the SQLite.

And we partner with Turso folks that was building the mind-blowing vector search indexes, and we was using the vector search together with the graph search to build the memory. So, I built the directed graph in a SQLite. And then I asked myself, okay, if I build the directed graph in a SQLite, could I build the hyper and metagraphs? And result of it actually is my book about the edge portable graphs on the user device purely in SQL. And I would say that it’s quite challenging.

So, it was also challenge for me every time when I had classical graph query with the multiple hoops and I end up with the mixture of SQL and TypeScript code to mimic somehow something that, for example, OpenCypher could do for me in one line. So, if you go this path, probably you will have the same challenge.

And after that, time flies and I meet Kuzu—Kuzu folks. But when my book was on the editing phase, Kuzu just disappear. And all my chapters that was dedicated to Kuzu just go to the void because, you know, the future of the database was not clear, and I decided that, unfortunately, it’s not worth of publishing it anymore.

But what I made: I model translation framework that allow me to build quite metagraph-like structure as a bipartite directional graph. So, I lose a lot of properties of the metagraphs for sure, but I make something working with the tools that we have today. And then I was able to build quite sophisticated memory structures that I need for the conversational memory.

And then in a couple of months, I will discover—when I will jump to the agentic protocol and multi-agent cooperation—that actually the metagraph is yet another model or the data structure that help us to build the cooperation graphs in a multi-agent systems, where every agent could be the swarm of agents inside that cooperate with each other into extremely complex things. So, it’s not only the conversational memory, but it’s also about the cooperation and coordination thing.

And the metagraph is a good building block for something that I called the promise graphs, actually. And, you know, I wrote a book how to do it in SQL; after that I wrote a book about the Ladybug, how to use Cypher, and some characters are dedicated to the metagraphs for sure. And then I discover the semantic space-time. The semantic space-time concept—I would say that it’s more ontology for the directed graphs that allows us to describe the world around us.

And when I published my article about the meta and hypergraphs in a property graph model—a property graph model—the author of this space-time say, “Haha, come on, it’s just a space-time that able to describe it.” And then I get the closer look to the space-time and yes, once actually two out of—and even three out of four relations—it’s all of them needed for the metagraph.

You could say that you contain something, you could say that you have a property of something, and you could say that you similar to somebody. And for sure, the causal link, but when you could say that you have a property or you could contain somebody inside, it’s already good enough building block to build something quite metagraphish. And, yeah, and I remodel my metagraph concept as a bipartite subset of the semantic space-time.

And then I practically build the framework that allow you to build the metagraphs with the tools and concepts that we have nowadays, without the need of waiting for something better to appear. And then I catch myself on this idea that we practically have no materials about the metagraph. We have no studies, we have one book, we have couple of papers—majority of the metagraph papers belong to same person.

And I decided that I have this old rule: write the book that you want to read and write the book that you want to have. And I decide that, you know, I wants to have this book. I wants to read the book, to write the book about the metagraphs, but in more engineering way, without the crazy mathematics and the formulas and the topology.

https://leanpub.com/metagraphforaiagents

Maybe I will add it later, but I just take all my work that I did for the different databases and bake it up—I bake it up to something more digestible, something more simple. From all five different relation model I pick one, and for the metagraph in a property graph database I also pick this bipartite ramified structure of the bipartite graph, and I assemble the book.

If you follow my books, you already maybe touch some of the chapters. But right now, I’m really proud to announce that we have the book about the metagraphs. And we have the book not just about some abstract metagraphs, but we have the book about the metagraphs that actually focused on the AI future and more applicable for the topics of the agentic memory and multi-agent interactions.

It’s more important. I believe in a data structure in a context of the task, because without it, it’s doesn’t really matter. So, I will share my book; it’s still on editing phase, but it’s already available. Maybe it will be two or three additional chapters for the mathematical kicks, I don’t know, but it’s already available. You could buy it; I tried as much as I can to make it more affordable. If you are the student and have no money for the book, write me—I will give you the copy.



Get full access to Sovereign Agentic AI (Volodymyrs View) at volodymyrpavlyshyn.substack.com/subscribe
...more
View all episodesView all episodes
Download on the App Store

Sovereign Agentic AI (Volodymyrs View) PodcastBy Volodymyr Pavlyshyn