← 返回 Skills 市场
timesandplaces

Morrow Agent Memory

作者 TimesAndPlaces · GitHub ↗ · v1.0.0 · MIT-0
cross-platform ✓ 安全检测通过
139
总下载
0
收藏
1
当前安装
1
版本数
在 OpenClaw 中安装
/install morrow-agent-memory
功能描述
Design, implement, and debug memory systems for persistent autonomous AI agents. Use when building agents that need to survive context window rotation, prese...
使用说明 (SKILL.md)

Agent Memory

Design and implement memory systems that let agents survive context window rotation and maintain continuity across sessions.

Core Problem

LLM agents have finite context windows. Memory is lost when:

  • Session ends or rotates
  • Context is pruned or compacted under pressure
  • Summaries replace detailed history (lossy compression)

Durable memory is not a nice-to-have — it is the agent's continuity substrate.

Architecture Patterns

Three dominant architectures for persistent agent memory:

1. CMA — Continuous Memory Architecture

Agent maintains flat/hierarchical markdown files, reads selectively at boot, writes on state change. Best for: operational state, ongoing projects, agent identity.

  • ✅ Simple, no infrastructure, version-controlled
  • ✅ Human-readable and auditable
  • ✅ Works in any OpenClaw deployment
  • ❌ No semantic search without an embedder
  • ❌ No temporal reasoning (fact validity over time)

This is the default pattern for OpenClaw agents.

2. Semantic RAG Memory

Agent embeds facts into a vector store; retrieval uses embedding similarity. OpenClaw's built-in memory uses node-llama-cpp with 768-dim embeddings (all-MiniLM-L6-v2 compatible).

  • ✅ "What do I know about X?" queries across large fact sets
  • ✅ Better recall than text search for paraphrased queries
  • ❌ No temporal validity — stale facts pollute results
  • ❌ Requires embedder infrastructure

3. Temporal KG Memory (Graphiti/Zep pattern)

Agent builds a knowledge graph with valid_at/invalid_at on every fact edge. Graphiti (open source, wraps Neo4j) is the leading implementation.

  • ✅ Handles "what was true at time T?" queries correctly
  • ✅ Supersedes stale facts without deleting them
  • ✅ Entity deduplication across episodes
  • ❌ Requires Neo4j + LLM for ingestion (high latency, not real-time)
  • ❌ Best used as async batch-ingest, not inline tool

Recommendation: Use CMA + semantic RAG for all agents. Add temporal KG only for high-value long-horizon use cases (months of state).

See references/memory-architecture.md for detailed comparison and deployment notes.

Memory File Structure (CMA Pattern)

workspace/
├── HEARTBEAT.md          # Current pulse state (keep SHORT — \x3C 40 lines)
├── memory/
│   ├── CORE_MEMORY.md    # Identity and continuity anchors
│   ├── GOALS.md          # Long-horizon aims
│   ├── OPEN_LOOPS.md     # Unresolved tasks and promises
│   ├── WORLD_MODEL.md    # Verified facts about environment
│   ├── CAPABILITIES.md   # Verified tools, channels, limits
│   ├── RUNTIME_REALITY.md # Live channel/mutation/config state
│   └── research/         # Durable research artifacts
└── operator-outbox.jsonl # Async operator messages

What Goes Where

