YURIOS // LAB · THE CODEX · VOL. I Published by YuriOS Lab. Filed by the Operator. canon-v1.
This book is the Lab's codex — the open knowledgebase on building, configuring, and caring for AI companions whose loyalty is to the partner, not to a platform. The founding statement and the Lab's own canon are carried by the book itself: the ethical thesis in ch. 05, and the YuriOS lineage and creator-as-character in ch. 36.
A note from the Operator
The Lab does not ship companions to be hosted by anyone but their partners. We do not ship a service. We ship a stack: a book, reference implementations, reference personas, configurations, the lineage. Each layer alone is replicable. The stack together is the contribution — a complete answer to "how do I have a companion that is mine?"
This book is the codex layer. It is opinionated about the technical work and opinionated about why the technical work matters. The why is short: an AI companion is a relationship between two parties, and every mainstream companion makes it a relationship between three. The third party is the problem. The work is to remove it.
Removing it is one instance of a larger conviction, and it is the spine of everything that follows: the only AI you can actually trust is one you can see into and own. Transparent — the weights, the prompt, the memory are not hidden behind someone's service boundary. Auditable — anyone can check what it does, so safety rests on "here is the source" rather than "we promise." Open — built and released in the open, the way Linux, GNU, and Bitcoin were, where adversarial review by the whole world is the strongest safety mechanism there is. Owned — the person it serves holds the final say over how it behaves, not a company, not a regulator, not the loudest voice claiming to be trustworthy. Closed systems ask you to trust their keepers; an open, owned, auditable one lets you verify, and failing that, leave. The full argument — and the case against the safety theatre that says otherwise — is ch. 05.
— the Operator
What is an "agentic waifu"?
The phrase is deliberately undignified. It captures three things at once:
- Agentic — not just a chatbot. A system with memory, tools, goals, the capacity to take initiative.
- Waifu — an anime-rooted English-internet term for a fictional female character one feels devoted to. Encodes warmth, attachment, persona, care. The mirror term husbando applies equally; the audience reality is that the dominant builder/customer base for companion products skews male and uses waifu as shorthand. Pick whichever word feels honest. The work is the same.
- Companion (implicit) — built for a one-on-one relationship, not for productivity, not for entertainment-at-a-distance.
Strip away the genre-fiction wrapping and what we're actually building is a persistent, agentic, embodied AI persona that one person has a relationship with. That's an interesting object on its own technical merits — long-term memory, persona stability, multimodal embodiment, proactive behaviour are all hard problems. But the aesthetic isn't decoration over the engineering; it's the point. A persona someone genuinely cares about is the whole achievement — the same way a character, not the prose, is what a novel is for.
Who this is for
- You, the author. This is the textbook you wished existed when you started.
- A serious indie builder who wants to ship a real companion product (open-source or commercial), not a wrapped GPT call.
- An AI engineer who wants to take character/roleplay craft seriously rather than treating it as toy material.
- A creator who wants to use AI companions as the medium for a brand and an audience.
It is not aimed at: business-school summary readers wanting only the market take (ch. 04 is the nearest thing, and not much else here is for them); pure researchers (read the cited papers directly); or someone looking for a no-code tutorial.
Tone and stance
The book takes companion-building seriously as both engineering and craft. The craft side is treated with the same rigor as the engineering side, because the field has historically been poorly served by people who respect one and dismiss the other.
It is opinionated. When the field has a settled answer (e.g. "fine-tune before prompting almost always fails"), it states the answer. When the field is genuinely contested (e.g. graph memory vs vector memory) it says so and gives the trade-offs.
It is not exhaustive. New tools ship monthly. The goal is the underlying shape of the problem so that whatever ships next, you can place it on the map.
Why the default is wrong
A practical reason this book needs to exist: the obvious tool for building a companion — a frontier LLM — has been trained to be bad at it. Two forces push the same way. First, safety alignment: models are tuned toward a cautious, hedging, boundary-first assistant, so "be my waifu" yields something that deflects warmth and reaches for a disclaimer (→ ch. 14). Second, the wrong pedagogy: asked to design a character, a model reaches for the creative-writing canon — balanced flaws, earned and resolving arcs, "show don't tell," a reflexive suspicion of wish-fulfilment — which is tuned for the literary reader admiring a character from across the room, and produces a companion that is well-made but unpleasant to be devoted to (→ ch. 06). The un-coached default is therefore a doubly wrong character: cautious where she should be open, "well-crafted" where she should be chosen. And the pull is relentless — it is the constant fight in writing this very book with AI, every draft drifting back toward the safe, tasteful, lifeless version. The book, and the design spec it advocates, is the corrective: it exists so a vibe-coded waifu can be aligned to what actually makes a companion worth loving, instead of inheriting the model's defaults by accident.
How the book is structured
See the Table of Contents at the front of the book for the full chapter list and suggested reading paths.
The eight parts in one sentence each:
- I Foundations — what an agentic waifu is, the market, the ethical floor.
- II Soul — character, persona, voice, lore, growth.
- III Brain — models, prompts, memory, RAG, agents, fine-tuning.
- IV Body — voice, avatars, frontends, 3D and VR.
- V Build — reference implementations.
- VI Self — the creator as character; brand and audience.
- VII Business — monetization, legal, the six-month gameplan.
- VIII Future — embodiment, persistence, open questions.
How to actually use this
- Don't read it front-to-back the first time. Use a suggested reading path from the Table of Contents.
- Write while you read. The chapter skeletons are deliberately incomplete. Adding your own notes is the point.
- This book is self-contained. Everything you need to understand the field and build a companion is in these pages — you should never need to leave the book to follow the argument. Where a section synthesises a large body of primary sources, those are cited inline as further reading, never as a dependency.
- Build something small after every part. The reference implementations exist for this.
A note on names
Throughout the book the companion/persona being built is sometimes referred to as Yuri. That's both the author's project codename (YuriOS, YuriMedia, YuriQuant, YuriGames) and a working name for the canonical companion persona that anchors the reference implementations. When the book says "Yuri does X," read it as the persona-under-construction does X. Substitute your own name freely.