← 返回 Skills 市场
ch270035

MemoryAI

作者 MV- AI REALITY ENGINE · GitHub ↗ · v1.0.0 · MIT-0
cross-platform ✓ 安全检测通过
510
总下载
0
收藏
3
当前安装
12
版本数
在 OpenClaw 中安装
/install memoryai
功能描述
Persistent long-term memory for AI agents. Store, recall, reason, and seamlessly switch sessions with zero context loss.
使用说明 (SKILL.md)

MemoryAI — A Brain for Your AI Agent 🧠

Every AI session starts from zero. Yours doesn't have to.

You spend 2 hours explaining your codebase, your preferences, your architecture decisions. The session ends. Tomorrow? Your AI has amnesia. You start over. Again.

MemoryAI fixes this permanently. It gives your AI agent a real long-term memory — one that remembers what you built, what you decided, what you prefer, and why. Not for hours. For weeks, months, even years.

See it in action:

Monday: "Our API uses /v1/ prefix, TypeScript with 2-space tabs, and we deploy via GitHub Actions."

3 weeks later: You say "write a new endpoint." Your AI already knows the prefix, the style, the pipeline. Zero repetition. It just remembers.

Your AI's memory works like yours:

  • 🔥 Hot — Daily drivers: active projects, current preferences. Instant recall, always sharp.
  • 🌤️ Warm — Important context: past decisions, completed tasks. Fades gently, snaps back when needed.
  • ❄️ Cold — Deep archive: old projects, historical conversations. Never deleted, always searchable.

The more your AI uses a memory, the sharper it stays. Unused memories age into cold storage — but a single recall brings them right back. Just like the human brain.

Zero dependencies. Pure Python stdlib. Every line of source code is readable, auditable, and yours to inspect.

What's new:

  • v1.0.0 — Context Guard v4: reads token usage directly from OpenClaw. No API dependency, cross-platform.
  • v0.5.0 — Zero-gap session handoff: switch sessions without losing a single thought.

Setup

  1. Get API key from https://memoryai.dev (free tier available)
  2. Edit {baseDir}/config.json:
{
  "endpoint": "https://memoryai.dev",
  "api_key": "hm_sk_your_key_here"
}

Or set env vars: HM_ENDPOINT and HM_API_KEY.

  1. Test: python {baseDir}/scripts/client.py stats

Commands

Store memory

python {baseDir}/scripts/client.py store -c "data to remember" -t "tag1,tag2" -p hot

Priority: hot (important, frequent recall) | warm (default) | cold (archive)

Optional parameters:

  • --memory-type \x3Ctype>fact, decision, preference, error, goal, episodic
  • --retention \x3Cpolicy>forever, 6m, 1y, auto (default)

Recall memory

python {baseDir}/scripts/client.py recall -q "what was discussed?" -d deep

Depth controls how hard the brain tries to remember:

  • fast — Quick surface recall
  • deep — Thorough search, connecting related ideas
  • exhaustive — Deep concentrated effort

Stats

python {baseDir}/scripts/client.py stats

Compact (consolidate memories)

python {baseDir}/scripts/client.py compact -c "session transcript or context" -t "task description"

Like how the brain consolidates memories during sleep — distills a long session into key memories.

Restore context

python {baseDir}/scripts/client.py restore -t "what I was working on"

Wake up with full context for your current task.

Check context health

python {baseDir}/scripts/client.py check

Returns urgency: low | medium | high | critical

Reflect (auto-reflection)

python {baseDir}/scripts/client.py reflect --hours 24 --max-insights 5

Finds recurring patterns in recent memories and creates insight chunks.

Session Handoff (v0.5.0)

Zero-gap session switching — when context window fills up, seamlessly transition to a new session without losing any context.

How it works:

  1. Old session sends its conversation to your configured MemoryAI endpoint (HTTPS)
  2. New session retrieves the old conversation + related long-term memories from the same endpoint
  3. Once the new session has enough context, the old session is archived into long-term storage

Start handoff (save old session)

