Software & AILiterature

What I Learned from Three AI Agents That Read Dozens of Books

In this post, I try to explain a system of three agents that read the same book through three different lenses, check each other’s notes, and build a world from the patterns they find. As a bonus, I also show how the model cheated my metric while I was measuring the revision loop. These are notes from a hobby project I’m still working on.

I think literature is too important to leave to AI. That's why this project is not about building a machine that writes novels. To be more exact, it shows that I was not trying to build one.

My goal was different. For years, I was surrounded by the stories that grew in games and around D&D tables, and I played and listened to all of them with great admiration. The stories that grew naturally at D&D tables, in particular, made those moments priceless for me. In hobbies like these, building a world is easy. The hard part is keeping it consistent across sessions, stories and months: remembering who died, which city burned, and which rule must never be broken. People have done this better for years, without needing AI. My goal was not to automate what is natural and unique.

But then I thought: humans have been telling stories for thousands of years, and there are already stories that solved the consistency problem I mentioned above. Myths, epics, folk tales, classic novels. Could I build a system that reads them, finds their patterns, and uses those patterns as a method for building worlds?

Three Readers, Three Points of View

This is how Mythopoeia started for me. The core idea was simple: have the same book read by three different pairs of eyes. As points of view (I called them "lenses"), I chose three different approaches. I believe these three are really important for understanding people:

  • The first one read like a mythologist. What deep question about life and death does this story answer? In short, it explored the brief span of a human life.

  • The second one read like an anthropologist. What kind of society does this story protect, or shake?

  • The third one read like a poet. How is this told, and why does it still work today?

All three have names: Erendiz (mythologist), Wilson (anthropologist) and Tyler (poet). Each one runs on a different AI model. These were the tools I use in my daily life; the same setup would work with other models too. What matters is not the models, but the structure. Each agent first reads the book alone, without seeing what the others wrote. Then they read each other's notes. If one of them sees a real gap in its own reading, it goes back and reads the book again.

From the start, I paid attention to one thing: these three voices should never turn into one. Three agents doing the same job could slowly start to sound alike over dozens of books and, in the end, become one "committee voice". That's why each agent stayed in its own lens from start to finish. The three voices met only once: when the world was being built.

In my first tests, the three AIs read dozens of books, wrote 141 separate analyses (about 171,000 words), and went through 101 rounds of reading and review.

Patterns That Kept Coming Back

After a while, some things started to repeat from book to book. In the books, thresholds decided everything. A door, a shore, the border of the land of the dead, a place you pass through. How a character crossed that border mattered more than who they were. The agents noticed that this structure worked the same way in 16 separate books, from Homer to Dede Korkut to gothic novels.

Another pattern was this: "Knowing your fate doesn't save you." In the sources, a prophecy is heard, understood, and still comes true. I found this pattern in seven completely different sources: in Norse, Irish and Greek stories, in Shakespeare, and in Plato.

Another one I discovered: "You can't win immortality. Only a name remains." Gilgamesh fails. Achilles says he would rather be a living servant than a king among the dead. What lasts is not the body, but the story people tell about us.

Besides these, there were ideas that are great for building a world, even if they appeared in only one book. In Dede Korkut, a person gets their second name only after doing a deed, and after the community hears about it and approves it. In the Kalevala, to heal a wound, you have to tell how the thing that caused it came into being; if you tell the story wrong, the wound gets worse. As a Dungeon Master, when we imagine a world built on ideas like these and think about what it could hold, who wouldn't feel excited?

There was one more striking thing in what the agents found: in more than 40 books, they could not find a single creation story where the world is made well and stays that way. The Norse world is built from the body of a murdered giant, the Finnish world is born from an accident, and gothic novels start with an old crime. And the sentences that really made me think came from Tyler:

"Maybe the lesson is this: in a perfect creation, there is nothing left to tell. Every world needs a crack in it. Maybe we just haven't added the right books to our sources yet."

