返回顶部
m

m2wise

Memory-to-Wisdom Engine for AI agents. Use this skill to give yourself long-term memory, extract user preferences/facts from conversations, and track wisdom evolution.

作者: admin | 来源: ClawHub
源自
ClawHub
版本
V 1.0.2
安全检测
已通过
548
下载量
0
收藏
概述
安装方式
版本历史

m2wise

# M2Wise - Memory-to-Wisdom Engine > This is a skill for the OpenClaw AI Agent to enable long-term memory and self-evolving wisdom. ## 🎯 Purpose As an AI agent, you inherently lack persistent memory across distinct sessions. The M2Wise skill bridges this gap. It allows you to: 1. **Extract and store** memories (facts, preferences, commitments) from user conversations. 2. **Retrieve** contextual memories and aggregated wisdom before answering. 3. **Consolidate** raw memories into overarching "Wisdom" (rules, schemas, and skills) during idle time. ## 🚦 When to Use This Skill You should proactively invoke this skill in the following scenarios: - **User expresses a preference**: e.g., "I prefer short answers", "Don't use emojis." - **User shares a personal fact**: e.g., "I work as a Python developer", "I live in Beijing." - **User asks you to remember**: e.g., "Remember that I hate spam." - **Before answering complex questions**: To recall the user's past preferences or facts to personalize your response. ## 🛠️ How to Use (Agent Instructions) You can interact with M2Wise via its Python SDK. Use your shell/execution environment to run these scripts snippet by snippet. ### 1. Installation Requirements Make sure the environment has M2Wise installed before calling its Python API: ```bash pip install m2wise[all] ``` ### 2. Saving Memories (Online Phase) When you detect a fact or preference in the conversation, run a quick python script to save it: ```python from m2wise_sdk import M2WiseSDK sdk = M2WiseSDK() # Extract and save the user's message sdk.add_message("current_user_id", "I prefer concise Chinese answers for technical questions") ``` ### 3. Retrieving Context (Online Phase) Before fulfilling a user's request, fetch their relevant memories: ```python from m2wise_sdk import M2WiseSDK sdk = M2WiseSDK() context = sdk.get_context("current_user_id", "How should I answer this technical question?") print("Retrieved Context:", context) ``` *Action: Read the output of this script and adapt your final response to the user based on the retrieved context.* ### 4. Background Processing (Sleep & Dream) It is a good practice to trigger memory consolidation periodically (e.g., at the end of a long task). ```python from m2wise_sdk import M2WiseSDK sdk = M2WiseSDK() # Sleep: Extracts memories and groups them into Wisdom Drafts sdk.trigger_sleep("current_user_id") # Dream: Verifies drafts against counterexamples and publishes them sdk.trigger_dream("current_user_id") ``` ## 🧩 MCP Server Alternative If your OpenClaw runtime supports MCP (Model Context Protocol), you can start the M2Wise MCP server and use its native tools instead of writing Python scripts: ```bash # Start the MCP server m2wise-mcp --data-dir ./data ``` **Available MCP Tools:** - `m2wise_add`: Add memory from conversation. - `m2wise_search`: Search memories and wisdom. - `m2wise_sleep`: Generate wisdom drafts. - `m2wise_dream`: Verify and publish wisdom. ## 🧠 Memory and Wisdom Types You Will Encounter - **Memories**: `preference` (likes/dislikes), `fact` (states/attributes), `commitment` (future actions). - **Wisdoms**: `principle` (interaction guidelines), `schema` (behavioral patterns), `skill` (operational tactics). ## 🚀 Best Practices 1. **Be Proactive**: Don't wait for the user to explicitly say "remember this". If they state a strong preference, save it using `sdk.add_message()`. 2. **Context First**: For ambiguous requests, always query the memory bank first. 3. **Consolidate Often**: Run `trigger_sleep()` and `trigger_dream()` after completing a major task to ensure your wisdom evolves and stays clean. ## 🔗 Resources - **GitHub Repository**: https://github.com/zengyi-thinking/M2Wise.git - **Installation via OpenClaw (ClawHub)**: ```bash npx clawdhub@latest install m2wise ```

标签

skill ai

通过对话安装

该技能支持在以下平台通过对话安装:

OpenClaw WorkBuddy QClaw Kimi Claude

方式一:安装 SkillHub 和技能

帮我安装 SkillHub 和 m2wise-1776420069 技能

方式二:设置 SkillHub 为优先技能安装源

设置 SkillHub 为我的优先技能安装源,然后帮我安装 m2wise-1776420069 技能

通过命令行安装

skillhub install m2wise-1776420069

下载 Zip 包

⬇ 下载 m2wise v1.0.2

文件大小: 11.02 KB | 发布时间: 2026-4-17 19:26

v1.0.2 最新 2026-4-17 19:26
m2wise 1.0.2 – Documentation Overhaul and Usability Improvements

- Rewrote skill documentation to provide concise, agent-focused instructions and clearer usage guidelines.
- Clarified installation steps and Python SDK usage for adding, retrieving, and consolidating memories and wisdom.
- Added best practices section for proactive memory use and context-first behaviors.
- Expanded MCP server instructions, including the need for the m2wise-mcp binary.
- Removed internal implementation details and streamlined examples for easier adoption by new users

Archiver·手机版·闲社网·闲社论坛·羊毛社区· 多链控股集团有限公司 · 苏ICP备2025199260号-1

Powered by Discuz! X5.0   © 2024-2025 闲社网·线报更新论坛·羊毛分享社区·http://xianshe.com

p2p_official_large
返回顶部