# Memory Policy This policy defines what the local agent OS may remember, where memories belong, and how agents should use local or SSH-tunneled LLM services. ## Memory Scopes **User memory** is for durable facts about the human: preferences, goals, constraints, and confirmed working style. Agents may read relevant user memory, but must not write confirmed user memory without explicit confirmation. **Agent memory** is for agent-specific behavior: lessons, tool habits, recurring mistakes, and operating improvements. Hermes writes Hermes memory. Leonard writes Leonard memory. **Project memory** is for active work: briefs, status, decisions, open questions, task logs, and handoffs. Project memory is the default place for task-specific facts. **Shared memory** is for reusable workflows, prompts, terms, and decisions that help more than one agent or project. ## Write Rules - Save only durable information that is likely to matter in a future session. - Prefer project memory unless the item clearly belongs to user, agent, or shared memory. - Put uncertain user-memory candidates in `01_user/proposed_memory.md`. - Do not store secrets, credentials, tokens, private keys, or sensitive personal data. - Do not infer user preferences from a single weak signal. - Archive stale or superseded memory instead of deleting it. ## Retrieval Rules - Load only the memory needed for the current task. - Prefer concise summaries over raw logs. - Prefer recent, high-confidence, project-specific memory. - Use vector retrieval for semantic recall, **not** as the source of truth. - Cite the Markdown source file when a memory materially affects a decision. ## Local LLM Use - Local LLMs may be used for summarization, tagging, deduplication, and memory candidate extraction. Stronger models should review ambiguous user-memory updates and major architecture decisions. - If a local LLM is reached through an SSH tunnel, treat it as a local service endpoint. Do not send secrets or private user memory unless the user has approved that machine as trusted. Default local endpoints: - Ollama local: `http://127.0.0.1:11434` - Ollama via SSH tunnel: `http://127.0.0.1:11435` ## Compression Rules - Raw notes become session summaries. - Session summaries become durable memory items. - Durable memory items update project status, agent lessons, or confirmed user memory. - Routine boot context should stay under 1500 tokens unless the task requires more.