loci
/install loci
loci — Structured Memory for AI Agents
GitHub: https://github.com/bayhax/loci | ClawHub: clawhub install loci
Quick Start
LOCI="node \x3Cskill_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
| Command | Purpose |
|---|---|
init |
Create new palace (once) |
store \x3Cdomain> \x3Ccontent> |
Add memory. Options: --tag, --link |
recall \x3Cquery> |
Search. Options: --domain, --top N |
walk |
Traverse all memories, report health |
prune |
Remove decayed memories. Options: --threshold, --dry-run |
status |
Overview of all domains |
inspect \x3Cid> |
View memory details + links |
link \x3Cid1> \x3Cid2> |
Connect two memories |
domains |
List/add/remove domains |
export |
Export 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
Default location: ~/.openclaw/workspace/loci_palace.json
Override with --palace PATH on any command.
Format: JSON. Zero external dependencies — only requires Node.js (ships with OpenClaw).
- Make sure OpenClaw is installed (local or Docker)
- Run the install command in chat:
/install loci - After installation, invoke the skill by name or use
/loci - Provide required inputs per the skill's parameter spec and get structured output
What is loci?
Structured memory system using domains, decay, and links to store, recall, and maintain important AI context as an organized memory palace. It is an AI Agent Skill for Claude Code / OpenClaw, with 321 downloads so far.
How do I install loci?
Run "/install loci" in the OpenClaw or Claude Code chat to install it in one step — no extra setup required.
Is loci free?
Yes, loci is completely free (open-source). You can download, install and use it at no cost.
Which platforms does loci support?
loci is cross-platform and runs anywhere OpenClaw / Claude Code is available (cross-platform).
Who created loci?
It is built and maintained by bayhax.max (@bayhax); the current version is v1.1.1.