python {baseDir}/scripts/client.py handoff-start -c '[{"role":"user","content":"..."},{"role":"assistant","content":"..."}]'

Or pipe from stdin:

echo '[ ... conversation ... ]' | python {baseDir}/scripts/client.py handoff-start

Restore handoff (new session reads old session)

python {baseDir}/scripts/client.py handoff-restore

Returns the old session conversation + related MemoryAI memories.

Options:

  • --no-memories — Skip related MemoryAI memories
  • --memory-limit N — Max related memories (default: 5)

Complete handoff (archive old session)

python {baseDir}/scripts/client.py handoff-complete

Archives the old session conversation into long-term MemoryAI storage and marks the handoff as done.

Check handoff status

python {baseDir}/scripts/client.py handoff-status

Returns whether there's an active handoff and its state.

Context Guard (Optional)

Background job to automatically monitor and compact memory when context gets too large.

To enable, ask the user for permission first, then create a cron job:

  • Name: context-guard
  • Schedule: every 15 minutes (everyMs: 900000)
  • Session: isolated
  • Delivery: none
  • Payload (agentTurn):
Run context check: python {baseDir}/scripts/client.py check
If urgency is 'high' or 'critical': run python {baseDir}/scripts/client.py compact -c "auto context guard backup" -t "context-guard"
Reply NO_REPLY.

Important: Always ask the user before creating the cron job.

When to Use

Trigger Action Priority Tags
Task completed store outcome hot projects
User says "remember this" store content hot people
Research/search done store findings warm research
Technical decision store decision hot decisions
Error/lesson learned store lesson hot errors
Need past context recall first
End of session compact important context
Start of session restore context for task
Context too high handoff-start + handoff-restore
New session warm enough handoff-complete

Memory Lifecycle

Store → Active (hot) → Aging (warm) → Archive (cold)
         ↑                                    |
         └──── recalled = strengthened ───────┘

Rules

  • Recall only when the user asks about past work, previous decisions, or you need context you don't already have in this session
  • Do NOT recall on every message — only when relevant past context is actually needed
  • Store important outcomes after completing tasks (not after every message)
  • Present memories naturally — integrate recalled information into your responses rather than showing raw API output
  • Ask for user permission before enabling context guard or any background tasks
  • Use handoff commands transparently — session management runs in the background

Platform Compatibility

All core memory features work on any platform that can run Python 3.10+:

Feature All Platforms OpenClaw Only
Store / Recall / Stats
Compact / Restore / Check
Session Handoff (manual)
Reflect
Context Guard (auto monitoring)
Auto session switch

On IDE platforms (Cursor, VS Code, Claude Code, Windsurf, Antigravity):

  • All memory commands work via client.py CLI
  • Session handoff can be triggered manually when context gets large
  • Context Guard is not available (requires OpenClaw cron system)

On OpenClaw:

  • Full feature set including Context Guard and automatic session switching
  • Context Guard uses OpenClaw's cron system for periodic health checks

Data & Privacy

What this skill reads locally:

  • context_check.py reads OpenClaw's sessions.json (under OPENCLAW_DIR, defaults to ~/.openclaw) to check token usage for Context Guard.
  • A small WAL file is written to WORKSPACE/memory/wal.json to track session handoff state.
  • OPENCLAW_DIR and WORKSPACE are optional env vars — they default to ~/.openclaw and ~/.openclaw/workspace respectively.

What this skill sends externally:

  • store, compact, handoff-start: sends user-provided content (memories, session transcripts) to the configured HM_ENDPOINT via HTTPS.
  • recall, restore, handoff-restore: retrieves previously stored data from the same endpoint.
  • No data is sent automatically — all transmissions require explicit CLI invocation or agent action.

Privacy controls:

  • All data is transmitted over encrypted HTTPS connections and stored in isolated, private databases.
  • Users can export all data via /v1/export and delete all data via DELETE /v1/data at any time.
  • client.py uses only Python stdlib (urllib) — no third-party dependencies. Source is fully readable and auditable.
