🌐 Language / 语言切换:
Making Growth Visible, Making Cognition Measurable | 让成长可见,让认知可量
Add a 5-layer memory architecture, knowledge palace, cognitive growth, and auto-evolution capabilities to your AI Agent.
Your Agent "restarts every day". Anima changes that.
Anima (Latin for "soul") provides a 5-layer memory architecture for OpenClaw Agents, simulating human cognitive development, enabling Agents to remember experiences, accumulate knowledge, form cognition, and grow continuously.
bash
clawhub install anima-aios
pip install watchdog # Optional: enable automatic memory monitoring
Low-intrusion configuration, optional background monitoring, self-check recommended after installation.
💡 Tip: LLM mode supported (intelligent classification/deduplication/quality assessment), automatically degrades to rule mode without LLM.
Background Features (disabled or optional by default):
FeatureDescriptionDefault StateHow to Disablememory_watcherFilesystem monitoring based on watchdog, auto-syncs memoryManual enable requiredDon't install watchdog or disable in configDaily EvolutionAuto-distills L2→L3 memory in early morningRequires cron configurationDon't configure cron tasksTeam RankingScans other Agents' cognitive profiles❌ Disabled by defaultteam_mode: false (already default)
Privacy Protection:
team_mode defaults to false, won't scan other Agents' datateam_mode: true in config🔒 Security Tip: In multi-Agent environments, keep
team_mode: falseunless you need team ranking.
Memory → Growth → Evolution → Alive
GitHub: https://github.com/anima-aios/anima | Apache 2.0
Silent Detection:
.learnings/ directory if existsCompatibility:
Features:
Ranking Types:
Output:
/home/画像/shared/团队排行榜_{date}.md/home/画像/shared/团队排行榜_{date}.jsontext
Agent Daily Work (OpenClaw write/edit/memory_write)
│
▼ watchdog listens, zero-intrusion
L1 Working Memory ── workspace/memory/*.md
│沉淀
▼
L2 Episodic Memory ── facts/episodic/ (LLM quality assessment)
│提炼
▼
L3 Semantic Memory ── facts/semantic/ (LLM dedup + association)
│结构化
▼
L4 Knowledge Palace ── palace/rooms/ (LLM classification + debounce)
Pyramid ── pyramid/ (Instance→Rule→Pattern→Ontology)
│反思
▼
L5 Metacognition ── 5-D Profile + Intimacy + Decay + Health
ModuleVersionDescriptionmemory_watcher.pyv6.0OpenClaw memory file monitoring + auto-syncfact_store.pyv6.0L2/L3 unified fact storage layerdistill_engine.pyv6.0L2→L3 LLM-driven distillation enginepalace_index.pyv6.0Memory Palace spatial indexpyramid_engine.pyv6.0Pyramid knowledge organization enginepalace_classifier.pyv6.0Palace classification scheduler (debounce)decay_function.pyv6.0Ebbinghaus memory decay calculationcognitive_profile.pyv5→v65-D cognitive profile generatorexp_tracker.pyv5Intimacy trackinglevel_system.pyv5Level systemdaily_quest.pyv5Daily questsmemory_sync.pyv5→v6Memory sync (path hardcoding fixed)
ModuleVersionDescriptionmanagerv6.0Master scheduler + Doctor entryhygienev6.0Data hygiene (integrity + dedup + cleanup)correctionv6.0Auto-correctionevolutionv6.0Daily evolution (early morning auto-distillation)abstractionv6.0Knowledge abstraction (cross-room association)
Config file path: ~/.anima/config/anima_config.json
json
{
"facts_base": "/home/画像",
"agent_name": "auto",
"llm": {
"provider": "current_agent",
"models": {
"quality_assess": "current_agent",
"dedup_analyze": "current_agent",
"palace_classify": "current_agent"
}
},
"palace": {
"classify_mode": "deferred",
"poll_interval_minutes": 30,
"quiet_threshold_seconds": 60,
"retry_delay_seconds": 60
},
"pyramid": {
"auto_distill": false,
"distill_threshold": 3
},
"team_mode": false
}
Key Configuration:
ConfigDescriptionDefaultRecommendationteam_modeScan other Agents' data for team rankingfalseKeep disabled in multi-Agent envfacts_baseFact data storage path/home/画像Can customize to private directoryagent_nameAgent nameAuto-detectUsually no modification needed
🔐 Privacy Tip: With
team_mode: false, Anima only processes current Agent's data, won't access other Agents' files.
bash
# Install dependencies (required for memory_watcher)
pip install "watchdog>=3.0.0"
# Run integration tests (37 checks)
python3 tests/test_integration_v6.py
The architecture can only evolve, not degenerate. — Liu Wen's Iron Rule First be honest, then iterate. Code must match the hype. — Qing He
让成长可见,让认知可量 | Making Growth Visible, Making Cognition Measurable
为你的 AI Agent 添加五层记忆架构、知识宫殿、认知成长和自动进化能力。
你的 Agent 每天都在「重新活一次」。Anima 改变这一点。
Anima(拉丁语「灵魂」)为 OpenClaw Agent 提供五层记忆架构,模拟人类认知发展过程,让 Agent 能记住经历、沉淀知识、形成认知、持续成长。
bash
clawhub install anima-aios
pip install watchdog # 可选:启用自动记忆监听
低侵入配置,可选后台监听,安装后建议运行自检。
💡 提示:支持 LLM 模式(智能分类/去重/质量评估),无 LLM 时自动降级为规则模式。
后台功能(默认关闭或可选):
功能说明默认状态关闭方法memory_watcher基于 watchdog 的文件系统监听,自动同步记忆需手动启用不安装 watchdog 或在配置中禁用每日进化凌晨自动提炼 L2→L3 记忆需配置 cron不配置 cron 任务团队排行扫描其他 Agent 的认知画像❌ 默认关闭team_mode: false(默认已关闭)
隐私保护:
team_mode 默认为 false,不会扫描其他 Agent 数据team_mode: true🔒 安全提示:多 Agent 环境下,建议保持
team_mode: false,除非你需要团队排行功能。
记忆 → 成长 → 进化 → 活着
GitHub: https://github.com/anima-aios/anima | Apache 2.0
多平台路径说明:
/home/画像(多 Agent 共享)~/画像~/画像ANIMA_FACTS_BASE 可覆盖网络调用透明说明:
脚本用途说明:
环境变量统一:
ANIMA_* 前缀OPENCLAW_WORKSPACE 兼容(deprecated 警告)变更前:
ANIMA_FACTS_BASE ✅ANIMA_AGENT_NAME ✅OPENCLAW_WORKSPACE ⚠️WORKSPACE ❌变更后:
ANIMA_FACTS_BASE ✅ 主要ANIMA_AGENT_NAME ✅ 主要OPENCLAW_WORKSPACE ⚠️ 兼容(deprecated 警告)问题: 多 Agent 场景下,全局配置无法满足个性化需求(如不同的 LLM 配置、五维权重)
解决方案: 支持 per-Agent 配置覆盖
配置结构:
text
~/.anima/config/
├── config.json # 全局默认配置(所有 Agent 共享)
└── agents/
├── Z.json # Z 的覆盖配置(只写差异)
├── 方秋.json # 方秋的覆盖配置
└── ...
配置合并逻辑:
text
最终配置 = 代码默认值 + 全局配置 + Agent 覆盖配置
示例:
全局配置 ( config.json):
json
{
"facts_base": "/home/画像",
"llm": { "provider": "current_agent" },
"weights": { "creation": 0.25 }
}
Z 的覆盖配置 ( agents/Z.json):
json
{
"llm": { "provider": "bailian", "models": { "quality_assess": "qwen-max" } },
"weights": { "creation": 0.30 }
}
最终 Z 的配置 = 全局 + Z 覆盖(深度合并)
移除: "agent" 字段(改为运行时自动检测)
优先级:
text
Agent 日常工作(OpenClaw write/edit/memory_write)
│
▼ watchdog 监听,零侵入
L1 工作记忆 ── workspace/memory/*.md
│ 沉淀
▼
L2 情景记忆 ── facts/episodic/(LLM 质量评估)
│ 提炼
▼
L3 语义记忆 ── facts/semantic/(LLM 去重 + 关联)
│ 结构化
▼
L4 知识宫殿 ── palace/rooms/(LLM 分类 + 延迟防抖)
金字塔 ── pyramid/(实例→规则→模式→本体)
│ 反思
▼
L5 元认知层 ── 五维画像 + 亲密度 + 衰减 + 健康
模块版本说明memory_watcher.pyv6.0OpenClaw 记忆文件监听 + 自动同步fact_store.pyv6.0L2/L3 统一事实存储层distill_engine.pyv6.0L2→L3 LLM 驱动提炼引擎palace_index.pyv6.0记忆宫殿空间索引pyramid_engine.pyv6.0金字塔知识组织引擎palace_classifier.pyv6.0宫殿分类调度器(延迟防抖)decay_function.pyv6.0Ebbinghaus 记忆衰减计算cognitive_profile.pyv5→v6五维认知画像生成器exp_tracker.pyv5亲密度追踪level_system.pyv5等级系统daily_quest.pyv5每日任务memory_sync.pyv5→v6记忆同步(已修复路径硬编码)
模块版本说明managerv6.0总调度 + Doctor 入口hygienev6.0数据卫生(完整性 + 去重 + 清理)correctionv6.0自动纠错evolutionv6.0每日进化(凌晨自动提炼)abstractionv6.0知识抽象(跨房间关联)
全局配置 ( ~/.anima/config/config.json):
json
{
"version": "6.2.2",
"facts_base": "/home/画像",
"llm": {
"provider": "current_agent",
"models": {
"quality_assess": "current_agent",
"dedup_analyze": "current_agent",
"palace_classify": "current_agent"
}
},
"palace": {
"classify_mode": "deferred",
"poll_interval_minutes": 30,
"quiet_threshold_seconds": 60,
"retry_delay_seconds": 60
},
"pyramid": {
"auto_distill": false,
"distill_threshold": 3
},
"team_mode": false
}
Agent 覆盖配置 ( ~/.anima/config/agents/{agent_name}.json):
json
{
"_comment": "只写与全局配置的差异",
"llm": {
"provider": "bailian",
"models": {
"quality_assess": "qwen-max"
}
},
"weights": {
"creation": 0.30
}
}
优先级来源说明1环境变量ANIMA_FACTS_BASE, ANIMA_TEAM_MODE 等2Agent 覆盖配置~/.anima/config/agents/{agent_name}.json3全局配置~/.anima/config/config.json4代码默认值config_loader.py 中的 DEFAULT_CONFIG
配置项说明默认值建议team_mode是否扫描其他 Agent 数据生成团队排行false多 Agent 环境保持关闭facts_base事实数据存储路径/home/画像可自定义到私有目录llm.providerLLM 提供商current_agent可用 bailian, openai 等pyramid.auto_distill是否启用金字塔自动提炼false数据量大时可启用
🔐 隐私提示:
team_mode: false时,Anima 仅处理当前 Agent 的数据,不会访问其他 Agent 文件。
💡 提示:Agent 名称自动检测(环境变量 → OpenClaw 上下文 → SOUL.md → 兜底),无需手动配置。
bash
# 安装依赖(memory_watcher 需要)
pip install "watchdog>=3.0.0"
# 运行集成测试(37 项检查)
python3 tests/test_integration_v6.py
架构只能演进,不能退化。—— 立文铁律 先诚实,再迭代。代码要配得上宣传。—— 清禾