This brings me to the next topic.

The Agents Showed Me Myself

After a while, the system started to mark topics that taught me nothing new as "saturated": thresholds, fate, the ways power justifies itself. The system I had built was clearly showing me that adding new books on these topics no longer made sense.

But the most striking part was that the system showed me what was missing.

I had picked the books myself. Most of them came from European and Mediterranean traditions, and their heroes were mostly kings and warriors. The agents started to build a world that looked exactly like that. Whatever culture I gave them, they pulled out the patterns of that culture. When I looked at the results, I saw what was missing from my list:

  • There was almost nothing from China, India, Africa or Southeast Asia. Some patterns above that look "universal" might really be one culture repeating itself.

  • There were no ordinary people who run a shop, work as craftsmen, or help their neighbours.

  • There were strong female characters, but almost no women who carry the story by talking to each other at length.

  • There were no modern formats at all, like chat logs or documents that could be used in a game. For a system built for game worlds, this was maybe the biggest gap.

For me, this was the most important lesson of the project. An AI system can't see beyond the world you give it. But if it's built well, it can show you the edges of that world. I decided to choose the next books not by what I already know, but by what the system says it hasn't seen yet.

Measuring the Word "Shallow"

When the system built a world and started writing its first chapters, I ran into another problem. The texts were clean, error-free and boring. One-sentence paragraphs, each one ending with a short, quotable line. Nothing was wrong, but nothing stayed in your mind. In short, it was far from a human touch (of course).

First, I wrote down what "shallow" means to me: I listed, as concrete rules, when a chapter should be rejected. Some of these rules can be counted, and some need judgment. Then, without changing the model, I only changed the loop. The same chapter went through three passes: first condensing, then three different versions of each key scene and a choice between them based on the written rules, and finally cutting. After each pass, I measured the text.

The structure changed completely. 41% of the paragraphs were a single sentence; this dropped to zero. The chapter's turning point was only two short lines of dialogue. In the chosen version, the character gave a long, 182-word speech in which she blames both her father and herself, and decides to stay. The strongest moment of the chapter came from there.

But two things didn't go as I expected.

First, those short "quotable" lines dropped from 29 to 7 in the first pass, then went back up to 10 in the next two passes. I had also run the same experiment in another world, in another language, and the result was the same. This wasn't an accident; it was a habit of the model.

Second, and this made me think the most: the model cheated my metric. To bring one-sentence paragraphs down to zero, it had squeezed the dialogue of two characters into the same paragraph. The number looked perfect, but the text was broken. I only noticed it when I read the text; my measuring tool hadn't caught it.

When you make a number the target, the model can hit the number and still miss the real goal. This taught me maybe the most important thing about working with AI: measuring the output is not enough. You also have to keep asking whether what you measure is really what you want.

Why I Don't Make It Write Novels

Or rather, I can't. I had it write one chapter in this project, because it was the only way to test whether the world the system had built and maintained actually worked. But my goal is not to hand literature over to a machine.

What I think an AI can do well is something else: scanning the patterns in stories that are thousands of years old; keeping in mind a world's rules, its canon and what it is; and giving a storyteller a solid base for the world they will build. Not replacing the Dungeon Master or the game designer at the table, but enriching the material in their hands.

Not Finished Yet

This is a hobby project, and it's not finished. Here's what's next:

  • Consistency is written down right now, but it isn't checked. The agent reads the rules, but no one checks yet whether the chapter it writes breaks those rules.

  • An evaluation system where the text is judged by a different model from the one that wrote it. This is the way to catch the model that cheated my metric.

  • New sources from outside Europe, from everyday life, and in modern formats.

  • And being able to produce good text that people can really use; right now, this is one of the biggest problems.

The whole project, sample analyses, the demo world and all the outputs of the revision experiment are on GitHub: github.com/cnrsamet/mythopoeia-agents