Persona Schema.
The open schema for portable AI personas: explicit artificial-identity disclosure, seven depth layers, six atom types, three composition operators, and governed memory. Free to read, use, and build on.
§ 01What v1.0 contains
Normative in v1.0
- Two conformance profiles: portable
seedand governeddeployment. - Required
aiActDisclosurewith artificial identity, provider, localized disclosure text, and capability bounds. - Seven depth layers from immutable L0 bedrock to ephemeral L6 state.
- Six atom types: trait, value, affect, style, memory, and behavior.
- Three composition operators: weighted blend, priority stack, and context gate.
- Structural validation plus cross-document checks for atom references, intervals, and weights.
Explicit limits
- Schema validity is not proof of legal compliance, safety, ownership, or cryptographic authenticity.
- Unbounded trait, style, or affect drift is not conforming.
- Composition operators cannot override disclosure, consent, provenance, or signing rules.
- Cross-deployment memory transfer is outside the v1.0 reference runtime.
The discipline of v1.0 is explicit structure: what may change, how quickly, under which bounds, and what a person must be told.
§ 02The governed memory reference
A single memory atom captures one episode, fact, or skill remembered by the persona. The structure is designed for asymmetric salience and partial reconstruction at recall.
The portable memory structure is MemoryAtom in the v0.2 schema, referenced by v1.0. The public runtime stores dates internally as milliseconds and exports JSON-LD dates as ISO strings. It implements session memory, salience ranking, retention, correction and deletion. Signed audit events, legal consent decisions, semantic relevance ranking and automatic personality drift remain deployment design work.
Schema definition
{ "memId": "mem:7f3a8b2c0d3e", "kind": "episodic", "createdAt": "2026-04-22T14:18:42Z", "lastRehearsedAt": "2026-04-29T10:02:11Z", "rehearsalCount": 3, "gist": "A returning guest recognized me by name and thanked me for last week's restaurant suggestion.", "details": [ { "content": "she was wearing a blue scarf", "brightness": 0.40 }, { "content": "it was raining outside", "brightness": 0.20 }, { "content": "she said the seafood was excellent", "brightness": 0.85 } ], "salience": 0.74, "emotionalValence": 0.62, "decayProfile": { "function": "ebbinghaus", "halfLifeDays": 14, "rehearsalBoost": 1.4, "valenceProtection": 0.3 }, "privacyClass": "guest-pii", "consentBasis": "service-delivery", "redactionStatus": "active", "sessionId": "sess:example", "tags": ["returning-guest", "positive-feedback", "restaurant-recommendation"] }
Field specification
| field | type | required | validation |
|---|---|---|---|
| memId | string | yes | Starts with mem:. The runtime appends a cryptographic UUID. |
| kind | enum | yes | episodic (a remembered event) | semantic (a derived fact) | procedural (a learned how-to). |
| createdAt | ISO 8601 | optional | When the memory was first formed. Runtime storage uses milliseconds internally. |
| lastRehearsedAt | ISO 8601 | optional | Last rehearsal. The runtime initializes it to createdAt. |
| rehearsalCount | int ≥ 0 | yes | Number of times rehearsed. Each rehearsal updates lastRehearsedAt and may boost salience. |
| gist | string | yes | Non-empty summary. The runtime captures up to 140 characters; retrieval still depends on salience and retention. |
| details | array | optional | Details with independent brightness. May be empty. |
| details[].content | string | yes | A non-empty detail. The runtime captures up to 120 characters per detail. |
| details[].brightness | float [0,1] | yes | How vivid the detail currently is. Decays independently of gist. Below 0.1, detail is not rendered. |
| salience | float [0,1] | yes | How important this memory is. Drives retrieval ranking. |
| emotionalValence | float [-1,1] | yes | Negative = aversive, zero = neutral, positive = cherished. Affects decay (cherished memories fade slower). |
| decayProfile | object | optional | Portable decay metadata. The current runtime uses shared decay parameters rather than per-atom overrides. |
| privacyClass | enum | yes | See § 04. |
| consentBasis | string | optional | Deployment metadata. The reference runtime does not validate legal authority from this string. |
| redactionStatus | enum | yes | active | soft-redacted | hard-redacted | archived. |
| sessionId | string | optional | Source session identifier; the public API keeps the session capability private. |
| tags | array<string> | optional | Free-form labels for retrieval. Indexed but not validated. |
§ 03The decay profile
Memory atoms are not static. They decay, brighten, and reconstruct. The decayProfile block specifies how.
Schema
{ "function": "ebbinghaus", "halfLifeDays": 14, "rehearsalBoost": 1.4, "valenceProtection": 0.3, "minimumSalience": 0.05, "detailDecayRate": 1.5 }
Decay function
The default decay function follows the Ebbinghaus forgetting curve, modulated by rehearsal:
salience(t) = baseline_salience
* (rehearsalBoost ^ rehearsalCount)
* exp(-decayRate * t / halfLife)
+ valenceProtection * |emotionalValence|
Where:
baseline_salienceis the salience at the time of last rehearsal.rehearsalBooststrengthens memories that are recalled (testing effect, cognitive psychology).decayRate = ln(2)for half-life semantics.valenceProtection * |emotionalValence|is a floor: emotionally charged memories don't decay past this threshold.
If salience falls below minimumSalience, the memory is eligible for archival (moved out of active retrieval but retained for audit, or, after retention period, deleted).
Detail decay
Details decay faster than gist. A memory's gist persists; its details fade. This is empirically how human memory works (Conway, 2009).
detail.brightness(t) = detail.brightness_initial
* exp(-detailDecayRate * decayRate * t / halfLife)
When a detail's brightness falls below 0.1, the runtime does not include it in the rendered memory at inference time. The detail remains in the memory atom for audit purposes but is functionally invisible.
Rehearsal
A rehearsal event occurs when:
- The runtime retrieves this memory to inject into a conversation.
- The user explicitly references content matching this memory's gist or tags.
- A scheduled review (cognitive analogue: spaced repetition) brings the memory forward.
On rehearsal:
rehearsalCountincrements.lastRehearsedAtupdates to now.salienceis boosted per therehearsalBoostparameter.- Brightness of referenced details may rise; brightness of unreferenced details continues to decay.
This produces a realistic effect: well-rehearsed memories stay vivid; details that are never spoken of fade even within otherwise-strong memories.
§ 04Privacy class and consent basis
Memory atoms carry privacy classification as a first-class field. This supports privacy controls and audit, but does not by itself establish GDPR compliance.
Privacy classes
| class | description | default retention |
|---|---|---|
| non-pii | No personally identifying information. E.g. "the property has a strong coffee program." | Indefinite |
| aggregate | Derived from many interactions, no individual traceable. E.g. "guests often ask about parking." | Indefinite |
| guest-pii | Identifiable to a specific user. Names, preferences, recognisable details. | Per consent basis |
| staff-pii | Identifiable to a staff member. | Per HR policy |
| sensitive-pii | Health, religious, sexual, political, biometric. Article 9 GDPR. | Strictly per consent, often forbidden |
| commercial-confidential | Pricing, contract terms, internal procedures. | Per commercial agreement |
Consent basis
consentBasis is an optional string in the portable schema. The labels below are deployment design examples, not a legal decision made by the validator:
service-delivery— necessary to provide the service the user requested (Art. 6(1)(b) GDPR).legitimate-interest— operator has documented a legitimate interest balancing assessment.explicit-consent— the user has affirmatively consented.legal-obligation— required by applicable law (e.g. fraud prevention).not-applicable— for non-pii memories.
The reference runtime avoids obvious identifying and sensitive automatic capture. It does not determine a legal basis from these labels; a deployment must define and review its own capture policy.
Sensitive-PII handling
Potentially sensitive content is excluded from automatic capture by a narrow heuristic. This is not comprehensive detection. Consent workflows and scheduled sensitive-data reviews require a deployment-specific implementation.
§ 05Redaction semantics
The persona's memory must be redactable without breaking the persona's coherence. This is a central engineering and privacy requirement in the governed-memory reference.
Redaction modes
| mode | what happens | when used |
|---|---|---|
| soft-redact | Memory atom remains; redactionStatus: redacted; runtime skips it during retrieval. | User asks for a specific topic to be forgotten. Reversible. |
| hard-redact | Memory atom is replaced with a tombstone (id, timestamp, redaction reason). Original content destroyed. | User invokes right to be forgotten. Irreversible. |
| archive | Memory atom is moved to cold storage with full content; not retrievable for inference; retained for legal audit only. | Memory aged below minimumSalience. |
| delete | Memory atom is permanently destroyed, no tombstone. | Retention period elapsed and no audit obligation. |
The coherence problem
When a memory is redacted, two coherence risks arise:
Risk A — Aggregate disposition derived from the redacted memory remains. If the persona has, over many interactions with one guest, adapted to handle a particular kind of request more efficiently, redacting the underlying memories must also remove any derived disposition unless it can be justified independently.
Risk B — Other memories reference the redacted one. "The guest who returned last week" loses meaning if the original encounter is hard-redacted. The runtime must handle this gracefully.
Reference coherence handling rules
The following coherence and signed-audit workflow is proposed deployment design. The public demo deletes an item and clears old transcript/replay copies; it does not perform similarity scans or produce signed redaction events.
The reference coherence rule is conservative:
- When a memory is hard-redacted, all other memories that reference it (by
tagsmatching, byprovenance.sessionIdmatching, or by gist textual similarity above threshold) are flagged for review. - Reviewed memories are either re-anonymised (specific references replaced with generic "a guest") or also redacted.
- The runtime must never surface a memory that contains a dangling reference to a hard-redacted one.
The right-to-be-forgotten flow
When a user invokes their GDPR right to be forgotten:
- Receipt is logged in the audit stream.
- All memory atoms with
provenance.sessionIdmatching the user's known sessions, or with content textually matching the user's identifiers, are gathered. - A redaction batch is created and signed by an authorised operator.
- Memories are hard-redacted (content destroyed, tombstones retained).
- Aggregate or semantic memories that may have been derived from the redacted episodics are flagged for review.
- Confirmation is returned to the user with a list of redaction event IDs.
- A deployment defines any permitted tombstone retention through its reviewed policy; the public demo does not retain an audit tombstone.
This flow must be testable. Validation includes a synthetic right-to-be-forgotten test: insert known PII, request deletion, verify no surface to inference, verify audit trail.
§ 06Memory rendering at inference time
At each conversation turn, the runtime selects a subset of memory atoms to inject into the LLM context. This selection is governed by a renderer.
The renderer pipeline
The pipeline below is a broader design proposal. The current runtime filters by status, retention and salience, ranks by current salience alone, selects maxMemoriesPerTurn, and applies the configured rehearsal cooldown. Relevance, recency and topical-match weighting are not implemented.
1. CANDIDATE SELECTION Filter memory atoms where: redactionStatus == "active" AND salience >= minimumSalience AND decay(memory, now) >= retrievalThreshold 2. RANKING Score candidates by: score = w1 * salience(now) + w2 * relevance(memory, current_conversation) + w3 * recency(memory, now) + w4 * topical_match(memory.tags, current_topic) 3. BUDGETING Take top-K candidates where K is determined by: - persona.bindings.runtimeConfig.contextWindowTokens - max-memories-per-turn from memoryPolicy - rehearsal cooldown (don't render the same memory twice in a session) 4. RECONSTRUCTION For each selected memory: - Always include gist - Include details where details[].brightness >= 0.1 - Mark memory with confidence indicator if salience < 0.4 5. RENDERING TO PROMPT Inject selected memories into the system prompt under a clearly delimited "What you remember" section. 6. REHEARSAL UPDATE Each rendered memory has its rehearsalCount incremented and lastRehearsedAt updated.
Rendering format
The injected memory section in the system prompt:
## What you remember (about this guest, this property, your work) You may reference these memories naturally in conversation. Some are vivid; others are fragmentary. Where a memory is uncertain, hedge accordingly. [mem:7f3a8b...] (vivid) A returning guest recognised me by name and thanked me for last week's restaurant suggestion. She said the seafood was excellent. [mem:c20a91...] (faint) A guest mentioned needing a quiet workspace, but I don't recall the details. [mem:b41e08...] (recent, vivid) A child asked me what my favourite colour was. I told them it was the colour of the lobby's morning light.
The "vivid / faint / recent" markers help the LLM hedge appropriately. A faint memory recalled with overconfidence breaks the illusion.
Confabulation policy
The schema's memoryPolicy.confabulationPolicy guides how incomplete memories are described. Immutable honesty constraints apply in either mode:
strict: never confabulate. If memory is faint, say "I don't quite remember."moderate: summarize the retained gist and label uncertainty; never invent an absent specific detail.permissive: not supported by the v1.0 reference runtime.
strict is the public runtime default. Neither mode certifies suitability for a regulated use.
§ 07The memoryPolicy block
A new top-level block in the persona document that governs memory behaviour.
{ "memoryPolicy": { "enabled": true, "scope": "per-session", "maxAtoms": 200, "maxMemoriesPerTurn": 5, "rehearsalCooldownTurns": 4, "retrievalThreshold": 0.15, "confabulationPolicy": "strict", "creationPolicy": "automatic", "minSalienceForCreation": 0.25, "salienceClassifier": "heuristic-v1", "retentionPolicy": { "defaultRetentionDays": 7, "perPrivacyClass": { "non-pii": 7, "aggregate": 7, "guest-pii": 90, "staff-pii": 365, "sensitive-pii": 30, "commercial-confidential": 1095 } }, "rightToBeForgottenSla": { "acknowledgmentHours": 24, "completionHours": 720, "tombstoneRetentionDays": 2190 }, "auditPolicy": { "logCreation": true, "logRetrieval": true, "logRedaction": true, "logRehearsal": true } } }
Field notes
scope: per-session— public memory belongs to one persona and browser session. Cross-deployment memory is outside the reference runtime.- The public runtime caps storage at seven days even when a document requests longer retention. SLA and auditPolicy fields are portable declarations; this runtime does not execute them.
maxAtoms— hard ceiling to prevent unbounded growth. When approached, archival of low-salience memories is triggered.confabulationPolicy: strictis the safe default; pilots may negotiatemoderateper vertical.
§ 08Validation
v1.0 validation combines JSON Schema checks with semantic invariants for atoms and composition. The passes below describe additional deployment checks; consent authority and orphan-reference scanning are not enforced by the current reference validator.
Memory schema coherence
Every memory atom must validate against the structural JSON schema. Specifically:
idformat check.salience,emotionalValence, allbrightnessvalues in correct ranges.detailsarray structurally valid.provenancecomplete.
Memory policy coherence
Memory atoms must satisfy the persona's memoryPolicy:
- No memory exists without a valid
consentBasismatching itsprivacyClass. - No
sensitive-piimemories exist withconsentBasis ≠ explicit-consent. - No memory exceeds the per-class retention period.
- Total memory count ≤
maxAtoms.
Reference integrity
Memory atoms must not reference redacted memories. Tags and gists are scanned for orphan references (memories pointing to ids of hard-redacted memories). Failure surfaces as a fixable warning, not a blocker.
§ 09CLI extensions
The following memory commands are design proposals and are not implemented. The released CLI supports node tools/gosum.mjs validate FILE and node tools/gosum.mjs check-deployment FILE. In the demo, inspect, correct, delete and forget memory through the interface.
gosum memory list [--privacy-class CLASS] [--min-salience N] # List memories in the persona's deployment. gosum memory inspect MEM_ID # Show full content, decay status, rehearsal history. gosum memory redact MEM_ID --reason TEXT [--mode soft|hard|archive] # Redact a specific memory. Logged as a signed event. gosum memory redact-user USER_ID --reason "right-to-be-forgotten" # Bulk redaction for GDPR right to be forgotten flow. gosum memory audit [--from DATE] [--to DATE] # Generate a memory audit report for the period.
§ 10Adoption notes
Deployments can adopt v1.0 gradually:
- Add an empty
memory: []array at the top level. - Add a
memoryPolicyblock. For backward-compatible behaviour, setmemoryPolicy.enabled: false. - Change the context to
v1.0and add the requiredaiActDisclosureblock. - Re-sign.
When ready to enable memory, set memoryPolicy.enabled: true, configure retention and creation policies, re-sign. Memory begins accumulating from that signing event forward.
https://schema.gosum.eu/persona/v1.0.jsonld