← 返回
未分类 中文

Z1 Memory Palace v3.0

File-based long-term AI memory system with BGE-M3 vector search, metadata filtering, compound scoring, graph-based neighbor expansion, and automated memory m...
基于文件的长期AI记忆系统,支持BGE-M3向量搜索、元数据过滤、复合评分、图邻域扩展以及自动化记忆管理。
z1one0415 z1one0415 来源
未分类 clawhub v3.0.0 1 版本 100000 Key: 无需
★ 0
Stars
📥 297
下载
💾 0
安装
1
版本
#latest

概述

Memory Palace

A file-based long-term memory system for AI agents, designed to be zero-infrastructure (no Docker, no external services).

Architecture

palace/
├── grand_hall/          # Global navigation, room map, logs
├── chambers/            # Agent-specific knowledge (one per agent)
├── project_rooms/       # Long-running project storage
├── reflection_wing/     # Compiled insights: principles, kernels, patterns
├── dispatch_corridor/   # Task routing and status tracking
├── conflict_room/       # Conflict resolution records
└── archive_basement/    # Cold storage (excluded from default search)

Quick Start

# 1. Initialize palace structure
mkdir -p palace/{grand_hall,chambers,project_rooms,reflection_wing,dispatch_corridor,conflict_room,archive_basement}

# 2. Install BGE-m3
pip install FlagEmbedding

# 3. Build index
python3 scripts/build_index_bge.py --force

# 4. Query
python3 scripts/query_bge.py "your search query"
python3 scripts/query_bge.py --type palace --priority high "query"
python3 scripts/query_bge.py --details "query"   # show sub-scores
python3 scripts/query_bge.py --raw "query"       # pure cosine (v2 compatibility)

Search Scoring

Compound score = 0.5 × Semantic + 0.25 × Recency + 0.25 × Importance

  • Semantic: BGE-m3 cosine similarity (clamped to [0,1])
  • Recency: 30-day half-life decay based on file mtime
  • Importance: priority field mapping (high=1.0, medium=0.6, low=0.3)

Key Scripts

ScriptPurpose
-----------------
build_index_bge.pyBuild BGE-m3 vector index with incremental maintenance
query_bge.pySearch with compound scoring, metadata filter, raw mode
graph_router.pyBuild 1-hop [[links]] neighbor graph
cold_zone_blinding_patch.pyExclude archive_basement from search

Index Manifest Format

Each file in the manifest (watchdog_manifest_v1.jsonl) requires:

{"path": "palace/chambers/01_agent/accumulated_knowledge.md", "type": "palace", "priority": "high"}

Fields: path (required), type (for metadata filtering), priority (for importance scoring).

Memory Metabolism

See references/memory_metabolism.md for the full protocol:

  • 3-tier upgrade path: Project Room → Reflection Wing → Constitution
  • 5 output types: principle card, prompt kernel, failure pattern, thinking path, constitution candidate
  • Reverse elimination rules for low-value content

版本历史

共 1 个版本

  • v3.0.0 当前
    2026-05-08 00:59 安全 安全

安全检测

腾讯云安全 (Keen)

安全,无风险
查看报告

腾讯云安全 (Sanbu)

安全,无风险
查看报告

🔗 相关推荐

ai-agent

Find Skills

guipi888
场景驱动+关键词双模式技能发现工具。当用户用自然语言描述场景/需求(如"我想做一个海报""帮我分析股票"),或明确说"安装技能/find skills/找个skill"时,自动从官方内置、本地已安装、SkillHub、虾评、GitHub、C
★ 1,467 📥 532,780
ai-agent

self-improving agent

pskoett
捕获经验教训、错误及修正内容,以实现持续改进。适用于以下场景:(1)命令或操作意外失败;(2)用户纠正Claude(如“不,那不对……”“实际上……”);(3)用户请求的功能不存在;(4)外部API或工具出现故障;(5)Claude发现自身
★ 4,102 📥 829,204
data-analysis

Evidence Cleaner

z1one0415
LLM通用证据清洗技能。将原始搜索结果、网页片段、OCR残片等材料清洗为可用证据,去除脏输入、伪实体、重复片段和错误领域材料,防止对后续判断的污染。用于搜索结果返回后、进入freshness判定或叙事生成前。触发条件:搜索结果质量差、证据量
★ 0 📥 449