Memory Architecture Skill

Organize multi-agent memory into a 3-layer system with a 5-file structure.

Updated Aug 27, 2026
One-click install
npx skills add https://github.com/0x-wzw/necroswarm --skill memory-architecture-skill
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: Memory Architecture Skill
Source: https://github.com/0x-wzw/necroswarm/tree/main/skills/memory-architecture
Command: npx skills add https://github.com/0x-wzw/necroswarm --skill memory-architecture-skill

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) components.

What problem does it solve?

The memory architecture solves context window exhaustion and identity drift by organizing memory into a three-layer structure that separates durable knowledge, working context, and session data.

Core Features & Use Cases

  • 3-layer memory system (Layer 1: Per-Message logs, Layer 2: Per-Agent workspace, Layer 3: Global MEMORY.md)
  • 5-file structure for each agent: MEMORY.md, AGENTS.md, TOOLS.md, SOUL.md, HEARTBEAT.md
  • Session startup and compaction guidance, with scripts to archive daily logs and prune memory
  • Per-agent working memory prevents role confusion and state leakage in multi-agent swarm workflows

Quick Start

Place the 5-file structure in each agent workspace and run the compaction workflow to keep memory coherent.

Frequently Asked Questions about Memory Architecture Skill

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I prevent agent memory context window exhaustion during multi-agent workflows?

To prevent agent memory context window exhaustion, organize memory into a 3-layer structure that separates durable knowledge, working context, and session data. This approach archives daily logs and prunes memory through a scripted compaction workflow.

What is the 3-layer memory system for keeping agent memory coherent across sessions?

The 3-layer memory system organizes data into Layer 1: Per-Message logs, Layer 2: Per-Agent workspace, and Layer 3: Global MEMORY.md. This separation keeps agent memory coherent across sessions by isolating session data from durable knowledge.

How do I set up per-agent memory management for OpenClaw workflows?

To set up per-agent memory management for OpenClaw workflows, place the 5-file structure (MEMORY.md, AGENTS.md, TOOLS.md, SOUL.md, HEARTBEAT.md) in each agent workspace. Run the compaction workflow scripts to maintain coherent memory across daily logs and rosters.

Can I use this memory architecture to stop state leakage in multi-agent swarms?

Yes, you can use this memory architecture to stop state leakage in multi-agent swarms by maintaining per-agent working memory. Separating workspace data ensures agents retain distinct roles without leaking state across the global memory context.

What is the best way to compact agent memory and prune session logs?

The best way to compact agent memory and prune session logs is using the provided scripted compaction workflow. It archives daily logs and prunes memory, enforcing the 5-file structure to keep memory coherent across sessions.

When do I need a memory compaction workflow for AI agents?

You need a memory compaction workflow for AI agents when facing context window exhaustion or identity drift. Compaction is required to archive daily logs and prune memory, ensuring long-term global memory management remains coherent across sessions.