Skip to content

Showcase

/

Robin Hood character graph

Robin Hood character graph

This demo ingests The Merry Adventures of Robin Hood (Howard Pyle, 1883) into SurrealDB Agent Memory one chapter at a time, and draws the cast as the memory knew it at each point in the book. Move the reading position and the graph shows only what had been learned by then, so it never gives away a later chapter.

  • The reading position is a known time. Each chapter was stamped with its own date on ingest, and the graph reads the memory asOf the chapter you have reached. Nothing from a later chapter appears before you reach it.

  • Relations arrive in the chapter they were learned in. A link draws itself in when you reach that chapter, and a character's size is how many facts the memory holds about them so far.

  • Facts are superseded, not overwritten. Press F for the raw fields, then hover a character: a value a later chapter replaced is shown struck through and marked "replaced", because the memory keeps the old value with the time it stopped being current.

  • Each name is its own entity. Robin and Robin Hood are separate from the first chapter, and the dashed gold lines are the page's suggestion that they are one person. Names folds them together.

  • Descriptions are written from the memory, not by it. A separate model (Gemini 2.5 Flash) writes the text beside a character from the facts the memory held at that chapter, never from the book. Agent Memory stores and returns the facts, so a different model given the same facts would write different text from the same record.

  • The Story button plays a chapter. It introduces the characters the chapter brings in, then narrates the chapter's summary, putting on stage the people each sentence names and the relations between them.

  • The last tab shows the calls. What the memory returns lists the API requests behind the graph, with the responses recorded as they came back.

Open full screen

The book renames its characters as part of the plot. John Little becomes Little John, Little John serves the Sheriff as Reynold Greenleaf, and Robin appears as a butcher, a beggar and a tattered stranger. Agent Memory creates one entity for each name, so Robin and Robin Hood are two entities from the first chapter.

Keeping them apart is deliberate, because each name carries facts of its own, in the same way that somebody called Bill by one group and William by another is known differently by each. Entities with several names covers the cases in general. What should join them is a same_as edge, which records that two entities refer to one person and which lookups already follow. Agent Memory does not yet write that edge for name variants like these, so this graph suggests the links itself from the names:

  • A dashed gold line joins two names the page reads as one person, such as Robin and Robin Hood, or Tuck and Friar Tuck.

  • Names switches between every name on its own and one node for each person.

  • A name that could belong to several people is left unlinked. Will could be Will Scarlet, Will Stutely or Will Gamwell.

Every chapter was ingested with a synthetic known time, one day per chapter, and the graph reads the memory as of the reading position. Spoiler-safe narrative memory describes the pattern, and How it was built gives the steps for this demo, and Build your own character graph shows how to make one from your own text.

Was this page helpful?