OpenClaw Memory Format

v1.0.0

Manage OpenClaw's multi-layered memory system with structured, searchable markdown files for long-term, daily, and session memories, supporting hybrid semant...

0· 9·0 current·0 all-time
MIT-0
Download zip
LicenseMIT-0 · Free to use, modify, and redistribute. No attribution required.
Security Scan
VirusTotalVirusTotal
Benign
View report →
OpenClawOpenClaw
Benign
high confidence
Purpose & Capability
Name, description, and runtime instructions all describe a structured memory format and associated file locations; there are no unrelated environment variables, binaries, or install steps requested that would be inconsistent with that purpose.
Instruction Scope
SKILL.md instructs the agent to read/write MEMORY.md and memory/YYYY-MM-DD.md and to use memory_search / memory_get tools. This is appropriate for a memory-format skill, but it implicitly requires filesystem access to $WORKSPACE and the memory/ directory and assumes the memory_search/memory_get tools exist and are trusted. Confirm those tools and workspace access are available and acceptable in your environment.
Install Mechanism
No install spec and no code files — lowest-risk model: nothing is written or downloaded by the skill itself.
Credentials
The skill declares no required env vars or credentials. However, it references $WORKSPACE paths and expects read/write access to the agent workspace. Ensure the workspace doesn't contain sensitive files you don't want the agent to read/write or load into the system prompt.
Persistence & Privilege
always is false and model invocation is allowed (platform default). The skill does not request elevated or persistent privileges beyond normal agent file access.
Assessment
This is an instruction-only memory-format guide and appears coherent with its purpose. Before installing, check the following: (1) confirm your agent environment grants the skill access to the $WORKSPACE and memory/ paths — installing gives the skill the ability to read and write those files; (2) ensure the memory_search and memory_get tooling the skill references are provided by your platform and are trustworthy; (3) do not store secrets in MEMORY.md or daily memory files because the guide states MEMORY.md is loaded into the system prompt on startup (anything loaded into prompts can be exposed to model processing); and (4) consider backups and retention policy for the auto-written memory/YYYY-MM-DD.md files. No network downloads, credentials, or suspicious behaviors were found in the instructions.

Like a lobster shell, security has layers — review code before you run it.

latestvk976hzb24hy6dpddg0bty4h0j5841n3e

License

MIT-0
Free to use, modify, and redistribute. No attribution required.

SKILL.md

Memory Format - Memory Format Guide

Overview

OpenClaw's memory system uses multi-layered storage combining semantic and keyword search.

Memory Layers

1. MEMORY.md (Long-term Memory)

  • Manually maintained core memory
  • Loaded into system prompt on startup
  • Human-readable and editable
  • Path: $WORKSPACE/MEMORY.md

2. memory/YYYY-MM-DD.md (Daily Memory)

  • Auto-written by memory flush
  • Triggered when context is full
  • Appended to the day's date file
  • Path: memory/YYYY-MM-DD.md

3. Session Memory

  • Only visible in current session
  • Auto-cleared after session ends

Improved Daily Memory Format

Use structured format for easy later retrieval:

# 2026-04-01 Daily Memory

## Completed Today
- Researched Claw Code architecture
- Completed MCP orchestration analysis
- Started P0 improvement tasks

## Conversation Summary
- User request: Full analysis of OpenClaw vs Claw-Code
- Systems involved: Tool/Session/MCP/API/Hook/Plugin/Prompt/Skill/Memory/Sandbox/Error
- Output: Complete improvement list (22 items)

## Key Decisions
- MCP process pool needs core modification, P3
- Tool Schema supplements added to TOOLS.md
- Hook examples library created

## Follow-up Items
- [ ] Execute P0 tasks 1-6
- [ ] Verify improvement effects
- [ ] Continue P1 tasks

## Important Files
- $WORKSPACE/MEMORY.md
- $WORKSPACE/claw-code/ (cloned claw-code repository)

## Technical Notes
- Hybrid search: vector 70% + text 30%
- Compaction threshold: 4k tokens reserved space
- Sandbox: Docker network=none, capDrop=ALL

Memory Search

memory_search tool

Use semantic search to find relevant memories:
- Returns 6 results by default
- minScore: 0.35
- Supports hybrid search mode

memory_get tool

Read specific memory files:
- path: file path (MEMORY.md or memory/YYYY-MM-DD.md)
- from: start line
- lines: line limit

Flush Triggers

ConditionThreshold
softThresholdTokens4000 tokens reserved space
forceFlushTranscriptBytes2MB force flush
reserveTokensFloor20000 tokens floor

Best Practices

  1. Daily summary: Write end-of-day summary
  2. Structured: Use headings, sections, lists
  3. Searchable: Include keywords for search
  4. Not excessive: Only write important, long-term memories
  5. Periodic cleanup: Distill daily → MEMORY.md

Difference from Compact

Memory FlushCompaction
TriggerContext fullContext full
Writememory/YYYY-MM-DD.mdNo file write
ContentImportant memoriesConversation summary
FormatStructured markdownInternal summary

Files

1 total
Select a file
Select a file to preview.

Comments

Loading comments…