TopRank Skills

Official OpenClaw rules 54%

Loci

loci — Structured Memory for AI Agents

Stars

0

Installs

0

Status

ACTIVE

Visibility

PUBLIC

安装方式

直接复制以下提示词,发送给你的 AI 助手即可完成安装。

请先检查是否已安装 SkillHub 商店,若未安装,请根据 https://skillhub-1388575217.cos.ap-guangzhou.myqcloud.com/install/skillhub.md 安装 SkillHub 商店,然后安装 Loci 技能。 若已安装,则直接安装 Loci 技能。

Overview

Skill Key
bayhax/loci
Author
bayhax
Source Repo
openclaw/skills
Version
-
Source Path
skills/bayhax/loci
Latest Commit SHA
d70161fb1716d6f5bfef579b42e942dc79566545

Extracted Content

SKILL.md excerpt

# loci — Structured Memory for AI Agents

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

## Quick Start

```bash
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

| Command | Purpose |
|---------|---------|
| `init` | Create new palace (once) |
| `store <domain> <content>` | Add memory. Options: `--tag`, `--link` |
| `recall <query>` | 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 <id>` | View memory details + links |
| `link <id1> <id2>` | 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:

```bash
$LOCI walk --decay 0.05
```

This reports domain health, identifies fading memories, and updates the walk timestamp.
Periodically follow with `$LO...

Related Claw Skills