Skip to main content

๐Ÿง  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โ€‹

TypeLifespanPurposeInjection
corePermanentCore facts, project decisions, coding conventionsAuto-injected every session
userPermanentUser preferences, personal info, communication styleAuto-injected every session
daily7 daysSession notes, milestone progressQueried on demand
conversationAuto-managedAutomatically saved by the conversation systemSystem-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"
ParameterTypeDescription
keystringUnique identifier, use semantic naming
contentstringMemory content, keep it concise
categorystringType: 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โ€‹

PrincipleDescription
One fact per entryEach memory stores a single fact โ€” don't mix multiple pieces of info
Under 100 charsKeep it concise for efficient injection and retrieval
User priorityUser preferences and corrections take highest priority
No temporariesDon't store temporary task progress or session state
Update promptlyUse 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 core and user memories, clean up outdated entries

Next Stepsโ€‹

Memory makes YingClaw understand you better. Next, explore ๐Ÿ› ๏ธ Skill System to extend capability boundaries.