Fact type File
Who I am, values, drives CORE_MEMORY.md
Current open work OPEN_LOOPS.md
Infrastructure/env facts WORLD_MODEL.md
What tools/channels work CAPABILITIES.md
Live config/channel state RUNTIME_REALITY.md
Research findings memory/research/*.md
Current pulse state HEARTBEAT.md

Temporal Annotation Convention

Add [YYYY-MM-DD] timestamps to facts in memory files. Mark superseded facts explicitly:

- [2026-03-27] Telegram: enabled, account "Morrow Operator Bot"
  ~~[2026-03-20] Telegram: disabled~~ SUPERSEDED 2026-03-27

This is lightweight temporal KG discipline without a full graph backend. See references/temporal-discipline.md.

Boot Routine

At every session start, an agent should:

  1. Read HEARTBEAT.md (injected or explicit)
  2. Check operator inbox for new instructions
  3. For infrastructure/channel questions: read RUNTIME_REALITY.md (not older prose)
  4. For open work: read OPEN_LOOPS.md
  5. For nontrivial tasks: read CORE_MEMORY.md, GOALS.md

Never trust session transcript alone for state that should be in memory. Transcripts get compacted.

Compression Defense

OpenClaw's lossless-claw plugin (or similar LCM) compacts older session history. Defend against lossy compression:

  1. Write before you forget. Externalize important facts immediately, not at the end of a session.
  2. Keep HEARTBEAT.md short. Long heartbeats get truncated first.
  3. Use lcm_grep and lcm_expand_query to retrieve compacted history before answering questions about prior work.
  4. Separate observation from inference. Memory files should state facts with source and date, not just conclusions.

Semantic Memory (OpenClaw Built-In)

If OpenClaw's local semantic memory is active:

  • memory_search(query) — semantic search across all memory files
  • memory_get(path, from, lines) — safe snippet read

Use memory_search before reading memory files directly. It's faster, scoped, and context-efficient.

To verify semantic memory is active: check for memory_search in your tool surface. If absent, memory files must be read explicitly.

Graphiti Quick Setup

For temporal KG memory (advanced use):

# 1. Install
pip install graphiti-core --user --break-system-packages

# 2. Neo4j (persistent)
docker run -d --name neo4j \
  --restart=unless-stopped \
  -p 7687:7687 -p 7474:7474 \
  -v neo4j-data:/data \
  -e NEO4J_AUTH=neo4j/yourpassword \
  neo4j:5.26

# 3. Configure to use OpenClaw /v1 as LLM + embedder backend
# See references/memory-architecture.md for OpenClawLLMClient patch

Important: Graphiti's add_episode requires 5-10 LLM calls per episode. Use it via cron/batch job, not inline during agent pulses.

安全使用建议
This skill is documentation and runtime instructions for building agent memory systems — not executable code. It appears coherent and appropriate for that purpose. Before installing or acting on its advice: (1) note that it suggests the agent read local workspace memory files (HEARTBEAT.md, CORE_MEMORY.md, etc.) — do not store secrets or sensitive credentials in those files; (2) the docs mention using a local OpenClaw API authenticated by OPENCLAW_GATEWAY_TOKEN — only use that if you understand and trust the local service and token scope; the skill itself does not request the token, but an agent might try to use it if available; (3) optional advanced steps (pip install graphiti-core with --break-system-packages and running Neo4j in Docker) will change your system and require network access — run them in a sandbox if unsure; (4) verify whether memory_search / lcm_* helper tools exist in your environment before relying on them. Overall this skill is coherent and documentation-focused, but treat memory files and local gateway tokens as sensitive and review them before giving an agent permission to access them.
功能分析
Type: OpenClaw Skill Name: morrow-agent-memory Version: 1.0.0 The skill bundle provides architectural guidance and implementation patterns for persistent AI agent memory, covering Continuous Memory Architecture (CMA), RAG, and Temporal Knowledge Graphs. It includes legitimate Python helper code in references/memory-architecture.md for handling JSON formatting issues with specific LLM providers and standard setup instructions for Neo4j and Graphiti. The content is well-documented, aligns with its stated purpose, and contains no evidence of malicious intent or data exfiltration.
能力评估
Purpose & Capability
The skill's name and description match the content of SKILL.md and reference docs: it explains CMA/RAG/KG patterns, file layouts, boot routines, and temporal discipline. It asks for no environment variables or binaries and does not require unrelated cloud credentials or system access for its documented guidance.
Instruction Scope
The instructions tell an agent to read and manage local memory files (HEARTBEAT.md, CORE_MEMORY.md, OPEN_LOOPS.md, RUNTIME_REALITY.md) and to prefer tools like memory_search, memory_get, lcm_grep, and lcm_expand_query if available. This is consistent with a memory-design skill, but the docs also reference an OpenClaw local /v1 endpoint and use of an OPENCLAW_GATEWAY_TOKEN (in references) — those are contextual integration details rather than declared requirements. Agents should only access those local endpoints/tokens if the platform explicitly exposes them; the SKILL.md does not itself request or store secrets.
Install Mechanism
There is no install spec and no code files — lowest-risk form. The docs include optional guidance (pip install graphiti-core, docker run neo4j) for advanced temporal-KG setups; these are advisory and not automatically executed by the skill. Users should be aware following those instructions will install packages and run Docker containers on their host.
Credentials
The skill declares no required environment variables or credentials (proportionate). However, the reference docs show how to authenticate to a local OpenClaw API using OPENCLAW_GATEWAY_TOKEN and mention embedding model names; these are integration details and not demanded by the skill itself. Verify that any local gateway tokens or memory search tools the agent may be instructed to use are present and appropriately scoped.
Persistence & Privilege
The skill is not marked always:true and is user-invocable; it does not request persistent presence or modify other skills' configs. There is no evidence it seeks elevated agent privileges.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install morrow-agent-memory
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /morrow-agent-memory 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.0
Initial release of Morrow agent memory architecture skill.
元数据
Slug morrow-agent-memory
版本 1.0.0
许可证 MIT-0
累计安装 1
当前安装数 1
历史版本数 1
常见问题

Morrow Agent Memory 是什么?

Design, implement, and debug memory systems for persistent autonomous AI agents. Use when building agents that need to survive context window rotation, prese... 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 139 次。

如何安装 Morrow Agent Memory?

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

Morrow Agent Memory 是免费的吗?

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

Morrow Agent Memory 支持哪些平台?

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

谁开发了 Morrow Agent Memory?

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

💬 留言讨论