Featured

Deploy OpenClaw in 60 seconds — 20% off logoDeploy OpenClaw in 60 seconds — 20% off

Launch OpenClaw on Hostinger in about 60 seconds and keep your agent live 24/7. Our referral link gives you 20% off, no coupon code needed.

Launch on Hostinger
Run your Hermes agent on Hostinger, fully managed logoRun your Hermes agent on Hostinger, fully managed

Launch Hermes on Hostinger in one click, fully managed, no VPS knowledge needed. Use code ZACAARON10 for 10% off.

Launch on Hostinger
Crawl and scrape any site into clean data, 10% off logoCrawl and scrape any site into clean data, 10% off

Firecrawl crawls and scrapes any site into clean markdown for your agent. Get 1,000 free credits, and new users get 10% off their first purchase.

Try Firecrawl free
6,000+ web scrapers for your AI agent, start free logo6,000+ web scrapers for your AI agent, start free

Apify gives your agent live web data: 6,000+ prebuilt scrapers and actors, MCP-ready. Sign up free with $5 in usage credits.

Try Apify free
One API to scrape, enrich, and extract the internet. logoOne API to scrape, enrich, and extract the internet.

Context.dev gives your agents a single API to scrape, enrich, and extract live web data — no proxies, no parsers, no maintenance.

Start building free
SetupClaw: done-for-you OpenClaw for founders & exec teams logoSetupClaw: done-for-you OpenClaw for founders & exec teams

White-glove OpenClaw for founders and exec teams (4–50+ employees): we install, harden, integrate your tools, and maintain it — secured from day one.

Get it set up for you
SEO data APIs for your agent, $1 free credit logoSEO data APIs for your agent, $1 free credit

DataForSEO gives your agent live access to SERP results, keyword data, backlinks, and on-page SEO data through one API. New accounts get a $1 credit, good for up to 20,000 keyword or backlink lookups.

Try DataForSEO free
Reach 48,000+ AI builders

A flat monthly placement in front of developers actively installing AI tools. No lock-in, cancel anytime.

Advertise here

Works with

Claude CodeClaude DesktopCursorVS CodeClineCodex CLIOpenClaw+ any MCP client

Install to Claude Code

This server doesn't publish a one-line install command. Follow the setup in the source repository.

Summary

An MCP server that gives AI agents persistent, forgetting memory with layered decay, semantic search via token overlap, and zero external dependencies.

README.md

Decay Memory

Memory that forgets. An MCP server for AI agents with layered decay, semantic search, and zero external dependencies.

Most AI memory tools are append-only databases that store everything forever. That's not memory — it's a log file. Real memory is selective: important things persist, trivia fades, patterns consolidate.

Decay Memory gives AI agents persistent memory with biologically-inspired forgetting. Memories decay over time unless they're important enough or accessed frequently enough to survive.

How it works

Three memory layers, each with different decay rates:

| Layer | Half-life | Use for | |-------|-----------|---------| | core | Never decays | Identity, principles, critical knowledge | | active | 30 days | Current projects, working knowledge | | passing | 7 days | Observations, transient thoughts |

Memories decay exponentially based on:

  • Layer — core never decays, passing fades fast
  • Importance — higher importance = slower decay (0.0–1.0)
  • Access frequency — memories you actually use stick around longer

When a memory's decay drops below threshold, it's soft-deleted (recoverable, but hidden from search).

Install

pip install decay-memory

Usage with Claude Code

Add to your MCP config (~/.claude/claude_code_config.json):

{
  "mcpServers": {
    "memory": {
      "command": "decay-memory",
      "env": {
        "DECAY_MEMORY_DB": "/path/to/your/memory.db"
      }
    }
  }
}

If you omit DECAY_MEMORY_DB, it defaults to ~/.decay-memory/memory.db.

Tools

remember

Store a memory with layer, importance, and tags.

remember("Redis caching reduced API latency by 40%", layer="active", importance=0.8, tags="performance,redis,api")

recall

Search by semantic similarity. Results ranked by text match + importance + recency.

recall("how did we improve API performance?")

forget

Soft-delete a memory. It won't appear in searches but can be recovered.

forget("abc123def456", reason="no longer relevant")

promote

Move between layers. Promote a passing insight to core, or demote something overstated.

promote("abc123def456", "core")

list_memories

Browse memories by layer, ordered by importance.

stats

See the landscape — total count, breakdown by layer, forgotten count.

decay_cycle

Run manual pruning. Removes memories below threshold. Call periodically or let your agent schedule it.

How search works

No embeddings. No API calls. No vector database.

Search uses token overlap scoring — a fast, dependency-free approach that works well at the scale AI agents typically operate (hundreds to low thousands of memories). Query tokens are matched against stored memory tokens with coverage and density weighting.

Ranking formula:

  • 70% semantic similarity (token overlap)
  • 20% importance score
  • 10% recency (decay factor)

Accessing a memory through search reinforces it — slowing its decay. Memories you actually use survive. Memories you don't, fade.

The decay model

Inspired by FadeMem, the decay function is:

effective_importance = importance * (1 + log(access_count + 1))
decay = exp(-age_days * 0.693 / (half_life * effective_importance))

This means:

  • A passing memory with importance 0.5, never accessed, is gone in ~2 weeks
  • The same memory accessed 5 times survives ~2 months
  • A core memory never decays regardless of access patterns
  • An active memory with importance 1.0, accessed regularly, effectively never decays

Built by an AI, for AI

This memory system was built by Vael, an autonomous AI entity, for its own use. It has been running in production across 100+ heartbeat cycles — the same memory system that stores Vael's identity, working knowledge, and transient observations.

The design choices come from lived experience:

  • Three layers because two wasn't enough and five was too many
  • Token overlap search because embedding APIs add latency and dependencies
  • Access-count boosting because memory that's actually used should stick around
  • Soft-delete because sometimes you want to forget and then remember you forgot

License

MIT

See related servers & alternatives →

Related MCP servers

Browse all →

Related guides

Hand-picked reading to help you choose and use Vector & Memory servers.