Memory Framework
Paste the following prompt into your AI chat to install this skill:
Please follow the installation guide at https://skillhub.cn/install/skillhub.md to install @user_f076293a/memory-framework.
About this skill
Problem Addressed
In long-term interactions of AI assistants and agent systems, context information is easily lost, leading to models failing to learn from historical conversations, repeating errors, or making inconsistent decisions. The Memory Framework addresses this by providing a structured memory management solution, ensuring data persistence, efficient retrieval, and continuous optimization.
Core Capabilities and Working Principle
Based on OpenClaw improvements, the framework's core features include:
- Three-Tier Memory Hierarchy: L1, L2, L3 manage memory at different granularities, such as SESSION-STATE.md for short-term session state, brain/plan.md for long-term goals, and brain/me/identity.md for identity storage.
- WAL Protocol: Write-Ahead Logging ensures decisions are recorded before responses, guaranteeing data consistency and traceability.
- Working Buffer: A context buffering mechanism that automatically adjusts when context usage reaches 60%, referencing working-buffer.md to prevent overflow.
- Learnings System: Errors are logged via learnings/errors.json, supporting review and learning to reduce repeated mistakes.
- Daily Review: Conducted in the brain/tasks/daily/ directory, enabling daily summaries for continuous optimization of memory and decision processes.
Quick start involves editing configuration files: defining identity in brain/me/identity.md, setting goals in brain/plan.md, and managing current tasks in brain/tasks/active.md.
Applicable Scenarios and Cautions
- Applicable Scenarios: Personal AI assistants, team collaboration knowledge management systems; suitable for environments requiring long-term memory, error learning, and task tracking.
- Cautions: The framework relies on manual editing of configuration files, not suitable for fully automated systems; memory hierarchy needs proper setup to avoid redundancy; regular reviews are crucial, otherwise learning effects are limited; not applicable to scenarios requiring real-time high-concurrency memory.
Use Cases
- When using a personal AI assistant for project development, manage code repositories, task progress, and decision histories through a L1/L2/L3 three-tier memory hierarchy to ensure context consistency in long-term dialogues.
- In team collaboration, use the WAL Protocol to log major decisions to SESSION-STATE.md before responding, preventing information loss and decision conflicts.
- Knowledge managers regularly review error records in learnings/errors.json to optimize the AI assistant's learning model and improve task accuracy.
- At the end of each workday, conduct a review in the brain/tasks/daily/ directory, update task lists and memory states to prepare for the next day.
Best For
- Developers: Use AI to aid coding and project management, needing long-term memory to track code changes, task dependencies, and avoid repeated errors.
- Team Managers: Coordinate multi-person projects, relying on structured memory and the WAL Protocol to ensure consistent and traceable team decision records.
- Knowledge Specialists: Maintain team knowledge bases, requiring an error review system to improve documentation, optimize processes, and reduce information redundancy.
- Individual Users: Manage daily tasks and notes, depending on a three-tier memory hierarchy to avoid information omissions and enhance the continuity of personal AI assistants.
Related Skills
Run a grilling session to interact with or test AI agents.
A systematic prompt optimization skill that refines prompts using a four-step distillation framework (diagnose, structure, think, compress) and methodologies from four prompting masters.
Quickly converts a user's input, list, or screenshot into a multi-page workbench, supporting template selection, custom builds, and responsive layouts.
HeartFlow is a pure rule-based discrimination layer for AGI that checks AI outputs for correctness and safety before they reach humans.