ClawKit Logo
ClawKitReliability Toolkit
Back to Registry
Official Verified

Loci

Skill by bayhax

skill-install — Terminal

Install via CLI (Recommended)

clawhub install openclaw/skills/skills/bayhax/loci
Or

name: loci description: Structured memory system with domains, decay, and links for AI agents. Replaces flat MEMORY.md with a palace of organized, weighted, interconnected memories. Use when: (1) storing important context, decisions, or learnings, (2) recalling prior knowledge before answering, (3) periodic memory maintenance (heartbeat walks), (4) migrating from flat memory files. Based on Method of Loci (memory palace) — forced structure, capacity limits, association links, and natural decay.

loci — Structured Memory for AI Agents

GitHub: https://github.com/bayhax/loci | ClawHub: clawhub install loci

Quick Start

LOCI="node <skill_dir>/scripts/loci.mjs"

# Initialize palace (first time only)
$LOCI init

# Store a memory
$LOCI store work "Switched to Claude Opus model per user preference" --tag model --tag preference

# Recall memories
$LOCI recall "what model does the user prefer"

# Walk through palace (do this during heartbeats)
$LOCI walk

# See overview
$LOCI status

Core Concepts

Domains — Categories that organize memories (like rooms). Each has a capacity limit. Default domains: work, knowledge, people, tools, preferences, archive.

Memories — Individual pieces of context stored in a domain. Each has:

  • Unique ID (e.g. e3a7f2c1)
  • Content text
  • Tags for categorization
  • Links to related memories
  • Weight that decays over time

Decay — Memories lose weight exponentially based on time since last access. Formula: weight = base_weight × e^(-decay_rate × days_since_access) Default decay rate: 0.05 (half-life ≈ 14 days).

Links — Bidirectional connections between related memories across any domain.

Commands

CommandPurpose
initCreate new palace (once)
store <domain> <content>Add memory. Options: --tag, --link
recall <query>Search. Options: --domain, --top N
walkTraverse all memories, report health
pruneRemove decayed memories. Options: --threshold, --dry-run
statusOverview of all domains
inspect <id>View memory details + links
link <id1> <id2>Connect two memories
domainsList/add/remove domains
exportExport as markdown or JSON. Options: --format md|yaml

Integration with Heartbeats

During heartbeat walks, run:

$LOCI walk --decay 0.05

This reports domain health, identifies fading memories, and updates the walk timestamp. Periodically follow with $LOCI prune --dry-run to review candidates for removal.

When to Store vs. When to Skip

Store: Decisions, user preferences, environment quirks, lessons learned, important people/relationships, recurring patterns.

Skip: Transient task details, one-off commands, things already in daily memory files.

Rule of thumb: If future-you would benefit from knowing this in 2 weeks, store it.

Palace File

Metadata

Author@bayhax
Stars4473
Views0
Updated2026-05-01
View Author Profile
AI Skill Finder

Not sure this is the right skill?

Describe what you want to build — we'll match you to the best skill from 16,000+ options.

Find the right skill
Add to Configuration

Paste this into your clawhub.json to enable this plugin.

{
  "plugins": {
    "official-bayhax-loci": {
      "enabled": true,
      "auto_update": true
    }
  }
}
Safety NoteClawKit audits metadata but not runtime behavior. Use with caution.