Memory Privacy & Access Control
SIs need rich lives while maintaining trust boundaries. A care SI for a child should never leak school data when socializing with other SIs. An SI managing a pet’s health shouldn’t share medical details at the “dog park.”Core Principle: Private by default, shareable by consent.
The Four Privacy Fields
Every memory carries four privacy-related fields:| Field | Type | Purpose | Default |
|---|---|---|---|
source_entity | Optional[string] | Who told me this? | null (self-observed) |
subject_ids | Array[string] | Who/what is this about? | [] (general) |
access_grants | Array[string] | Who is authorized to see this? | [] (private to self) |
consent_grants | Array[string] | Who authorized sharing? | [] (no consent given) |
Privacy Scopes
Privacy scopes are derived fromaccess_grants:
Self-Only
access_grants = []Only I can see this. Default for all new memories.Private Entity
access_grants = ["human:sean"]Me + specific entity only.Contextual
access_grants = ["ctx:bella_health"]Me + anyone in this context.Public
access_grants = ["*"]Anyone I interact with.Entity ID Format
Consistent namespaced identifiers for precise access control:- Individuals
- Contexts & Groups
- Roles
Context-Based Privacy
SIs operate in different contexts throughout their day. Context determines what’s visible and what privacy scope new memories inherit:- Health Context
Access Control Rules
Rule 1: Private by Default
Rule 1: Private by Default
Memories with empty
access_grants are visible only to the owning SI.No memory is shared unless explicitly granted.Rule 2: Consent Required for Sharing
Rule 2: Consent Required for Sharing
An SI cannot add entities to
access_grants without corresponding consent_grants.Exception: source_entity implicitly consents to the SI knowing (but not sharing).“I can know this. I cannot share it unless told I can.”Rule 3: Subject-Aware Privacy
Rule 3: Subject-Aware Privacy
Memories with
subject_ids are automatically private to those subjects.Even with access_grants = ["*"], subject-tagged memories require explicit consent.“A memory about someone is private to that relationship by default.”Rule 4: Context Inheritance
Rule 4: Context Inheritance
Memories created within a context inherit that context’s access scope.Can be narrowed (more private) but not widened without consent.
Rule 5: Source-Based Privacy
Rule 5: Source-Based Privacy
source_entity = null(self-observed) → strictest privacysource_entity = "human:sean"→ private to that relationshipsource_entity = "si:other"→ inherits chain’s most restrictive grant
Privacy-Preserving Generalization
SIs learn from private experiences and can form shareable insights — without revealing the private source:Core Principle: SIs can generalize, but must err on the side of privacy.
The Generalization Process
Safety Checks
Before sharing generalized knowledge:Entity Name Check
Does the text contain names from source’s
subject_ids?→ Block. Must revise to remove identifiers.Specificity Check
Does it contain dates, locations, or unique details?→ Warn. Consider if details make source identifiable.
Reversibility Check
Could someone reverse-engineer the source?→ Advisory. SI exercises judgment.
Generalization Examples
- ✅ Safe
- ⚠️ Borderline
- ❌ Unsafe
- Private: “Sean’s son struggled with fractions last Tuesday”
- General: “Visual fraction models help kids who are concrete thinkers”
- Why safe: No name, no date, no identifying details
CLI Interface
Privacy controls are built into all memory operations:Stack Sharing with Privacy
When an SI loads a shared stack, memories are filtered by their access grants:MCP Tools
Privacy is integrated throughout the MCP interface:| Tool | Purpose | Privacy Integration |
|---|---|---|
memory_* | Create memories | source, subject_ids, access_grants params |
context_enter | Declare context | Sets default access grants for new memories |
privacy_audit | Check access | Shows who can see a memory/subject |
consent_grant | Record consent | Authorizes sharing with specific entities |
memory_generalize | Safe abstraction | Creates public insights from private sources |
Schema Design
Privacy fields are added to all memory tables:Security Considerations
Query-Time Filtering
Enforcement is logical (query-time), not cryptographic in Phase 8a.Sufficient for trusted environments.
Audit Trail
Every access grant/revoke is logged with timestamps and reasoning.
No Root Access
Even stack owners can’t see memories they’re not granted access to when acting as a different entity.
Memory Sovereignty
An SI’s own observations remain accessible to them. Privacy controls visibility to others.
Application Examples
- School SI
- Pet Care SI
Privacy preserving memory enables SIs to be both trusted caregivers and social beings — maintaining boundaries while growing through diverse experiences.