-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.env.example
More file actions
232 lines (216 loc) · 11.4 KB
/
Copy path.env.example
File metadata and controls
232 lines (216 loc) · 11.4 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
# Docker Compose bootstrap. Replace all three values before first use.
LORE_DB_ADMIN_PASSWORD=change-this-admin-password
LORE_DB_RUNTIME_PASSWORD=change-this-runtime-password
LORE_DB_MAINTENANCE_PASSWORD=change-this-maintenance-password
LORE_BIND_ADDRESS=127.0.0.1
LORE_PORT=3000
# Manual Node deployment: use the non-owner runtime login provisioned by
# `bun run db:bootstrap`. It must be a member of the NOLOGIN `lore_app` role.
# DATABASE_URL=postgres://lore_runtime:change-me@localhost:5432/lore
# DATABASE_POOL_SIZE=10
# LORE_MAINTENANCE_DATABASE_URL=postgres://lore_maintenance_runtime:change-me@localhost:5432/lore
# LORE_MAINTENANCE_POOL_SIZE=2
# LORE_MAINTENANCE_CONCURRENCY=1
# LORE_MAINTENANCE_POLL_MS=1000
# LORE_MAINTENANCE_SWEEP_MS=300000
# Old embedding generations remain rollback-capable for this bounded interval.
# LORE_EMBEDDING_ROLLBACK_SECONDS=604800
# `db:bootstrap` connects through DATABASE_URL as a migration owner and provisions
# separate request and maintenance logins. These values are not used by either
# runtime process after provisioning.
# LORE_RUNTIME_ROLE=lore_runtime
# LORE_RUNTIME_PASSWORD=change-me
# LORE_MAINTENANCE_ROLE=lore_maintenance_runtime
# LORE_MAINTENANCE_PASSWORD=change-me
# Optional deployment branding.
APP_TITLE=Memory for humans and agents
APP_SUBTITLE=Durable recall inside a database-enforced boundary.
# Auth fails closed. This pair is only for local, private development.
AUTH_MODE=none
ALLOW_INSECURE=1
LORE_LOCAL_SUBJECT=local
LORE_LOCAL_DISPLAY_NAME=Local User
LORE_LOCAL_EMAIL=local@example.com
# Self-host operators choose one deployment-wide provider and model. Lore v1 fixes
# the vector protocol at 1024 dimensions; there is no dimension setting.
LORE_EMBEDDING_PROVIDER=ollama
LORE_EMBEDDING_MODEL=qwen3-embedding:0.6b
LORE_EMBEDDING_TIMEOUT_MS=120000
# During a zero-downtime model migration, set this complete pair on the maintenance
# process. Keep the serving provider/model and both providers' credentials there;
# one sequential worker drains serving writes and the building generation.
# LORE_EMBEDDING_BUILD_PROVIDER=google
# LORE_EMBEDDING_BUILD_MODEL=gemini-embedding-2
# Cosine distance gate for dense candidates. Calibrate against a versioned suite.
LORE_SEMANTIC_DISTANCE_THRESHOLD=0.5
# Optional indexed exact-entity recall channel; disabled until benchmarked.
LORE_ENTITY_ALIAS_RECALL=0
# Optional adjacent chunks included in returned/reranked evidence (0-2).
LORE_EVIDENCE_NEIGHBOR_CHUNKS=0
# Highest-scoring chunks retained per visible Memory before adjacent expansion (1-5).
LORE_EVIDENCE_TOP_CHUNKS=1
# Benchmark-only first-stage depth diagnostic. It does not change deployment search
# limits and should be measured before paying to rerank a wider candidate pool.
# LORE_BENCHMARK_RETRIEVAL_LIMITS=10,20,50,100
# LoCoMo-only natural-boundary ablation. These fields come from the pinned source
# sessions; they are not inferred from answers and do not enable a production mode.
# LORE_BENCHMARK_CONTEXT_GROUP_KEY=sessionNumber
# LORE_BENCHMARK_CONTEXT_GROUP_ORDINAL_KEY=sessionTurn
# LORE_BENCHMARK_CONTEXT_GROUP_BASE_LIMIT=20
# LORE_BENCHMARK_CONTEXT_GROUP_MAX_GROUPS=3
# Optional iterative pseudo-relevance feedback depth for multi-hop retrieval (0-3).
# Each round uses the accumulated query chain and the strongest-overlap sentence
# from one newly retrieved RLS-visible passage. Novel results append behind the
# retained order and every round reruns the same filters. Keep 0 until benchmarked.
LORE_RETRIEVAL_FEEDBACK_QUERIES=0
# Optional temporal reciprocal-rank fusion across the second-stage candidate pool.
# 0 disables it; calibrate 0..1 on temporal/conflict-resolution evaluation before use.
LORE_RETRIEVAL_RECENCY_WEIGHT=0
# Ollama-only connection settings:
OLLAMA_BASE_URL=http://127.0.0.1:11434
# Docker Compose reaches the host through this separate address.
LORE_DOCKER_OLLAMA_BASE_URL=http://host.docker.internal:11434
OLLAMA_KEEP_ALIVE=0
# Optional privacy-safe OpenTelemetry export. Lore spans use bounded operation,
# outcome, and error-class attributes only; they never add Memory content, query,
# or tenant/resource identifiers. Leave unset to keep the SDK export disabled.
# OTEL_EXPORTER_OTLP_ENDPOINT=http://127.0.0.1:4318
# OTEL_EXPORTER_OTLP_TRACES_ENDPOINT=http://127.0.0.1:4318/v1/traces
# OTEL_EXPORTER_OTLP_HEADERS=authorization=Bearer%20replace-me
# Operator-only backup/restore commands use explicit one-shot environment values:
# LORE_BACKUP_PATH=./backups/lore-YYYYMMDD.dump
# LORE_PITR_ARCHIVE_DIRECTORY=/secure/lore-wal-archive
# LORE_PITR_RESTORE_DRILL_CONFIRMED_AT=2026-08-01T12:00:00Z
# LORE_RESTORE_DATABASE_URL=postgres://lore_admin:...@localhost:5432/lore_restore
# LORE_RESTORE_CONFIRM=lore_restore
# Google Gemini recipe (replace the provider and model above):
# LORE_EMBEDDING_PROVIDER=google
# LORE_EMBEDDING_MODEL=gemini-embedding-2
# GEMINI_API_KEY=replace-with-a-server-side-key
# OpenAI recipe (replace the provider and model above):
# LORE_EMBEDDING_PROVIDER=openai
# LORE_EMBEDDING_MODEL=text-embedding-3-small
# OPENAI_API_KEY=replace-with-a-server-side-key
# Optional second-stage reranking. Supported providers: llamacpp, vllm,
# vllm-score, cohere, memos, or voyage.
# Lore retrieves under RLS first and sends only visible candidate passages.
# Rerank endpoints require HTTPS outside loopback or host.docker.internal.
# COHERE_API_KEY, MEMOS_API_KEY, and VOYAGE_API_KEY are provider-specific fallbacks
# for the common server-only LORE_RERANK_API_KEY. Failures fall back to fused order.
# RAM-conscious local recipe (llama.cpp serves the official ggml-org Q8 GGUF):
# brew install llama.cpp
# llama-server --hf-repo ggml-org/Qwen3-Reranker-0.6B-Q8_0-GGUF:Q8_0 --reranking --ctx-size 8192 --host 127.0.0.1 --port 8080 --no-webui --parallel 1 --n-gpu-layers all
# LORE_RERANK_PROVIDER=llamacpp
# LORE_RERANK_MODEL=ggml-org/Qwen3-Reranker-0.6B-Q8_0-GGUF:Q8_0
# LORE_RERANK_BASE_URL=http://127.0.0.1:8080
# LORE_DOCKER_RERANK_BASE_URL=http://host.docker.internal:8080
# LORE_RERANK_API_KEY=
# LORE_RERANK_TIMEOUT_MS=30000
# Candidate pool shared by provider reranking and optional temporal rank fusion.
# 20 is Lore's measured Qwen3-0.6B local starting point; recalibrate other providers.
# LORE_RERANK_CANDIDATE_LIMIT=20
# LORE_RERANK_MIN_SCORE=0.01
# LORE_RERANK_DIVERSITY_LAMBDA=0.85
# LORE_RERANK_WEIGHT=0.75
# llama.cpp uses the GGUF model's embedded rerank template; this override is vLLM/managed-only.
# LORE_RERANK_INSTRUCTION=Given a memory recall query, retrieve relevant memory passages that answer the query
# GPU/server alternative:
# LORE_RERANK_PROVIDER=vllm
# LORE_RERANK_MODEL=Qwen/Qwen3-Reranker-0.6B
# LORE_RERANK_BASE_URL=http://127.0.0.1:8000
# Apple Silicon vLLM-Metal score API alternative (serve with runner=pooling):
# LORE_RERANK_PROVIDER=vllm-score
# LORE_RERANK_MODEL=mku64/Qwen3-Reranker-0.6B-mlx-8Bit
# LORE_RERANK_BASE_URL=http://127.0.0.1:8000
# Experimental setwise scorer using one local Ollama chat model over the authorized
# candidate set. Benchmark before enabling; this is not the RAM-conscious default.
# LORE_RERANK_PROVIDER=ollama-listwise
# LORE_RERANK_MODEL=qwen3.5:4b
# LORE_RERANK_BASE_URL=http://127.0.0.1:11435
# LORE_RERANK_NUM_CTX=8192
# LORE_RERANK_MAX_OUTPUT_TOKENS=2048
# LORE_RERANK_MAX_DOCUMENT_CHARS=600
# LORE_RERANK_KEEP_ALIVE=5m
# Managed recipes:
# LORE_RERANK_PROVIDER=cohere
# LORE_RERANK_MODEL=rerank-v4.0-pro
# COHERE_API_KEY=replace-with-a-server-side-key
# LORE_RERANK_PROVIDER=memos
# LORE_RERANK_MODEL=memos-reranker-0.6b
# MEMOS_API_KEY=replace-with-a-server-side-key
# LORE_RERANK_PROVIDER=voyage
# LORE_RERANK_MODEL=rerank-2.5
# VOYAGE_API_KEY=replace-with-a-server-side-key
# Optional multi-query planning for counts, comparisons, temporal reasoning, and
# multi-hop recall. The planner sees only the question; the original query is always
# retained and every generated query is independently filtered through RLS.
# Supported providers: ollama, vllm, openai, or google. Native Ollama fixes
# thinking off, deterministic decoding, a 4K context, and a 256-token output cap.
# LORE_QUERY_PLANNER_PROVIDER=ollama
# LORE_QUERY_PLANNER_MODEL=qwen3.5:4b
# LORE_QUERY_PLANNER_BASE_URL=http://127.0.0.1:11434
# LORE_DOCKER_QUERY_PLANNER_BASE_URL=http://host.docker.internal:11434
# LORE_QUERY_PLANNER_KEEP_ALIVE=0
# LORE_QUERY_PLANNER_NUM_CTX=4096
# LORE_QUERY_PLANNER_API_KEY=
# LORE_QUERY_PLANNER_TIMEOUT_MS=30000
# Total retrieval-query budget including the original query (1-5).
# LORE_QUERY_PLANNER_MAX_QUERIES=3
# LORE_QUERY_PLANNER_INSTRUCTION=
# vLLM uses an OpenAI-compatible `/v1` base URL. OpenAI uses
# LORE_QUERY_PLANNER_API_KEY or the existing OPENAI_API_KEY. Google uses
# GEMINI_API_KEY by default. Leave the base URL unset for either managed API.
# Local benchmark-only fixed reader. This is not consumed by the Lore application.
# Supported providers: ollama, vllm, openai, or google. LongMemEval-V2 includes 29 question
# screenshots, so use a vision-capable model for a complete 451-question run.
# LORE_BENCHMARK_READER_PROVIDER=vllm
# LORE_BENCHMARK_READER_MODEL=your-fixed-reader-model
# LORE_BENCHMARK_READER_BASE_URL=http://127.0.0.1:8002/v1
# LORE_BENCHMARK_READER_API_KEY=
# LORE_BENCHMARK_READER_TIMEOUT_MS=120000
# LORE_BENCHMARK_READER_MAX_CONTEXT_CHARS=120000
# LORE_BENCHMARK_READER_MAX_OUTPUT_TOKENS=512
# LORE_BENCHMARK_READER_INSTRUCTION=
# Native Ollama only. Lore fixes the token context and keeps a warm model for at
# most five minutes during a run, then explicitly unloads it on normal exit.
# Set keep-alive to 0 for intentionally cold per-question latency measurements.
# LORE_BENCHMARK_READER_PROVIDER=ollama
# LORE_BENCHMARK_READER_MODEL=qwen3.5:4b
# LORE_BENCHMARK_READER_BASE_URL=http://127.0.0.1:11434
# LORE_BENCHMARK_READER_NUM_CTX=32768
# LORE_BENCHMARK_READER_THINKING=0
# LORE_BENCHMARK_READER_KEEP_ALIVE=5m
# Bounded in-process planner/reranker sweep cache (1-10000 entries).
# LORE_BENCHMARK_CACHE_ENTRIES=2000
# Add feedback variants to retrieval benchmark reports without changing production.
# LORE_BENCHMARK_RETRIEVAL_FEEDBACK_QUERIES=1
# LORE_BENCHMARK_RETRIEVAL_RECENCY_WEIGHT=0.6
# Optional benchmark-only LongMemEval-V2 judge. This scores the official
# abstention/gotcha cases and is independent from both Lore and the fixed reader.
# Supported providers: vllm, openai, or google.
# LORE_BENCHMARK_JUDGE_PROVIDER=vllm
# LORE_BENCHMARK_JUDGE_MODEL=your-evaluator-model
# LORE_BENCHMARK_JUDGE_BASE_URL=http://127.0.0.1:8002/v1
# LORE_BENCHMARK_JUDGE_API_KEY=
# LORE_BENCHMARK_JUDGE_REASONING_EFFORT=medium
# LORE_BENCHMARK_JUDGE_TIMEOUT_MS=43200000
# LORE_BENCHMARK_JUDGE_MAX_OUTPUT_TOKENS=4096
# MemoryAgentBench-only answer evidence depth (1-100).
# LORE_MEMORYAGENTBENCH_RETRIEVAL_LIMIT=10
# Benchmark-only structured candidate extraction + deterministic max(serial) policy.
# Single-hop runs once; multi-hop uses bounded CAR with a fresh RLS search per hop.
# LORE_MEMORYAGENTBENCH_CONFLICT_ASSEMBLY=0
# Production: remove ALLOW_INSECURE and choose one mode.
#
# Cloudflare Access / trusted proxy:
# AUTH_MODE=proxy
# ACCESS_TEAM_DOMAIN=yourteam.cloudflareaccess.com
# ACCESS_AUD=your-access-application-audience
#
# Temporary single-operator HTTP Basic protection. The Basic username is cosmetic;
# every accepted login maps to LORE_LOCAL_SUBJECT so it cannot select another User.
# AUTH_MODE=password
# UI_PASSWORD=change-me
# Cloudflare uses the HYPERDRIVE and MAINTENANCE_HYPERDRIVE bindings in
# wrangler.jsonc instead of database URLs. Both referenced configurations MUST be
# created with --caching-disabled and with their corresponding distinct login.