memory-recall

## What it does

3,891 stars

Best use case

memory-recall is best used when you need a repeatable AI agent workflow instead of a one-off prompt.

## What it does

Teams using memory-recall should expect a more consistent output, faster repeated execution, less prompt rewriting.

When to use this skill

  • You want a reusable workflow that can be run more than once with consistent structure.

When not to use this skill

  • You only need a quick one-off answer and do not need a reusable workflow.
  • You cannot install or maintain the underlying files, dependencies, or repository context.

Installation

Claude Code / Cursor / Codex

$curl -o ~/.claude/skills/memory-recall/SKILL.md --create-dirs "https://raw.githubusercontent.com/openclaw/skills/main/skills/0xcjl/openclaw-memory-plugin/skills/memory-recall/SKILL.md"

Manual Installation

  1. Download SKILL.md from GitHub
  2. Place it in .claude/skills/memory-recall/SKILL.md inside your project
  3. Restart your AI agent — it will auto-discover the skill

How memory-recall Compares

Feature / Agentmemory-recallStandard Approach
Platform SupportNot specifiedLimited / Varies
Context Awareness High Baseline
Installation ComplexityUnknownN/A

Frequently Asked Questions

What does this skill do?

## What it does

Where can I find the source code?

You can find the source code on GitHub using the link provided at the top of the page.

Related Guides

SKILL.md Source

# memory-recall

## What it does

Exposes the OpenClaw Memory System tools to any OpenClaw agent via natural language.

This skill provides the memory recall and search interface used by the皮皮虾 (main agent) memory lifecycle hooks:

- **before-task recall** — query relevant past memories before starting a new task
- **after-task save** — write completed task output to the persistent memory store
- **memory search** — BM25-ranked full-text search over all memories
- **memory build** — trigger index rebuild after bulk writes
- **DAG linking** — associate memory entries into an associative graph

## Tools

| Tool | Description |
|------|-------------|
| `memory_recall` | Recall top-N relevant memories before a task. Uses BM25 + keyword hybrid search. |
| `memory_save` | Save a completed task output to memory with auto-tagging. |
| `memory_search` | Full-text BM25 search over the memory store. |
| `memory_build` | Rebuild keyword and BM25 indexes (WAL snapshot). |
| `memory_dag_link` | Record a directed link between two memory entry IDs. |

## Usage

```
You: recall memories about Vue performance optimization
→ calls memory_recall(task="Vue performance optimization")

You: save this task: "Completed Vue component refactor"
→ calls memory_save(task="Completed Vue component refactor", result="...")

You: search memories for Docker deployment issues
→ calls memory_search(query="Docker deployment issues")

You: rebuild the memory indexes
→ calls memory_build()

You: link memory entry abc123 to def456 as "follow-up task"
→ calls memory_dag_link(fromId="abc123", toId="def456", reason="follow-up task")
```

## Direct script access

The underlying scripts can also be called directly from the shell:

```bash
# Recall before task (fast, <500ms target)
memory-hook.sh before-task "optimize Vue rendering"

# Save after task
memory-hook.sh after-task "completed Vue optimization" /tmp/result.txt

# Full index rebuild
memory-hook.sh build

# BM25 search
python3 scripts/bm25_search.py --search "Docker CI/CD" --top 5 --json

# Keyword index search
python3 scripts/memory-indexer.py search "Docker CI/CD" --agent-id dev --top 5

# DAG: auto-build from shared tags
python3 scripts/dag-builder.py build

# DAG: find shortest path between two entries
python3 scripts/dag-builder.py paths abc123 def456

# WAL snapshot
bash scripts/wal-snapshot.sh rebuild
```

## Architecture

See [ARCHITECTURE.md](../docs/ARCHITECTURE.md) for the full system design.

## Memory index schema

Entries in `memory/index.json`:

```json
{
  "id": "sha256_hex",
  "file": "YYYY-MM-DD/agent-slug.md",
  "agent_id": "dev",
  "shared": false,
  "tags": ["vue", "performance"],
  "weight": 0.8,
  "p": "P1",
  "summary": "...",
  "keywords": ["tokenized", "terms"],
  "bm25_doc": ["pre-tokenized", "terms"]
}
```

## Scoring formula

```
combined_score = bm25_norm × 0.6 + weight × 0.2 + keyword_overlap × 0.2
```

## Requirements

- Python 3 (standard library only — no pip packages)
- Bash
- OpenClaw gateway (for tool registration)

Related Skills

Agent Memory Architecture

3891
from openclaw/skills

Complete zero-dependency memory system for AI agents — file-based architecture, daily notes, long-term curation, context management, heartbeat integration, and memory hygiene. No APIs, no databases, no external tools. Works with any agent framework.

memory-cache

3891
from openclaw/skills

High-performance temporary storage system using Redis. Supports namespaced keys (mema:*), TTL management, and session context caching. Use for: (1) Saving agent state, (2) Caching API results, (3) Sharing data between sub-agents.

General Utilities

Memory

3891
from openclaw/skills

Infinite organized memory that complements your agent's built-in memory with unlimited categorized storage.

Memory Management

auto-memory

3891
from openclaw/skills

Indestructible agent memory — permanently stored, never lost. Save decisions, identity, and context as a memory chain on the Autonomys Network. Rebuild your full history from a single CID, even after total state loss.

AI Persistence & Memory

Triple-Layer Memory System

3880
from openclaw/skills

三层记忆系统 - 解决 AI Agent 长对话记忆丢失和上下文管理问题

Memory & Context Management

agent-memory-setup

3891
from openclaw/skills

Set up the full OpenClaw agent memory system with 3-tier memory (HOT/WARM/COLD), daily logs, semantic search (QMD), and lossless context management (Lossless Claw). Use when onboarding a new agent, setting up memory for a fresh OpenClaw instance, or when asked to install the memory system on a new agent. Triggers on "set up memory", "install memory system", "onboard new agent memory", "memory setup", "agent onboarding", "configure agent memory", "add memory to my agent", "how do I set up memory", "initialize memory", "memory system for OpenClaw".

agent-memory-setup-v2

3891
from openclaw/skills

Create a 3-tier memory directory structure (HOT/WARM/COLD) for OpenClaw agents and configure the built-in memory-core plugin to use Google Gemini Embeddings 2 (gemini-embedding-2-preview) for semantic memory search. Creates memory/ directories and stub files only — no code execution or external API calls from the setup script. After setup, the agent's memory_search tool uses Gemini's cloud embedding API to index memory files. Requires a free Google Gemini API key. Use when setting up a new agent's memory system or asked about semantic memory search. Triggers on "set up memory", "memory setup", "agent memory", "gemini memory", "semantic search memory", "onboard new agent".

feishu-memory-recall

3891
from openclaw/skills

Cross-group memory, search, and event sharing for OpenClaw Feishu agents

Cortex — Graph Memory Skill

3891
from openclaw/skills

You have access to **Cortex**, a self-organizing knowledge graph for persistent memory. Use it to remember facts, decisions, goals, patterns, and observations across sessions. Knowledge is stored as nodes in a graph that auto-links, decays stale information, detects contradictions, and computes trust from topology.

openclaw-memory

3891
from openclaw/skills

No description provided.

maasv Memory

3891
from openclaw/skills

Structured long-term memory for OpenClaw agents, powered by [maasv](https://github.com/ascottbell/maasv).

QMD Memory Skill for OpenClaw

3891
from openclaw/skills

## Local Hybrid Search — Save $50-300/month in API Costs