loci for Openclaw

A structured memory system for AI agents that organizes context into domains using weight-based decay and bidirectional links.

bayhax
v1.1.1
Mar 7, 2026
0
1k
0

Install & Download

1. ClawHub CLI

The fastest way to install a skill directly from the registry.

npx clawhub@latest install loci

2. Manual Installation

Copy the skill folder to one of these locations

Global
~/.openclaw/skills/
Workspace
<project>/skills/

Priority: Workspace > Local > Bundled

3. Prompt Installation

Copy this prompt to OpenClaw to install it automatically.

Help me install loci using Clawhub. If Clawhub is not installed, install it first (npm i -g clawhub).

Prefer to download?

Get the raw skill files in a ZIP archive.

What is loci?

loci is a sophisticated memory management framework designed to replace flat, unmanageable memory files with a structured palace of interconnected context. By utilizing the Method of Loci, this skill allows AI agents to categorize information into specific domains such as work, preferences, and knowledge.

Unlike traditional storage, loci implements an exponential decay algorithm where memories lose weight over time if they are not accessed. This ensures that Openclaw Skills remains efficient, prioritizing high-value context while naturally pruning irrelevant data to mimic human-like cognitive focus.

loci Use Cases

  • Storing critical project decisions and user-specific preferences across sessions.
  • Recalling historical context and prior learnings before responding to complex prompts.
  • Migrating existing unstructured MEMORY.md files into a high-performance JSON-based palace.
  • Maintaining system health through periodic heartbeat walks and automated memory pruning.

How loci Works

  1. Initialize the memory palace to create the underlying JSON structure and default domains.
  2. Store new context into specific domains while assigning tags and bidirectional links to related memories.
  3. Search the palace using the recall command to retrieve the most relevant, high-weight context for a task.
  4. Perform periodic walks to traverse the memory palace and assess the health and weight of stored data.
  5. Prune the system to remove memories that have decayed below a specific weight threshold.

loci Setup

To get started with loci in your Openclaw Skills environment, install the package and initialize your local palace storage.

# Install the skill
clawhub install loci

# Set up the alias for easier access
LOCI="node <skill_dir>/scripts/loci.mjs"

# Initialize the palace structure
$LOCI init

loci Data Schema & Taxonomy

The skill manages data within a central loci_palace.json file. Each memory is stored with metadata to support decay and relational mapping:

Field Description
Domain Logical containers (e.g., work, preferences, tools) with capacity limits.
Memory ID A unique hexadecimal identifier for precise retrieval and linking.
Weight A numerical value that decays based on the formula base_weight * e^(-decay_rate * days).
Links An array of IDs representing bidirectional connections between related memories.
Tags Metadata labels for improved search filtering and categorization.

loci Advanced Features

  • Configurable exponential decay rates to control how quickly context is forgotten.
  • Bidirectional memory linking to create a complex graph of associated knowledge.
  • Heartbeat integration for automated memory maintenance during idle agent cycles.
  • Multi-format export options including Markdown and YAML for interoperability with other tools.
  • Domain-specific capacity management to prevent context bloat and ensure high-density information storage.

SKILL.md


Loading

Related Openclaw Skills

METADATA

Github Stars: 0
forks: 0

Featured*