๐ง Memory System
๐ค Who it's for: All long-term users
โฑ๏ธ Read time: ~5 minutes
๐ก In one line: Four memory types (core / user / daily / conversation) let AI remember preferences and context like a teammate.
YingClaw's persistent memory system gives AI continuity across sessions โ the more you use it, the better it understands your preferences, habits, and work context.
Four Memory Typesโ
| Type | Lifespan | Purpose | Injection |
|---|---|---|---|
core | Permanent | Core facts, project decisions, coding conventions | Auto-injected every session |
user | Permanent | User preferences, personal info, communication style | Auto-injected every session |
daily | 7 days | Session notes, milestone progress | Queried on demand |
conversation | Auto-managed | Automatically saved by the conversation system | System-managed |
core โ Permanent Core Memoryโ
For storing infrequently changing key information:
- Project tech stack and architectural decisions
- Team coding standards and conventions
- Environment configuration essentials
- Workflow and process conventions
Keep each core memory entry under 100 characters for conciseness.
user โ Permanent User Memoryโ
Records personal user preferences:
- Programming language preferences ("User prefers Rust over Go")
- Communication style ("User likes concise replies, no verbose explanations")
- Common tools and work habits
daily โ Short-Term Session Memoryโ
For milestone information:
- Today's task progress
- Temporary debugging notes
- Short-term project status
Daily memories auto-expire after 7 days โ no manual cleanup needed.
conversation โ System-Managedโ
Conversation history automatically saved by the system. Do not manually manipulate this type.
Core Toolsโ
memory_store โ Save Memoryโ
memory_store key="user_language" content="User prefers Rust and TypeScript" category="user"
| Parameter | Type | Description |
|---|---|---|
key | string | Unique identifier, use semantic naming |
content | string | Memory content, keep it concise |
category | string | Type: core / user / daily |
memory_recall โ Query Memoryโ
memory_recall query="programming language preference" limit=5
Search saved memories by keyword, returns results sorted by relevance.
memory_forget โ Delete Memoryโ
memory_forget key="outdated_setting"
Delete a memory entry by key. Use when information is outdated or needs correction.
Memory Principlesโ
| Principle | Description |
|---|---|
| One fact per entry | Each memory stores a single fact โ don't mix multiple pieces of info |
| Under 100 chars | Keep it concise for efficient injection and retrieval |
| User priority | User preferences and corrections take highest priority |
| No temporaries | Don't store temporary task progress or session state |
| Update promptly | Use memory_forget + memory_store to update stale entries immediately |
Examplesโ
Remember User Preferencesโ
> "I prefer TypeScript over JavaScript"
โ memory_store key="lang_pref" content="User prefers TypeScript over JavaScript" category="user"
Save Project Environment Infoโ
> "This project uses Rust 2024 edition, minimum MSRV is 1.75"
โ memory_store key="rust_project_config" content="Rust 2024 edition, MSRV 1.75" category="core"
Update After Correctionโ
> "No, the API address I mentioned before is outdated, we use v2 now"
โ memory_forget key="api_base_url"
โ memory_store key="api_base_url" content="API endpoint updated to v2" category="core"
Notesโ
- Do not load private memories in group chat environments
- Credentials, keys, and other sensitive info should NOT be stored in memory
- Periodically review
coreandusermemories, clean up outdated entries
Next Stepsโ
Memory makes YingClaw understand you better. Next, explore ๐ ๏ธ Skill System to extend capability boundaries.