Summary
Implement the three cross-cutting features that make memory useful for a PC assistant: context scoping (work vs personal), sensitivity classification (private data protection), and entity linking (people, apps, services).
Spec: docs/spec/agent-memory-architecture.md → "Context Scoping", "Sensitivity Classification", "Entity Linking"
Depends on: #542 (MemoryStore)
Context Scoping
Separate knowledge by life domain. System prompt only loads active context + global.
context column on knowledge + conversations (default: 'global')
init_memory(context="work") sets active context
set_memory_context("personal") switches mid-session
- System prompt: global + active context items
- Dedup scoped to context
remember() defaults to active context (overridable)
recall() searches all contexts by default (filterable)
Predefined: global, work, personal. User-defined: any string (project-x, learning, etc.)
Sensitivity Classification
Protect private data from leaking into system prompt or logs.
sensitive INTEGER column (0/1, default 0)
- sensitive=1: excluded from system prompt, returned only via explicit recall()
- Tool history: args redacted to keys only for sensitive operations
- Dashboard: 🔒 badge, content blurred until clicked
Entity Linking
Associate knowledge with people, apps, services using lightweight type:name tags.
entity TEXT column (e.g., 'person:sarah_chen', 'app:vscode', 'project:gaia')
get_by_entity() — indexed lookup for "everything about X"
- recall(entity="person:sarah_chen") — all facts about Sarah
- Multiple knowledge entries can share an entity (builds profile over time)
- No separate entity table — denormalized tag on knowledge rows
Acceptance Criteria
Summary
Implement the three cross-cutting features that make memory useful for a PC assistant: context scoping (work vs personal), sensitivity classification (private data protection), and entity linking (people, apps, services).
Spec:
docs/spec/agent-memory-architecture.md→ "Context Scoping", "Sensitivity Classification", "Entity Linking"Depends on: #542 (MemoryStore)
Context Scoping
Separate knowledge by life domain. System prompt only loads active context + global.
contextcolumn on knowledge + conversations (default: 'global')init_memory(context="work")sets active contextset_memory_context("personal")switches mid-sessionremember()defaults to active context (overridable)recall()searches all contexts by default (filterable)Predefined: global, work, personal. User-defined: any string (project-x, learning, etc.)
Sensitivity Classification
Protect private data from leaking into system prompt or logs.
sensitiveINTEGER column (0/1, default 0)Entity Linking
Associate knowledge with people, apps, services using lightweight
type:nametags.entityTEXT column (e.g., 'person:sarah_chen', 'app:vscode', 'project:gaia')get_by_entity()— indexed lookup for "everything about X"Acceptance Criteria