Lore

Settings reference

Runtime settings for recall, models, lifecycle text, write policy, Dream, and backups, with defaults.

Look up every runtime setting that Lore stores, with its key, default, and effect. These settings live in the database. Change them in the console or through the API, not in .env. Deployment variables are listed in Server configuration.

How to change a setting

  • Self-hosted: open /settings in the web console, or send a PUT /api/settings request with a patch object. Use the JSON type that each value needs: numbers and booleans without quotes, and strings in quotes.

    curl -fsS -X PUT http://127.0.0.1:18901/api/settings \
      -H 'content-type: application/json' \
      -H 'authorization: Bearer lm_your_token' \
      --data '{"patch": {"recall.display.min_display_score": 0.6, "dream.cron": "0 2 * * *"}}'
  • Loremem Cloud: open Settings for your project. The tabs are Preferences, Lifecycle, Policy, Dream, Models, and Backup. On the Models tab, you choose an embedding profile and a runtime LLM profile. Cloud doesn't need API keys.

  • Secrets: embedding.api_key, view_llm.api_key, and backup.webdav.password are write-only. Lore never shows a saved value again. It shows only whether each one is set. To replace one, send a new value.

Recall

Display and safeguards

KeyDefaultEffect
recall.display.min_display_score0.60Candidates scoring below this value aren't injected into the prompt. Range 0 to 1.
recall.display.max_display_items3Maximum memories injected per recall. Range 1 to 20.
recall.safety.max_query_chars200For long prompts, recall uses only the first N characters and notes the cut. Range 50 to 2000.
recall.safety.timeout_ms2000Recall is skipped with a notice after this many milliseconds. Applies to prompt recall on Loremem Cloud and to the recall API on self-hosted servers, where agent hooks use their own timeouts. Range 500 to 30000.

Weights

KeyDefaultEffect
recall.weights.w_exact0.30Weight of exact matches on path, glossary, and query terms.
recall.weights.w_glossary_semantic0.25Weight of semantic similarity between the query and glossary terms.
recall.weights.w_dense0.30Weight of dense embedding similarity.
recall.weights.w_lexical0.03Weight of full-text (lexical) matches.

Bonuses

KeyDefaultEffect
recall.bonus.priority_base0.05Bonus for priority 0. Each +1 in priority removes priority_step.
recall.bonus.priority_step0.01Bonus removed for each +1 in priority.
recall.bonus.multi_view_step0.015Bonus for each additional view type (gist or question) that matches.
recall.bonus.multi_view_cap0.05Upper limit on the multi-view bonus.

Recency

KeyDefaultEffect
recall.recency.enabledtrueGives recently updated memories a bonus and gives older ones less. false uses the scoring from earlier versions.
recall.recency.half_life_days180Days until the recency bonus falls to half of its maximum. Range 7 to 3650.
recall.recency.max_bonus0.04Maximum recency bonus, for a memory updated just now. Range 0 to 0.3.
recall.recency.priority_exempt1Memories at or below this priority never decay. -1 makes every memory decay.

Views

KeyDefaultEffect
views.weight.gist1.0Multiplier for gist-view matches in dense and lexical ranking.
views.weight.question0.96Multiplier for question-view matches in dense and lexical ranking.
views.prior.gist0.03Bonus added when a gist view matches.
views.prior.question0.02Bonus added when a question view matches.

Models

KeyDefaultEffect
embedding.provideropenai_compatibleEmbedding API protocol. Only the OpenAI-compatible /embeddings protocol is supported.
embedding.base_urlEmptyBase URL of the embedding service, such as https://api.openai.com/v1.
embedding.api_keyEmpty (write-only)API key for the embedding service.
embedding.modeltext-embedding-3-smallEmbedding model name.
view_llm.provideropenai_compatibleChat protocol for views and Dream: openai_compatible, openai_responses, or anthropic.
view_llm.base_urlEmptyBase URL of the chat endpoint. When empty, view refinement and Dream runs are off.
view_llm.api_keyEmpty (write-only)API key for the chat endpoint.
view_llm.modeldeepseek-v4-flashModel that writes the gist and question views.
view_llm.temperature0.2Sampling temperature. 0 is the most deterministic. Range 0 to 2.
view_llm.max_docs_per_run4Maximum documents the LLM refines in one index build. Range 0 to 100.
view_llm.timeout_ms1800000Timeout for each View and Dream LLM call, which is 30 minutes by default. Range 1000 to 1800000.
view_llm.api_versionEmptyOptional API version header. Native Anthropic endpoints often need it.

Lifecycle

KeyDefaultEffect
lifecycle.guidance.enabledtrueInjects Lore's global usage rules at session start.
lifecycle.guidance.globalBuilt-in textThe usage rules that session start injects for every runtime.
lifecycle.boot.preambleBuilt-in textText shown before the boot node list. Agents still read node content with lore_boot.
lifecycle.startup_recall.preambleBuilt-in textText shown before the startup <recall> block.
lifecycle.prompt_recall.preambleEmptyText shown before each prompt's <recall> block. When empty, only the block is injected.

The built-in defaults for the lifecycle texts are written in Chinese.

Policy

KeyDefaultEffect
policy.priority_budget_enabledtrueEnforces the library-wide caps on creates and updates: 5 memories at priority 0 and 15 at priority 1.
policy.disclosure_warning_enabledtrueWarns when a new memory has no disclosure, or when its disclosure joins situations with 或, 或者, or 以及.

Dream

KeyDefaultEffect
dream.enabledtrueRuns Dream on schedule. Requires a View LLM.
dream.cron0 3 * * *Five-field cron expression (minute, hour, day, month, weekday) in the server's timezone.
dream.auto_approve_changesfalseMarks Dream's changes approved automatically. When off, the changes wait for review.
dream.exclude_session_patterns[]Regex list. Sessions whose recall query text matches any pattern are kept out of the recall metadata Dream reviews.

Backup

KeyDefaultEffect
backup.enabledtrueRuns backups on schedule.
backup.cron0 4 * * *Five-field cron expression for backups. 0 * * * * runs hourly.
backup.retention_count7Number of latest local backups to keep. Older ones are deleted. Range 1 to 100.
backup.local.enabledtrueSaves backup files under SNAPSHOT_DATA_DIR.
backup.webdav.enabledfalseUploads backups to a WebDAV server.
backup.webdav.urlEmptyWebDAV address, such as https://dav.example.com/backups/.
backup.webdav.usernameEmptyWebDAV user name.
backup.webdav.passwordEmpty (write-only)WebDAV password.
backup.include_recall_eventsfalseIncludes recall events in backups. They can make backups large.

Cache

KeyDefaultEffect
cache.enabledtrueUses the cache. false skips all cache reads and writes. Redis is used when REDIS_URL is set.

Prompts

The prompt keys are long templates. Each group below is one row, not one row per key.

GroupKeysUsed for
prompts.view_generation.system1System prompt for writing the gist and question views
prompts.boot_draft.*13Drafting boot memories: one system prompt, plus instructions for the shared nodes, each client_<runtime> node, and the extra constraints
prompts.dream.*7Dream's system prompt, the diary rewrite prompt, and one prompt for each phase: diagnose, plan, preflight, apply, and audit

Prompts contain placeholders such as {{instructions}}, {{client_type}}, {{guidance}}, {{plan_json}}, and {{apply}}. Keep the placeholders that each prompt expects. Change Dream prompts only when you know what each phase does with its output.