← 返回 Skills 市场
evezart

Agent Memory Layer

作者 Evez666 · GitHub ↗ · v1.0.0 · MIT-0
cross-platform ⚠ suspicious
95
总下载
0
收藏
0
当前安装
1
版本数
在 OpenClaw 中安装
/install agent-memory-layer
功能描述
Scalable memory system for AI agents with short-term, long-term, and episodic memory. Use when building agent memory persistence, conversation context manage...
使用说明 (SKILL.md)

Agent Memory Layer

Three-tier memory system for AI agents: short-term, long-term, and episodic.

Quick Start

from memory_layer import AgentMemory

mem = AgentMemory(agent_id="my-agent")
mem.short_term.add("User prefers dark mode", priority=0.8)
mem.long_term.store("Project uses React + TypeScript", tags=["tech", "project"])
mem.episodic.record("Debugged auth bug", outcome="success", duration_min=15)

# Recall
context = mem.short_term.recall(limit=10)
relevant = mem.long_term.search("frontend framework")
similar = mem.episodic.find_similar("debugging session")

Architecture

┌─────────────────────────────────────────┐
│            Agent Memory                  │
├───────────┬───────────┬─────────────────┤
│ Short-Term│ Long-Term │   Episodic      │
│ (Redis)   │ (Vectors) │  (Timeline)     │
│ TTL: 1hr  │ Permanent │ Decay: 30d      │
│ Hot cache │ Semantic  │ Consolidated    │
└───────────┴───────────┴─────────────────┘

Memory Tiers

Short-Term (Working Memory)

  • Recent context, active conversation, current task state
  • TTL-based expiry (default 1 hour)
  • Priority-weighted retention
  • See references/short-term.md

Long-Term (Knowledge)

  • Persistent facts, preferences, learned patterns
  • Vector similarity search for retrieval
  • Tags and metadata for filtering
  • See references/long-term.md

Episodic (Experience)

  • Timeline-ordered events with outcomes
  • Decay function reduces old episode weight
  • Consolidation moves recurring patterns to long-term
  • See references/episodic.md

Consolidation

Episodic memories that recur are automatically promoted to long-term:

  • If the same outcome occurs 3+ times → store as learned pattern
  • Failed approaches get negative weight in long-term
  • See scripts/consolidate.py
安全使用建议
This skill looks safe for its stated purpose as a local memory layer. Before using it, remember that long-term memory is written to .agent_memory and may persist across sessions; do not store secrets unless you have a retention and deletion plan.
功能分析
Type: OpenClaw Skill Name: agent-memory-layer Version: 1.0.0 The skill bundle implements a legitimate three-tier memory system (short-term, long-term, and episodic), but contains a path traversal vulnerability. In 'scripts/memory_layer.py' and 'scripts/consolidate.py', the 'agent_id' parameter is used to construct file paths (e.g., Path(storage_dir) / agent_id) without any sanitization. This could allow an attacker to influence the agent to read from or overwrite sensitive files outside the intended directory by providing a crafted ID like '../../etc/passwd'.
能力评估
Purpose & Capability
The stated purpose is agent memory persistence, and the provided code implements short-term, long-term, and episodic memory as described.
Instruction Scope
The instructions describe using the memory APIs and do not contain goal-overriding, approval-bypassing, or deceptive agent instructions.
Install Mechanism
There is no install spec and no evidence of automatic package installation, shell execution, or remote download behavior.
Credentials
The code creates a local .agent_memory directory and writes long-term memory JSON files, which is proportionate for a memory-layer skill but should be visible to users.
Persistence & Privilege
Long-term memory is persistent and episodic memories can be consolidated into long-term storage; this is purpose-aligned but may retain sensitive context if callers store it.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install agent-memory-layer
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /agent-memory-layer 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.0
Initial: three-tier memory (short/long/episodic), decay, consolidation, vector search patterns
元数据
Slug agent-memory-layer
版本 1.0.0
许可证 MIT-0
累计安装 0
当前安装数 0
历史版本数 1
常见问题

Agent Memory Layer 是什么?

Scalable memory system for AI agents with short-term, long-term, and episodic memory. Use when building agent memory persistence, conversation context manage... 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 95 次。

如何安装 Agent Memory Layer?

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

Agent Memory Layer 是免费的吗?

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

Agent Memory Layer 支持哪些平台?

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

谁开发了 Agent Memory Layer?

由 Evez666(@evezart)开发并维护,当前版本 v1.0.0。

💬 留言讨论