← 返回
开发者工具 中文

loci

Structured memory system using domains, decay, and links to store, recall, and maintain important AI context as an organized memory palace.
结构化记忆系统,通过域划分、衰减机制和关联链接,将重要AI上下文以有序记忆宫殿的形式进行存储、检索与维护。
bayhax
开发者工具 clawhub v1.1.1 1 版本 100000 Key: 无需
★ 0
Stars
📥 649
下载
💾 13
安装
1
版本
#latest

概述

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 Add memory. Options: --tag, --link
recall Search. Options: --domain, --top N
walkTraverse all memories, report health
pruneRemove decayed memories. Options: --threshold, --dry-run
statusOverview of all domains
inspect View memory details + links
link 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

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).

版本历史

共 1 个版本

  • v1.1.1 当前
    2026-03-30 16:28 安全 安全

安全检测

腾讯云安全 (Keen)

安全,无风险
查看报告

腾讯云安全 (Sanbu)

安全,无风险
查看报告

🔗 相关推荐

developer-tools

CodeConductor.ai

larsonreever
AI驱动平台,提供快速全栈开发、智能体、工作流自动化及低代码AI集成的可扩展产品创建。
★ 68 📥 180,468
developer-tools

Github

steipete
使用 `gh` CLI 与 GitHub 交互,通过 `gh issue`、`gh pr`、`gh run` 和 `gh api` 管理议题、PR、CI 运行及高级查询。
★ 672 📥 324,519
developer-tools

Agent Browser

matrixy
专为AI智能体优化的无头浏览器自动化CLI,支持无障碍树快照和基于引用的元素选择。
★ 427 📥 118,383