A Character Is Just Context: Lessons From Building Unwritten Realms
The Six Elements of Character Context
In the architecture of autonomous systems, a character is just context. When building Unwritten Realms, a text-only game where every non-player character is a large language model agent, this concept becomes the foundation of the entire system. Each character is represented as an object holding exactly six things: a persona written in free-text prose, a set of traits with specific intensities such as cautious 0.7 or greedy 0.4, private facts, goals, a memory of what has happened to it, and an inventory.
By defining characters through these structured context blocks, the system forces the model to stay grounded. The social dynamics of the game rely entirely on these six elements, showing that believability is a state and grounding problem rather than a model intelligence problem.
Inside the Social Mechanics of Unwritten Realms
Unwritten Realms drops players into a small world with a specific goal, such as finding a secret or recovering an item. The entire interface is purely social, meaning there is no inventory screen, no take button, and no scripted dialogue tree. If a player needs a treasure map to win, they must persuade the character holding the map to hand it over. The character then decides whether to help based on its goals, traits, and memory.
This design constraint shifts the engineering focus away from model size. A mid-sized model with strict context discipline easily outperforms a giant model with sloppy data, making context engineering the primary driver of agent behavior.
The Validate-and-Repair Loop and Dual-Call Planning
To keep the creative models operating within the rules of the game, the system utilizes a tool-calling layer and a validate-and-repair loop. Agents are never allowed to touch the game state directly. Instead, any engine rejections are fed back to the model as natural language observations, allowing the agent to self-correct in character.
Additionally, the architecture uses dual-call planning to separate private tactical reasoning from public dialogue performance. This separation keeps the agents strategic without breaking the immersion of the social interaction.
This digest was compiled from:
Share this digest
People Also Ask
- Beyond Vibe Coding: How Domain-Specific Languages Bring Order to Generative Software Engineering
Software engineers are replacing fragile natural language prompts with domain-specific languages to make large language models more reliable, structured, and cost-effective.
- Anthropic Accidental Release Exposes Core Source Code of Claude Code
Anthropic accidentally leaked over 512,000 lines of Claude Code source code, exposing internal features, security practices, and upcoming product updates.
- The Economics of Open Agents: How Z.ai's GLM-5.2 Challenges Proprietary AI Margins
Z.ai's release of the open-weight GLM-5.2 model challenges the high-margin API economics of proprietary frontier AI labs like Anthropic and OpenAI.
Share your thoughts
Reactions, corrections, or insights — all welcome.
