Lore

Configuration

Every environment variable for running the Lore binary, with defaults.

Lore is configured entirely through environment variables. Every setting below is optional except the database URL.

These variables are for running the lore binary directly (lore serve / lore worker). The Docker quickstart needs none of them — Docker Compose sets its own values, reaching Postgres at the container hostname paradedb. Reach for this page when you run the binary outside Compose, or when you want to turn on an optional feature under Compose: the generated compose file forwards the embedding, extraction, retrieval, and OpenTelemetry variables from your shell environment, so exporting them before docker compose up -d --wait is enough — no edit to the compose file. The working-memory stripe is the exception: Compose already wires it to the bundled valkey for both the server and the worker, so there is nothing to turn on there.

Database

VariableDefaultDescription
LORE_DATABASE_URLrequiredPostgres (ParadeDB) connection string. Direct-run example: postgres://lore:lore@localhost:5432/lore?sslmode=disable. Under Compose the services use the paradedb hostname instead.

HTTP server

VariableDefaultDescription
LORE_ADDR:8080HTTP listen address for lore serve.
LORE_HTTP_PORTCompose only: override the host port. The container always listens on 8080.

Working memory

The working-memory stripe is a low-latency lane for kind:"state" facts that same-run readers must see immediately. It is optional, and turning it off never loses data: state facts still go down the durable write path, and a same-run reader still sees them through the pack's raw tail. The pack's working section is a separate question — durable persistence of that section is not implemented yet, so without the stripe a pack carries no working section and reports working_source: "unavailable".

VariableDefaultDescription
LORE_VALKEY_URLValkey URL for the stripe, e.g. redis://localhost:6379. Set the same value for both lore serve and lore worker: the server writes each kind:"state" fact through on ingest and reads the stripe when building a pack, while the worker routes state events into it during extraction. Configure only one and that process silently runs cacheless — /healthz reports the server's view only. Unset disables it. An unreachable server degrades non-fatally; a malformed URL fails the boot.
LORE_WORKMEM_MAX_VALUE_BYTES8192Max bytes for a kind:"state" fact's value, enforced at ingestion. 0/unset uses the 8 KiB default.

Retrieval

VariableDefaultDescription
LORE_RETRIEVAL_PARTIAL_TIMEOUT2slore serve only: how long the dense retrieval leg may take to produce a query embedding before the read proceeds without it. A Go duration (2s, 500ms); unset, unparsable, or non-positive keeps the default rather than becoming an instant timeout. The default is deliberately generous so a hosted embedding endpoint fits inside it — lower it only to cap tail latency. Set it below your provider's real latency and the dense leg is dropped on every request: the pack answers from the legs that finished and names the dropped leg in its degraded array, still HTTP 200.

Observability

VariableDefaultDescription
LORE_METRICS_ENABLEDtrueExpose Prometheus /metrics. The server exposes it on its API port; the worker (no API server) uses LORE_METRICS_ADDR.
LORE_METRICS_ADDR:9090The worker's dedicated /metrics listener.
LORE_OTEL_ENABLEDfalseEnable OpenTelemetry trace export. Enabling without an endpoint stays a silent no-op.
OTEL_EXPORTER_OTLP_ENDPOINTOTLP/HTTP collector base URL, e.g. http://localhost:4318. All standard OTEL_EXPORTER_OTLP_* variables are honoured.

Traces cover the HTTP request lifecycle, the extraction/consolidation/embedding jobs, and pack build with hybrid retrieval. Spans carry counts and ids only — never memory content or query text.

/metrics is unauthenticated, like /healthz. Do not expose the metrics port to the internet — bind it to an internal network and let Prometheus scrape it there.

Extraction

The worker distills events into memories. The default is an offline, deterministic fixture extractor — no external API, fully reproducible. For real LLM extraction, set the provider to anthropic and bring your own key. These variables are read by lore worker — the process that runs extraction — and the generated compose file forwards them to the lore-worker service, so exporting them before docker compose up is enough.

VariableDefaultDescription
LORE_EXTRACTION_PROVIDERfixturefixture (offline, deterministic) or anthropic (real LLM extraction). An unknown value fails the worker at startup.
LORE_EXTRACTION_MODELOptional model override; unset uses the provider's built-in default model.
ANTHROPIC_API_KEYRequired with anthropic. Provider-native — not LORE_-prefixed. Missing it fails lore worker at startup rather than silently falling back to the fixture.

Embeddings

Retrieval embeds each memory and each query. The default is an offline, deterministic fixture embedder: reproducible, but not a real semantic vector space. For real semantic recall, point Lore at any OpenAI-compatible /v1/embeddings endpoint (OpenAI, or a self-hosted TEI / Ollama / vLLM server).

VariableDefaultDescription
LORE_EMBEDDING_PROVIDERfixturefixture (offline, deterministic) or openai (any OpenAI-compatible endpoint).
LORE_EMBEDDING_BASE_URLOpenAI defaultEndpoint URL, e.g. https://api.openai.com/v1 or http://localhost:8000/v1. Optional — left unset with openai, it falls back to OpenAI's own endpoint. Set it for a self-hosted server.
LORE_EMBEDDING_MODELModel identifier, passed verbatim to the endpoint (e.g. text-embedding-3-small). Required with openai.
LORE_EMBEDDING_DIMVector dimension, asserted against every response (e.g. 1536). Required with openai. Changing it later opens a new vector space — an existing project would need a re-embedding migration.
LORE_EMBEDDING_SEND_DIMENSIONSfalseSend the dimensions request field (OpenAI-family truncation). Leave off for a self-hosted server that rejects an unknown field; the length assertion is the contract either way.
LORE_EMBEDDING_API_KEYBearer token for the endpoint. Omit for a self-hosted server that needs none.

Set the same embedding configuration for both lore serve and lore worker. If they differ, the query and the stored vectors land in different spaces and retrieval returns nothing.

API keys

API keys are not an environment variable. Mint one per project with the CLI — it prints the token once:

lore keys create --project <id>   # prints the token once
lore keys revoke <id>             # revoke a key

The server authenticates the bearer token against the database; the project is resolved from the key, never from a request body.

On this page