memory

Two-layer memory system with grep-based recall.

37,131 stars

Best use case

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

Two-layer memory system with grep-based recall.

Teams using memory 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/SKILL.md --create-dirs "https://raw.githubusercontent.com/HKUDS/nanobot/main/nanobot/skills/memory/SKILL.md"

Manual Installation

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

How memory Compares

Feature / AgentmemoryStandard Approach
Platform SupportNot specifiedLimited / Varies
Context Awareness High Baseline
Installation ComplexityUnknownN/A

Frequently Asked Questions

What does this skill do?

Two-layer memory system with grep-based recall.

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

## Structure

- `memory/MEMORY.md` — Long-term facts (preferences, project context, relationships). Always loaded into your context.
- `memory/HISTORY.md` — Append-only event log. NOT loaded into context. Search it with grep-style tools or in-memory filters. Each entry starts with [YYYY-MM-DD HH:MM].

## Search Past Events

Choose the search method based on file size:

- Small `memory/HISTORY.md`: use `read_file`, then search in-memory
- Large or long-lived `memory/HISTORY.md`: use the `exec` tool for targeted search

Examples:
- **Linux/macOS:** `grep -i "keyword" memory/HISTORY.md`
- **Windows:** `findstr /i "keyword" memory\HISTORY.md`
- **Cross-platform Python:** `python -c "from pathlib import Path; text = Path('memory/HISTORY.md').read_text(encoding='utf-8'); print('\n'.join([l for l in text.splitlines() if 'keyword' in l.lower()][-20:]))"`

Prefer targeted command-line search for large history files.

## When to Update MEMORY.md

Write important facts immediately using `edit_file` or `write_file`:
- User preferences ("I prefer dark mode")
- Project context ("The API uses OAuth2")
- Relationships ("Alice is the project lead")

## Auto-consolidation

Old conversations are automatically summarized and appended to HISTORY.md when the session grows large. Long-term facts are extracted to MEMORY.md. You don't need to manage this.

Related Skills

weather

37131
from HKUDS/nanobot

Get current weather and forecasts (no API key required).

tmux

37131
from HKUDS/nanobot

Remote-control tmux sessions for interactive CLIs by sending keystrokes and scraping pane output.

summarize

37131
from HKUDS/nanobot

Summarize or extract text/transcripts from URLs, podcasts, and local files (great fallback for “transcribe this YouTube/video”).

skill-creator

37131
from HKUDS/nanobot

Create or update AgentSkills. Use when designing, structuring, or packaging skills with scripts, references, and assets.

github

37131
from HKUDS/nanobot

Interact with GitHub using the `gh` CLI. Use `gh issue`, `gh pr`, `gh run`, and `gh api` for issues, PRs, CI runs, and advanced queries.

cron

37131
from HKUDS/nanobot

Schedule reminders and recurring tasks.

clawhub

37114
from HKUDS/nanobot

Search and install agent skills from ClawHub, the public skill registry.

conversation-memory

31392
from sickn33/antigravity-awesome-skills

Persistent memory systems for LLM conversations including short-term, long-term, and entity-based memory

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