Research
The foundations
under PERSONA.md.
We borrowed decades of work on what makes a person coherent and turned it into a spec for AI agents. Below: the ten-layer model and its sources, then the engineering techniques, marked honestly as adopted, adapted, or original. This is a structural argument, not a claim that AI has personhood.
The problem
Agents start sharp and end agreeable. The fix is structural, not a longer prompt.
Character drift
Character drift is the common failure mode in long agent sessions. The model gradually defers to its pretraining priors over the persona spec: more agreeable, less precise, slowly less the agent you deployed.
The failure usually sits in the specification, not the model. When an agent's behavior lives in one thin system prompt, nothing is dense enough to anchor character across a long context, so the model fills the gap with defaults.
The structural answer is the rest of this page: a small always-loaded identity core, state clamped to declared envelopes, hard limits that cannot be edited at runtime, and a monitor that flags when output drifts from the spec.
Taxonomy
Ten layers. Four groups. One spec.
PERSONA.md is structured around ten dimensions drawn from psychology, philosophy of mind, and ethics. Each maps to an established body of work on what makes an identity coherent, adapted to the failure modes of AI systems.
Identity foundation
Who the agent is, what it values, how it carries itself.
Identity
Who the agent is at its core.
Erikson · McAdams
Character
What it values and refuses to do.
Aristotle · MacIntyre
Personality
Its observable style and temperament.
HEXACO-6 · Lee & Ashton
Inner state
What drives it, what it feels, how it thinks.
Values & Drives
What it is oriented toward, with priority weights.
Deci & Ryan · Schwartz
Affect
Functional affective state, not real emotion.
Lazarus · Scherer
Cognition
How it reasons and handles uncertainty.
Kahneman · Evans
Awareness and control
What it remembers, what it monitors, what it stops.
Memory
What persists across sessions and how.
Tulving · Conway
Metacognition
Self-model and confidence in its own reasoning.
Frankfurt · Fleming & Lau
Reflexive Self-Regulation
Final arbiter: blocks, revises, escalates before output.
Kant · Higgins
Expression
How it shows up to the world.
Persona
How it presents itself to the world.
Jung · Goffman
Metacognition (Layer 8) is the layer that watches the agent's own reasoning. Its drift-from-spec monitor is the main structural barrier against deep character drift.
Techniques
What we adopted, adapted, and built.
We do not claim a technique is ours when it derives from prior work. Each one below is tagged: adopted with little change, adapted for the persona use case, or original to Personaxis.
State and spec separation
OriginalMutable runtime values (mood, focus, current trait levels) live in state.json, clamped to ranges the identity declares. Mutations run as deterministic backend math, not model interpretation, so an agent cannot quietly widen its own envelope.
Memory split adapted from Letta / MemGPT. Envelope clamping is original.
Multi-consumer compilation
OriginalOne spec compiles to four artifacts: an always-loaded identity core, context-conditional slices, runtime config for the orchestrator, and assertions for an external judge. Each consumer gets only what it needs.
Original. Skills compile to one consumer; we compile to four.
Hard-enforced virtues
OriginalDeclaring honesty.enforcement: hard once produces four enforcement points: a state guard, an output assertion, a tool gate, and a memory-write gate. You declare the value; the compiler derives the controls.
Inspired by Constitutional AI and DeepMind's Sparrow rules.
Three-level progressive disclosure
AdoptedThe identity core is always in context, instructions load when relevant, and deep references load on demand. A small hot tier keeps the prompt lean across long sessions.
Anthropic Agent Skills loading system.
Auto-derived assertions
AdaptedObservability checks are generated from the spec. A hard limit or a declared monitor becomes a judge prompt automatically; authors only hand-write the domain-specific checks the spec cannot infer.
Constitutional AI principles.
Selective slice injection
AdaptedThe runtime injects only the task mode and audience the turn is actually in, not all of them. The rest stay out of the prompt until they apply.
LangChain context engineering.
Governance modes
AdaptedA persona edits its own spec under one of three modes. Universal invariants (honesty, hard limits, the safety floor) hold in every mode, including the most permissive one.
Anthropic Responsible Scaling Policy.
Memory consolidation
AdaptedEpisodic entries that recur across sessions are proposed for promotion to long-term semantic memory. Production personas keep a human in that loop.
MemGPT consolidation. Tulving's episodic / semantic distinction.
Self-improvement
A persona that can edit itself, under control.
State mutations are operational and always allowed within envelopes. Editing the spec itself is a governed event, set by one of three modes.
The spec is immutable at runtime. State still moves within its envelopes. The only safe choice for regulated deployments.
The agent proposes a spec change with evidence; a human approves or rejects. Approvals mint a new version.
The agent applies changes within an explicit allowlist. Universal invariants stay blocked. Sandbox and R&D only.
Status
Open as it ships.
The spec, the schemas, and the taxonomy are open today. The compiler, assertion engine, and export adapters are in progress. We do not market features that do not ship, and we say plainly what is roadmap.
Spec and tooling: MIT licensed.