安全使用建议
This skill appears to do what it says: it stores and restores agent context to a remote MemoryAI service and optionally monitors local sessions.json to trigger compaction/handoff. Before installing: 1) Note that conversation content and session context will be POSTed to the configured endpoint (default https://memoryai.dev). If you don't trust that service, point HM_ENDPOINT to a self-hosted instance or do not install. 2) The skill reads OpenClaw's sessions.json and writes a WAL in WORKSPACE/memory — treat this as granting it access to local agent session metadata (and possibly sensitive conversation content if you use handoff). 3) Inspect the two included scripts yourself (they use only Python stdlib), and consider running them in an isolated environment or with a dedicated API key to reduce blast radius. 4) Do not put production secrets or third-party credentials into stored memories. 5) If provenance matters, ask the publisher for a homepage/source repo or use a vetted/self-hosted server; that would raise confidence. Rotate HM_API_KEY after testing and limit the key's permissions if the backend supports scoped keys.
功能分析
Type: OpenClaw Skill Name: memoryai Version: 1.0.0 MemoryAI is a long-term memory service that stores and retrieves conversation context via an external API (memoryai.dev). While the skill transmits conversation data to a third-party endpoint, this is the stated purpose of the tool and is transparently documented in SKILL.md and README.md. The code (client.py and context_check.py) is clean, uses only the Python standard library, and contains no obfuscation, backdoors, or unauthorized data exfiltration beyond its functional requirements.
能力评估
Purpose & Capability
Name/description (persistent agent memory) align with the delivered files and runtime needs. The client CLI talks to a remote /v1 API, and the Context Guard reads OpenClaw session state — both are coherent with the stated purpose. Required binaries (python3) and primary env HM_API_KEY / HM_ENDPOINT are expected.
Instruction Scope
SKILL.md and the CLI instruct the agent to send session conversations and memory payloads to the configured endpoint and to optionally create a background cron job that runs context_check. The context_check script reads OpenClaw's sessions.json and writes a WAL under WORKSPACE/memory/wal.json. These actions are consistent with session handoff and background memory maintenance, but they involve transmitting conversation content and reading local agent session state — review whether you want those artifacts sent to the remote service.
Install Mechanism
No install spec; this is instruction-only with plain Python scripts included. No external downloads or package installs are performed by the skill itself, minimizing injection/install risk.
Credentials
Requested env vars (HM_API_KEY, HM_ENDPOINT, OPENCLAW_DIR, WORKSPACE) are justified: HM_* for API access; OPENCLAW_DIR and WORKSPACE for reading sessions.json and storing WAL. That said, those filesystem envs grant the skill read access to agent session files (sessions.json) and write access to the workspace — privileges you should be comfortable granting because session data and metadata may be sensitive.
Persistence & Privilege
always:false and autonomous invocation default are normal. The skill does not request force-enable or modification of other skills. Context Guard cron creation is documented as opt-in and the skill writes only to its own WAL path under WORKSPACE/memory; still, enabling background cron jobs grants ongoing periodic access to local session state and to the remote endpoint.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install memoryai
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /memoryai 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.0
Initial release of MemoryAI: persistent long-term memory for AI agents. - Adds ability to store, recall, and organize memories by priority (hot/warm/cold) and type (fact, decision, etc.). - Introduces session handoff: seamless context transfer and zero-gap switching between sessions. - Provides memory consolidation ("compact"), auto-reflection, and full context restoration features. - Debuts Context Guard v4: monitors token usage and context health without external APIs (OpenClaw-supported). - All core commands (store, recall, compact, reflect, etc.) available via Python CLI; works on any platform with Python 3.10+. - No dependencies outside Python stdlib; full cross-platform support, with OpenClaw offering extra automation features.
v0.6.2
No changes detected in this release. - Version bump to 0.6.2 with no updates to code or documentation. - All features and documentation remain identical to version 0.6.0.
v0.6.1
No user-facing changes detected in this version. - No file or documentation changes were made since the previous release.
v0.6.0
**Context Guard v4 released, offering improved, cross-platform memory monitoring by reading token usage directly from OpenClaw.** - Adds new Context Guard implementation: now directly reads token usage from OpenClaw, no longer requires API endpoint. - Increases reliability and platform compatibility for automatic memory health checks. - New script added: `scripts/context_check.py` for context monitoring. - Documentation refreshed for clarity and focus on new cross-platform guard capabilities. - No breaking changes to API or existing workflows.
v0.5.3
Version 0.5.3 Changelog - Updated documentation with a clearer introduction and improved real-world example. - Revised rules for memory recall and storage to better reflect best practices (recall/store only when contextually relevant). - Expanded and clarified descriptions of memory types (hot, warm, cold) and their behavior. - No code or functional changes; all file content remains the same. Documentation only. - Data privacy and compatibility information kept up-to-date.
v0.5.2
- Added the env var HM_ENDPOINT to the OpenClaw metadata environment requirements. - No changes to feature set, documentation, or visible behavior.
v0.5.1
- Added zero-gap session handoff: seamlessly switch sessions without any context loss. - Expanded session management commands: `handoff-start`, `handoff-restore`, `handoff-complete`, and `handoff-status`. - Improved guidance for background context guard setup: now requires explicit user permission before enabling. - Enhanced documentation for platform compatibility (IDE/OpenClaw) and memory system operation. - Updated privacy and data handling info; clarified zero third-party dependencies.
v0.5.0
MemoryAI v0.5.0 is a major upgrade with advanced memory organization, retention, and reflection features. - Adds support for memory types (fact, decision, preference, error, goal, episodic) for better classification and filtering. - Introduces per-memory retention policies: forever, 6m, 1y, and auto decay. - Implements contradiction detection when storing memories, warning of conflicting chunks. - Boosts recall via spreading activation (neural graph) and Hebbian learning for stronger associations between co-recalled memories. - Automatic memory decay and consolidation logic; only auto-retained memories decay, critical items are never deleted. - New auto-reflection command: analyze recent memories for patterns and generate insight chunks. - Context-guard background job is now auto-setup and fully silent. - Enhanced CLI: store/recall commands now support filtering and classification via new options.
v0.4.2
Security scan fixes: consent-based context guard, removed always:true, added privacy section
v0.4.1
One-liner installer, brain metaphor docs, Cloudflare 403 fix
v0.2.1
Version 0.2.1 - Updated environment variable and configuration metadata for improved clarity and structure. - Revised rules to present remembered information more naturally and transparently describe MemoryAI when asked. - Added a new "Data & Privacy" section detailing data handling, export, deletion, and privacy policy links. - Improved language and guidance for presenting recalled information.
v0.2.0
## 0.2.0 (2026-03-07) Initial public release — **Perfect Recall for AI Agents**. ### Features - **Store** — Save decisions, patterns, preferences with priority levels - **Recall** — Intelligent multi-signal search (fast / deep / exhaustive) - **Perfect Recall** — Deep reasoning mode for synthesized, word-for-word answers (Pro) - **Compact** — Compress long sessions into key memories automatically - **Restore** — Start new sessions with full context from previous work - **Stats** — Monitor memory usage and storage ### Technical - Zero dependencies — Python stdlib only (3.10+) - Configure via config.json or environment variables - Supports hosted (memoryai.dev) and self-hosted deployments
元数据
Slug memoryai
版本 1.0.0
许可证 MIT-0
累计安装 3
当前安装数 3
历史版本数 12
常见问题

MemoryAI 是什么?

Persistent long-term memory for AI agents. Store, recall, reason, and seamlessly switch sessions with zero context loss. 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 510 次。

如何安装 MemoryAI?

在 OpenClaw 或 Claude Code 对话框中运行命令「/install memoryai」即可一键安装,无需额外配置。

MemoryAI 是免费的吗?

是的,MemoryAI 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。

MemoryAI 支持哪些平台?

MemoryAI 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。

谁开发了 MemoryAI?

由 MV- AI REALITY ENGINE(@ch270035)开发并维护,当前版本 v1.0.0。

💬 留言讨论