llmem
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseLLMem
LLMem
LLMem is a structured memory system (Go binary). It stores factual memories in SQLite with optional embedding-based semantic search via Ollama (nomic-embed-text). Semantic search uses a sqlite-vec HNSW ANN index for sub-linear retrieval, with automatic fallback to brute-force cosine similarity if the sqlite-vec extension is not available. Memories can be connected via typed relations (, , , , ). A background dreaming/consolidation system (light, deep, REM phases) runs automatically via systemd timer to decay idle memories, boost frequent ones, promote high-value ones, and merge near-duplicates.
related_tosupersedescontradictsdepends_onderived_fromLLMem是一个结构化记忆系统(Go二进制程序)。它将事实记忆存储在SQLite中,可通过Ollama(nomic-embed-text)实现基于嵌入的语义搜索。语义搜索使用sqlite-vec的HNSW ANN索引实现亚线性检索,如果sqlite-vec扩展不可用,会自动回退到暴力余弦相似度计算。记忆可通过类型化关系(、、、、)关联。后台梦境/整合系统(轻度、深度、REM阶段)通过systemd定时器自动运行,用于衰减闲置记忆、增强频繁访问的记忆、提升高价值记忆并合并近似重复的记忆。
related_tosupersedescontradictsdepends_onderived_fromInstallation
安装
- CLI:
~/.local/bin/llmem - Config:
~/.config/llmem/config.yaml - DB:
~/.config/llmem/memory.db - Ollama: (local, for embeddings)
http://localhost:11434
- 命令行工具(CLI):
~/.local/bin/llmem - 配置文件:
~/.config/llmem/config.yaml - 数据库:
~/.config/llmem/memory.db - Ollama: (本地部署,用于生成嵌入向量)
http://localhost:11434
Session Adapter Configuration
会话适配器配置
LLMem uses a session adapter to read conversation transcripts for memory extraction. Set in config.yaml:
session.adapter- (default) — reads from
opencode. Auto-selected if the database exists.~/.local/share/opencode/opencode.db - — reads from
copilot. Auto-selected if only Copilot session data exists. Full transcripts require~/.copilot/session-state/.--share - — no adapter. Context injection still works, but transcript extraction returns
none.no_transcript
yaml
undefinedLLMem使用会话适配器读取对话记录以提取记忆。在config.yaml中设置:
session.adapter- (默认)——读取
opencode。若该数据库存在则自动选择。~/.local/share/opencode/opencode.db - ——读取
copilot。若仅存在Copilot会话数据则自动选择。完整记录需要使用~/.copilot/session-state/参数。--share - ——无适配器。上下文注入仍可工作,但记录提取会返回
none。no_transcript
yaml
undefinedFor Copilot CLI:
针对Copilot CLI的配置:
session:
adapter: copilot
copilot:
state_dir: ~/.copilot/session-state
share_dir: .
`llmem init` auto-detects the adapter type based on which session state directory exists.session:
adapter: copilot
copilot:
state_dir: ~/.copilot/session-state
share_dir: .
`llmem init`会根据存在的会话状态目录自动检测适配器类型。Memory Types
记忆类型
| Type | Use for |
|---|---|
| fact | Objective truths, definitions, state of the world |
| decision | Choices made and their rationale |
| preference | User preferences, style choices |
| event | Things that happened at a point in time |
| project_state | Current status of a project or system |
| procedure | How-to knowledge, step sequences |
| conversation | Notable conversation outcomes or commitments |
| self_assessment | Structured introspective records — error patterns, behavioral corrections, recurring mistakes, proposed procedural updates |
| 类型 | 适用场景 |
|---|---|
| fact | 客观事实、定义、世界状态 |
| decision | 已做出的选择及其理由 |
| preference | 用户偏好、风格选择 |
| event | 特定时间点发生的事件 |
| project_state | 项目或系统的当前状态 |
| procedure | 操作知识、步骤序列 |
| conversation | 重要对话结果或承诺 |
| self_assessment | 结构化自省记录——错误模式、行为修正、重复失误、拟议流程更新 |
Error Taxonomy
错误分类体系
Self-assessment memories are categorized using a standard error taxonomy. Each category identifies a class of mistake that the introspection system tracks for pattern detection:
| Category | Description |
|---|---|
| NULL_SAFETY | Missing null/None/undefined checks before property access or method calls |
| ERROR_HANDLING | Missing try/except, bare except, swallowed errors, unhandled promise rejections |
| OFF_BY_ONE | Boundary errors, wrong loop bounds, fencepost errors |
| RACE_CONDITION | Concurrency issues, async/await problems, missing locks |
| AUTH_BYPASS | Missing auth checks, SSRF, injection vulnerabilities, security oversights |
| DATA_INTEGRITY | Stale derived fields, out-of-sync caches/embeddings/indexes, source-of-truth divergence |
| MISSING_VERIFICATION | Skipped test steps, unverified outputs, assumed-it-works |
| EDGE_CASE | Unhandled empty input, unexpected types, boundary values |
| PERFORMANCE | N+1 queries, unnecessary recomputation, memory leaks |
| DESIGN | Architectural issues, wrong abstraction level, coupling problems |
| REVIEW_PASSED | Clean review with no findings — positive outcome for tracking purposes |
自省记忆采用标准错误分类体系进行归类。每个类别标识自省系统跟踪的一类错误,用于模式检测:
| 类别 | 描述 |
|---|---|
| NULL_SAFETY | 属性访问或方法调用前缺少null/None/undefined检查 |
| ERROR_HANDLING | 缺少try/except、裸except、吞掉错误、未处理Promise拒绝 |
| OFF_BY_ONE | 边界错误、循环边界错误、栅栏柱错误 |
| RACE_CONDITION | 并发问题、async/await问题、缺少锁 |
| AUTH_BYPASS | 缺少权限检查、SSRF、注入漏洞、安全疏漏 |
| DATA_INTEGRITY | 过时派生字段、缓存/嵌入向量/索引不同步、数据源分歧 |
| MISSING_VERIFICATION | 跳过测试步骤、未验证输出、想当然认为可行 |
| EDGE_CASE | 未处理空输入、意外类型、边界值 |
| PERFORMANCE | N+1查询、不必要的重计算、内存泄漏 |
| DESIGN | 架构问题、抽象层级错误、耦合问题 |
| REVIEW_PASSED | 无问题的评审——用于跟踪的积极结果 |
Structured self_assessment Format
结构化self_assessment格式
Self-assessment memories follow a structured format with nine fields:
| Field | Required | Description |
|---|---|---|
| Category | Yes | Taxonomy category from the Error Taxonomy above (e.g. |
| Context | No | Where and when — file, task, session date |
| What_happened | Yes | Behavioral description, not narrative |
| Outcomes | No | What were the results? Did things work on first try or require iterations? |
| What_caught_it | No | How the error was discovered ( |
| Estimates_vs_actual | No | Was the complexity assessment accurate? Did tasks take more or less effort? |
| Recurring | No | |
| Proposed_update | No | Specific procedural directive to prevent recurrence |
| Iteration_count | No | How many attempts before success (integer). 1 = first try, 2 = one retry, etc. |
自省记忆遵循包含9个字段的结构化格式:
| 字段 | 是否必填 | 描述 |
|---|---|---|
| Category | 是 | 来自上述错误分类体系的类别(例如 |
| Context | 否 | 发生地点和时间——文件、任务、会话日期 |
| What_happened | 是 | 行为描述,而非叙事 |
| Outcomes | 否 | 结果如何?首次尝试成功还是需要多次迭代? |
| What_caught_it | 否 | 错误如何被发现( |
| Estimates_vs_actual | 否 | 复杂度评估是否准确?任务耗时比预期多还是少? |
| Recurring | 否 | |
| Proposed_update | 否 | 防止重复发生的具体流程指令 |
| Iteration_count | 否 | 成功前的尝试次数(整数)。1=首次尝试成功,2=重试一次,依此类推 |
Key Commands
核心命令
bash
undefinedbash
undefinedAdd a memory
添加记忆
llmem add --content "content" --type fact
llmem add --content "prefer dark theme" --type preference --confidence 0.9
llmem add --content "内容" --type fact
llmem add --content "偏好深色主题" --type preference --confidence 0.9
Search memories (hybrid RRF fusion by default)
搜索记忆(默认使用混合RRF融合)
llmem search "query"
llmem search "query" --type decision --limit 5
llmem search "query" --fts-only # FTS5 keyword search only (no embedder needed)
llmem search "query" --semantic-only # Semantic (embedding) search only (requires embedder)
llmem search "query" --valid-only # Only show valid (non-expired) memories
llmem search "查询词"
llmem search "查询词" --type decision --limit 5
llmem search "查询词" --fts-only # 仅使用FTS5关键词搜索(无需嵌入向量生成器)
llmem search "查询词" --semantic-only # 仅使用语义(嵌入向量)搜索(需要嵌入向量生成器)
llmem search "查询词" --valid-only # 仅显示有效(未过期)记忆
List all
列出所有记忆
llmem list
llmem list --type fact --limit 20
llmem list --all # Include expired memories
llmem list
llmem list --type fact --limit 20
llmem list --all # 包含过期记忆
Get specific memory (read-only, does not update access stats)
获取特定记忆(只读,不更新访问统计)
llmem get <id>
llmem get <id>
Update a memory
更新记忆
llmem update <id> --content "new content"
llmem update <id> --confidence 0.95
llmem update <id> --summary "short summary"
llmem update <id> --metadata '{"key": "value"}'
llmem update <id> --content "新内容"
llmem update <id> --confidence 0.95
llmem update <id> --summary "简短摘要"
llmem update <id> --metadata '{"key": "value"}'
Invalidate (soft-delete — marks as expired)
失效(软删除——标记为过期)
llmem invalidate <id> --reason "no longer relevant"
llmem invalidate <id> --reason "不再相关"
Delete permanently
永久删除
llmem delete <id>
llmem delete <id>
Stats
统计信息
llmem stats
llmem stats
Context injection for sessions
会话上下文注入
llmem context --session-id <session_id> # Inject context for a new session
llmem context --compacting --session-id <session_id> # Inject key memories during compaction
llmem context --session-id <session_id> # 为新会话注入上下文
llmem context --compacting --session-id <session_id> # 压缩期间注入关键记忆
Session lifecycle hooks
会话生命周期钩子
llmem hook --type idle --session-id <session_id> # Memory extraction + introspection
llmem hook --type created --session-id <session_id> # Context injection on session start
llmem hook --type ending --session-id <session_id> # Automatic introspection on session end
llmem hook --type ending --session-id <session_id> --model glm-5.1:cloud --base-url http://localhost:11434
llmem hook --type compacting --session-id <session_id># Context during compaction
llmem hook --type idle --session-id <session_id> # 记忆提取 + 自省
llmem hook --type created --session-id <session_id> # 会话启动时注入上下文
llmem hook --type ending --session-id <session_id> # 会话结束时自动执行自省
llmem hook --type ending --session-id <session_id> --model glm-5.1:cloud --base-url http://localhost:11434
llmem hook --type compacting --session-id <session_id># 压缩期间注入上下文
Dream — background consolidation (decay, boost, promote, merge)
梦境——后台整合(衰减、增强、提升、合并)
llmem dream # Preview all phases (dry-run)
llmem dream --apply # Execute all phases
llmem dream --phase light # Run only the light phase
llmem dream --phase deep # Run only the deep phase
llmem dream --phase rem # Run only the REM phase
llmem dream --apply --phase deep # Apply only the deep phase
llmem dream --apply --report /path/to/report.html # Generate HTML dream report
llmem dream # 预览所有阶段(试运行)
llmem dream --apply # 执行所有阶段
llmem dream --phase light # 仅运行轻度阶段
llmem dream --phase deep # 仅运行深度阶段
llmem dream --phase rem # 仅运行REM阶段
llmem dream --apply --phase deep # 仅执行深度阶段
llmem dream --apply --report /path/to/report.html # 生成HTML梦境报告
Learn a lesson from a wrong→right correction
从错误→正确的修正中总结经验
llmem learn --wrong "called wrong function" --right "call correctFunction() instead" --context "handler.py:42"
llmem learn --wrong "调用了错误的函数" --right "改为调用correctFunction()" --context "handler.py:42"
Introspect — analyze a failure and store self_assessment memory
自省——分析失败并存储self_assessment记忆
Manual mode: specify fields directly
手动模式:直接指定字段
llmem introspect --category NULL_SAFETY --what-happened "missing null check" --context "handler.py:42" --caught-by self-review --proposed-fix "always check for None before .field"
llmem introspect --category NULL_SAFETY --what-happened "missing null check" --model glm-5.1:cloud --base-url http://localhost:11434
llmem introspect --category NULL_SAFETY --what-happened "缺少空值检查" --context "handler.py:42" --caught-by self-review --proposed-fix "访问.field前始终检查是否为None"
llmem introspect --category NULL_SAFETY --what-happened "缺少空值检查" --model glm-5.1:cloud --base-url http://localhost:11434
Automatic mode: introspect a session transcript or arbitrary text
自动模式:自省会话记录或任意文本
llmem introspect --auto --session <session-id> # Read transcript from OpenCode adapter
llmem introspect --auto --text "Encountered a null pointer error" # Introspect arbitrary text
llmem introspect --auto --session <session-id> --model glm-5.1:cloud --base-url http://localhost:11434
llmem introspect --auto --session <session-id> # 从OpenCode适配器读取记录
llmem introspect --auto --text "遇到空指针错误" # 自省任意文本
llmem introspect --auto --session <session-id> --model glm-5.1:cloud --base-url http://localhost:11434
Track review findings as self_assessment memories (automatic post-review hook)
将评审发现跟踪为self_assessment记忆(自动评审后钩子)
llmem track-review --single --category NULL_SAFETY --context "handler.py:42" # Single finding (uses --single flag)
llmem track-review --findings /tmp/review-findings.json --context "handler.py" # Batch mode: persist findings from JSON file
llmem track-review --clean # Invalidate all existing track-review memories
llmem track-review # Clean review (no findings) → creates REVIEW_PASSED memory
llmem track-review --single --category NULL_SAFETY --context "handler.py:42" # 单个发现(使用--single参数)
llmem track-review --findings /tmp/review-findings.json --context "handler.py" # 批量模式:从JSON文件导入发现
llmem track-review --clean # 失效所有现有跟踪评审记忆
llmem track-review # 无问题评审(无发现)→ 创建REVIEW_PASSED记忆
Export/import
导出/导入
llmem export --output memories.json
llmem import memories.json
llmem export --output memories.json
llmem import memories.json
Embedding quality metrics
嵌入向量质量指标
llmem metrics
llmem metrics
Initialize config and database
初始化配置和数据库
llmem init
llmem init --ollama-url http://localhost:11434
undefinedllmem init
llmem init --ollama-url http://localhost:11434
undefinedRelations
关系
Memories can be linked by typed relations: , , , , .
supersedescontradictsdepends_onrelated_toderived_fromRelations are managed internally by the dream system and extraction pipeline. The Go backend supports relation traversal in search (exposed via the API) but the CLI does not yet expose as a flag.
Retriever--traverse-relations记忆可通过类型化关系关联:、、、、。
supersedescontradictsdepends_onrelated_toderived_from关系由梦境系统和提取管道内部管理。Go后端支持搜索中的关系遍历(通过 API暴露),但CLI尚未提供参数。
Retriever--traverse-relationsMulti-Signal Reranking
多信号重排序
After RRF fusion, search results are automatically reranked using a blend of the RRF score and four weighted signals:
final_score = rrf_score * (1 - blend) + weighted_signal * blendDefault blend factor: 0.3 (70% RRF, 30% signals).
Signals and weights:
| Signal | Weight | Formula |
|---|---|---|
| Confidence | 0.4 | Direct use of |
| Recency | 0.3 | |
| Access frequency | 0.2 | |
| Type priority | 0.1 | Lookup in |
Type priority weights:
| Type | Priority |
|---|---|
| decision | 1.2 |
| preference | 1.1 |
| procedure | 1.1 |
| fact | 1.0 |
| project_state | 1.0 |
| self_assessment | 1.0 |
| event | 0.9 |
| conversation | 0.7 |
RRF融合后,搜索结果会自动结合RRF分数和四个加权信号进行重排序:
final_score = rrf_score * (1 - blend) + weighted_signal * blend默认混合因子:0.3(70% RRF,30%信号)。
信号及权重:
| 信号 | 权重 | 公式 |
|---|---|---|
| Confidence | 0.4 | 直接使用 |
| Recency | 0.3 | |
| Access frequency | 0.2 | |
| Type priority | 0.1 | 从 |
类型优先级权重:
| 类型 | 优先级 |
|---|---|
| decision | 1.2 |
| preference | 1.1 |
| procedure | 1.1 |
| fact | 1.0 |
| project_state | 1.0 |
| self_assessment | 1.0 |
| event | 0.9 |
| conversation | 0.7 |
Important Notes
重要说明
- Go binary — is now a compiled Go binary at
llmem, symlinked from~/.local/bin/llmem. No Python virtualenv needed./usr/local/bin/llmem - Invalidate, don't delete unless the memory was wrong. Invalidated memories stay for reference but aren't returned in searches.
- Embeddings require Ollama running with pulled. If Ollama is down, semantic search falls back to FTS5-only.
nomic-embed-text - ANN vector index — semantic search uses sqlite-vec (virtual table) for fast ANN retrieval, with automatic fallback to brute-force cosine similarity if sqlite-vec is not available.
vec0 - Confidence is 0.0-1.0. Higher = more certain. Facts from the user directly should be 0.9+, auto-extracted should be 0.7.
- Context generation is what gets injected into the system prompt for context. Use to preview what gets injected.
llmem context --session-id <id> - Session hooks use . The idle hook processes the session's transcript, extracts memories, and runs introspection automatically. The ending hook performs automatic introspection on the session transcript and stores a
llmem hook --type <idle|created|ending|compacting> --session-id <id>memory; useself_assessmentand--modelto configure the LLM for introspection.--base-url - Access tracking — is read-only and does not update
llmem getoraccess_count. Search operations automatically track access — each returned result'saccessed_atandaccess_countare updated (best-effort).accessed_at - Calibration status metadata — procedure memories created by behavioral insights receive (trend:
calibration_status,decreasing, orstable) andincreasingmetadata when calibration runs. Stale procedures getcalibrated_atandstale_procedure: truemetadata. These are visible viastale_at.llmem get <id> - Review outcome tracking — persists review findings as
llmem track-reviewmemories. Three modes:self_assessmentfor a single finding,--singlefor batch from JSON, or no flags for a clean review (creates--findings <file>memory). UseREVIEW_PASSEDto invalidate all existing track-review memories before storing new ones.--clean
- Go二进制程序 —— 现在是编译后的Go二进制程序,位于
llmem,并软链接到~/.local/bin/llmem。无需Python虚拟环境。/usr/local/bin/llmem - 优先失效而非删除,除非记忆内容错误。失效的记忆仍保留供参考,但不会在搜索结果中返回。
- 嵌入向量需要运行Ollama并拉取。如果Ollama停机,语义搜索会回退到仅使用FTS5。
nomic-embed-text - ANN向量索引 —— 语义搜索使用sqlite-vec(虚拟表)实现快速ANN检索,如果sqlite-vec不可用,会自动回退到暴力余弦相似度计算。
vec0 - 置信度范围为0.0-1.0,值越高表示越确定。用户直接提供的事实应设为0.9+,自动提取的应设为0.7。
- 上下文生成是指注入到系统提示符中的内容。使用可预览将被注入的内容。
llmem context --session-id <id> - 会话钩子使用。idle钩子处理会话记录、提取记忆并自动运行自省。ending钩子对会话记录执行自动自省并存储
llmem hook --type <idle|created|ending|compacting> --session-id <id>记忆;可使用self_assessment和--model配置自省用的LLM。--base-url - 访问跟踪 —— 是只读操作,不会更新
llmem get或access_count。搜索操作会自动跟踪访问——每个返回结果的accessed_at和access_count都会更新(尽力而为)。accessed_at - 校准状态元数据 —— 由行为洞察创建的procedure记忆在校准运行时会获得(趋势:
calibration_status、decreasing或stable)和increasing元数据。过时的procedure会被标记calibrated_at和stale_procedure: true元数据。这些可通过stale_at查看。llmem get <id> - 评审结果跟踪 —— 将评审发现存储为
llmem track-review记忆。三种模式:self_assessment用于单个发现,--single用于从JSON批量导入,无参数表示无问题评审(创建--findings <file>记忆)。使用REVIEW_PASSED可在存储新记忆前失效所有现有跟踪评审记忆。--clean
Dream — Background Consolidation
梦境——后台整合
The dream system is an automated memory maintenance pipeline that runs three phases:
- Light — finds near-duplicates using cosine similarity (configurable threshold, default 0.92). Produces merge candidates for the deep phase.
- Deep — decays idle memories (confidence decreases over time), boosts frequently accessed memories, promotes high-scoring memories, and merges near-duplicates using LLM-assisted merge with fallback to concatenation.
- REM — extracts themes and clusters from memory, writes a human-readable dream diary to . Self-assessment memories are grouped by error taxonomy category (e.g. "2 self_assessment memories about NULL_SAFETY") for pattern detection. When a category has 3+ occurrences (configurable via
~/.config/llmem/dream-diary.md), the REM phase generates three outputs: (1) a procedural memory (Tier 1 — automatic, low confidence), (2) a behavioral insight entry inskill_patch_threshold(Tier 2 — human review), and (3) a skill patch entry inproposed-changes.mdmarked withproposed-changes.md(Tier 3 — human review). Skill patches are structured markdown snippets with Detection Rule, Checklist, Pitfall, and Verification sections that can be appended to existing skills or used as mini-skills. They are NOT auto-applied — they require human review and deployment. When behavioral insights are generated, calibration tracking compares self_assessment error rates (or average iteration counts) before and after each adaptation was introduced, marking them as effective (decreasing) or ineffective (stable/increasing). Procedure memories that are never accessed and older than[SKILL PATCH]are aggressively decayed (confidence reduced at double the normal decay rate). The dream diary includes astale_procedure_dayssection with per-category effectiveness and stale procedure counts.### Calibration
Default mode is dry-run — use to actually make changes. Without it, only previews what would happen. Use to generate an HTML dream report.
--applyllmem dream--report /path/to/report.htmlScheduling: A systemd user timer () runs nightly at 3am. See and .
llmem-dream.timerllmem dream --applyharness/llmem-dream.serviceharness/llmem-dream.timerDream config lives under the key in :
dream:~/.config/llmem/config.yaml| Key | Default | Description |
|---|---|---|
| 0.92 | Cosine similarity for near-duplicate detection |
| 0.05 | Confidence reduction per decay interval |
| 30 | Days per decay interval |
| 0.3 | Minimum confidence after decay |
| 0.3 | Memories at or below this are invalidated |
| 5 | Access count that triggers confidence boost |
| 0.05 | Confidence boost amount |
| ~/.config/llmem/dream-diary.md | Path to dream diary file |
| (none) | Path for HTML dream report output |
| 3 | Minimum self_assessment occurrences to trigger behavioral insight |
| 30 | Days of self_assessment memories for behavioral insights |
| (none) | Cosine similarity threshold for auto-linking related memories |
梦境系统是自动化的记忆维护管道,包含三个阶段:
- 轻度阶段 —— 使用余弦相似度查找近似重复项(可配置阈值,默认0.92)。为深度阶段生成合并候选。
- 深度阶段 —— 衰减闲置记忆(置信度随时间降低)、增强频繁访问的记忆、提升高分数记忆,并使用LLM辅助合并近似重复项(回退到拼接模式)。
- REM阶段 —— 从记忆中提取主题和集群,将人类可读的梦境日记写入。自省记忆按错误分类体系类别分组(例如“2条关于NULL_SAFETY的self_assessment记忆”)用于模式检测。当某个类别出现3次以上(可通过
~/.config/llmem/dream-diary.md配置),REM阶段会生成三个输出:(1) procedure记忆(Tier 1——自动生成,低置信度),(2)skill_patch_threshold中的行为洞察条目(Tier 2——需人工评审),(3)proposed-changes.md中标记为proposed-changes.md的技能补丁条目(Tier 3——需人工评审)。技能补丁是结构化的Markdown片段,包含检测规则、检查清单、陷阱和验证部分,可附加到现有技能或用作迷你技能。它们不会自动应用——需要人工评审和部署。生成行为洞察时,校准跟踪会比较引入每项调整前后的自省错误率(或平均迭代次数),标记其为有效(下降)或无效(稳定/上升)。从未访问且超过[SKILL PATCH]的procedure记忆会被大幅衰减(置信度降低速度为正常衰减的两倍)。梦境日记包含stale_procedure_days部分,展示各类别的有效性和过时procedure数量。### Calibration
默认模式为试运行 —— 使用实际执行更改。不添加该参数时,仅预览会发生的操作。使用可生成HTML梦境报告。
--applyllmem dream--report /path/to/report.html调度:systemd用户定时器()会在每天凌晨3点运行。详见和。
llmem-dream.timerllmem dream --applyharness/llmem-dream.serviceharness/llmem-dream.timer梦境配置位于的键下:
~/.config/llmem/config.yamldream:| 键 | 默认值 | 描述 |
|---|---|---|
| 0.92 | 近似重复项检测的余弦相似度阈值 |
| 0.05 | 每个衰减周期的置信度降低幅度 |
| 30 | 衰减周期天数 |
| 0.3 | 衰减后的最低置信度 |
| 0.3 | 置信度等于或低于此值的记忆会被失效 |
| 5 | 触发置信度增强的访问次数阈值 |
| 0.05 | 置信度增强幅度 |
| ~/.config/llmem/dream-diary.md | 梦境日记文件路径 |
| (无) | HTML梦境报告输出路径 |
| 3 | 触发行为洞察的自省记忆最低出现次数 |
| 30 | 用于行为洞察的自省记忆回溯天数 |
| (无) | 自动关联相关记忆的余弦相似度阈值 |