Three-Layer Agent Memory
Paste the following prompt into your AI chat to install this skill:
Please follow https://skillhub.cn/install/skillhub.md to install @user_df62fd7e/dl2work.
About this skill
Problem Solved
Agents often keep important conversations, user preferences, and events scattered across context, making later retrieval, deduplication, and retention decisions difficult. Three-Layer Agent Memory is designed for AI agent memory management. It classifies dialogue into waste, profile, and event, then organizes event memory into L1, L2, and L3 pages: L1 for fast lookup, L2 for summaries, and L3 for the full original content.
How It Works
- Write and retrieve:
memory_processprocesses dialogue and stores it with classification;memory_searchandmemory_readlocate historical events and layered content. - User profile:
memory_profile_getandmemory_profile_updatemaintain structured preferences, habits, promises, and commitments; updates should generally add rather than delete history. - Merge and archive:
memory_detect_similarfinds similar pages, suggesting merges at higher confidence thresholds;memory_mergeperforms the merge, whilememory_auto_archivearchives old pages by age. - Daily maintenance: A scheduled task can summarize the day's memory, detect similar entries, archive pages beyond a configured age, and write important events back into the memory store.
Boundaries
It suits long-term assistant, customer support, and profile-driven agent systems, but it relies on scheduled jobs or explicit calls to trigger maintenance. Content marked waste is not stored, and merging or archiving changes what is actively available. Production deployments should keep logs and a recovery strategy.
Use Cases
- After multi-turn support chats, classify complaints, preferences, and promises into event memory.
- When users ask about prior setup, retrieve related event memory and read L2 summaries before replying.
- When two complaint events look similar, read both pages and merge them if confirmed as the same event.
- Run a 22:30 daily job to summarize the day, detect similar pages, archive old ones, and update profile.
Best For
- Product engineers building long-term companion agents need persistent, searchable user profiles.
- Platform engineers managing support transcripts need deduplication and archiving of complaint events.
- Assistant backend engineers need layered memory for events, profiles, and disposable chat.
- Agent SREs need scheduled daily summaries, similarity checks, and automatic archiving.
Related Skills
Use a book title and author to search reviews, contents, and reader feedback, then generate a structured breakdown of historical or decision-logic books with key claims, concepts, quotes, and reading notes in Obsidian.
A multi-system divination advisor covering Bazi, Ziwei, tarot, feng shui, timing, and naming with structured interpretations.
Provides Bazi, Liu Yao, Qimen, Meihua, and date-selection guidance from classical references, with plain-language explanations and actionable suggestions.
A fast CLI for summarizing URLs, local files, and YouTube links with multi-model support, length control, and JSON output.