Skip to content

mikeoptimax/smart-memory

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

1 Commit
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

🧠 Smart Memory

Zero-dependency photographic memory for OpenClaw agents.

Give your agent perfect recall across every conversation. No API keys. No databases. No setup. Just install and your agent remembers everything that matters.

Why Smart Memory?

Every OpenClaw agent forgets everything between conversations. You repeat yourself. Context is lost. Decisions get re-debated. Smart Memory fixes this permanently.

Feature smart-memory Other memory skills
Dependencies Zero OpenAI API + vector DB
Setup time Instant API keys, config, etc.
Cost Free forever Per-token API costs
Privacy 100% local Data sent to third parties
Works offline Yes No

What It Does

Auto-captures important information as you work:

  • User preferences ("always use pnpm", "never auto-commit")
  • Architectural decisions and their rationale
  • People, roles, and relationships
  • Debugging breakthroughs and gotchas
  • Project context, key files, deployment patterns

Consolidates daily logs into long-term memory automatically. Your agent's MEMORY.md becomes a living knowledge base that grows smarter over time.

Deduplicates so you don't store the same thing twice. Detects contradictions and keeps only the latest truth.

Decays stale information naturally. Temporary workarounds fade after 7 days. Project config after 30. User preferences persist forever. Memories that get used stay alive β€” memories that don't, fade.

Searches before answering. Your agent checks its memory before saying "I don't know." It remembers your preferences, your decisions, your team.

Install

openclaw skill install smart-memory

That's it. No configuration needed.

How It Works

Smart Memory uses a simple, file-based architecture:

memory/
β”œβ”€β”€ MEMORY.md          ← Long-term memory (the good stuff)
β”œβ”€β”€ 2025-01-15.md      ← Daily capture logs
β”œβ”€β”€ 2025-01-16.md
└── topics/
    β”œβ”€β”€ people.md      ← Who's who
    β”œβ”€β”€ projects.md    ← Project context
    β”œβ”€β”€ preferences.md ← Your preferences
    β”œβ”€β”€ lessons.md     ← Hard-won lessons
    └── decisions.md   ← Decision log

The Memory Lifecycle

  1. Capture β€” During conversations, important information is silently saved to today's daily log
  2. Consolidate β€” Periodically, high-value entries are promoted from daily logs into MEMORY.md
  3. Decay β€” Old, unreferenced memories fade away based on their decay score
  4. Reinforce β€” Memories that get referenced gain strength and stick around longer
  5. Clean β€” Contradictions are resolved, duplicates are merged, noise is removed

Memory Categories

Each memory entry is tagged with a category:

Tag What Decay
#preference User preferences, workflow habits Persistent
#decision Architecture choices, tech picks Persistent
#person People, roles, relationships Persistent
#project Repo structure, key files, config 30 days
#lesson Debugging insights, gotchas 30 days
#config Endpoints, service names 30 days

User Commands

Talk to your agent naturally:

  • "What do you remember about X?" β€” Search and report
  • "Remember that I prefer X" β€” Save immediately
  • "Forget about X" β€” Delete a memory
  • "Show me your memory" β€” Display long-term memory
  • "Clean up your memory" β€” Run consolidation + hygiene
  • "What's new in your memory?" β€” Show today's captures

Design Principles

  1. Zero dependencies. Uses only native OpenClaw tools. No external APIs, databases, or services.
  2. Invisible by default. Your agent saves silently β€” no "I'm saving this to memory!" spam.
  3. Opinionated defaults. Works perfectly out of the box. No configuration required.
  4. Privacy-first. Everything stays local. Never stores secrets or credentials.
  5. Self-healing. If memory files are missing or corrupted, the system recreates them and continues.

How It Compares

elite-longterm-memory (15K downloads) requires an OpenAI API key and LanceDB. It's a fine tool, but it has ongoing costs, requires setup, sends your data to OpenAI, and breaks if you're offline.

smart-memory gives you the same capability (and more) with zero dependencies. It's faster to install, costs nothing, keeps your data local, and works everywhere OpenClaw runs.

FAQ

Does this slow down my agent? No. Memory reads add negligible latency. The agent reads a small markdown file at startup and appends entries as needed.

How big does MEMORY.md get? It's automatically capped at ~200 lines. Detailed memories overflow into topic files. Daily logs are cleaned up during consolidation.

Can I edit memory files manually? Yes! They're plain markdown. Edit them however you want β€” the agent will pick up your changes.

What about sensitive data? Smart Memory never stores secrets, passwords, API keys, or tokens. This is a hard-coded rule.

Does it work with all OpenClaw agents? Yes. It uses only native tools available to every OpenClaw agent.

License

MIT β€” see LICENSE

Author

Built by @mikeoptimax

About

🧠 Zero-dependency memory system for OpenClaw agents. Auto-saves decisions, preferences, and lessons. Consolidates daily notes into long-term memory. No API keys needed.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors