RememberStackremember.dev/docs

Configuration variables

This page lists every environment variable that RememberStack's engine and the remember package read. Configuration explains how they reach the containers.

The variables in Client are read by the remember CLI, Python client and MCP server on your own machine. Every other section applies to a self-hosted engine.

The shipped compose.yaml hands every variable in .env to the engine containers. It sets three itself, overriding .env: REMEMBERSTACK_DATABASE_URL, REMEMBERSTACK_MINIO_ENDPOINT_URL and the container's REMEMBERSTACK_SELFHOST_API_PORT (Configuration).

Booleans accept true/false (also 1/0). An empty value counts as unset for optional settings.

Client

VariableDefaultTypePurpose
REMEMBER_API_URLhttp://127.0.0.1:8000URLThe deployment endpoint.
REMEMBER_API_KEYunsetsecretThe API key, raw or as Bearer ….
REMEMBER_PROJECTunsetid or nameThe project to use when the key covers several.
REMEMBER_CONFIG_DIR$XDG_CONFIG_HOME/remember or ~/.config/rememberpathWhere credentials.json lives.
REMEMBERSTACK_INTERNAL_OPSfalse; true in the engine imageboolEnables remember ops, which works only inside the engine image. Also read as REMEMBER_INTERNAL_OPS.
REMEMBERSTACK_MCP_INGEST_ROOTSemptyJSON array or comma-separated pathsDirectories from which the local MCP server may ingest a file by path. Empty refuses path ingest.
REMEMBERSTACK_MCP_PATH_READ_MAX_BYTES268435456int > 0Largest file the local MCP server reads for path ingest.
XDG_CONFIG_HOMEunsetpathStandard base for REMEMBER_CONFIG_DIR and for agent configuration that remember setup writes.
APPDATAunsetpathWindows base for agent configuration that remember setup writes.

The CLI and the Python client read REMEMBER_API_KEY, REMEMBER_API_URL and REMEMBER_PROJECT the same way: a flag or argument wins over the variable, and the variable wins over the credential file (CLI).

Compose file only

Read by compose.yaml from .env, not by the engine.

VariableDefaultTypePurpose
REMEMBERSTACK_POSTGRES_USERrequiredstringPostgreSQL user; also used to build REMEMBERSTACK_DATABASE_URL.
REMEMBERSTACK_POSTGRES_PASSWORDrequiredstringPostgreSQL password. .env.example ships none; generate it at install.
REMEMBERSTACK_POSTGRES_DBrequiredstringPostgreSQL database name.
REMEMBERSTACK_POSTGRES_MAX_CONNECTIONS300intRead by Compose only. PostgreSQL max_connections. The default stack's ceiling is 215 connections; see Database connections.
REMEMBERSTACK_BUILD_REVISIONemptystringBuild argument when Compose builds the app image; stamped into it and reported by GET /deployment as build_revision.

Deployment and API

VariableDefaultTypePurpose
REMEMBERSTACK_DATABASE_URLrequiredSQLAlchemy URLPostgreSQL connection, postgresql+psycopg://user:password@host:5432/db. Compose builds it from the REMEMBERSTACK_POSTGRES_* values.
REMEMBERSTACK_SELFHOST_DEPLOYMENT_IDrequiredUUIDThe deployment's identity; .env.example ships none, generate it at install. Fixed after the first start.
REMEMBERSTACK_SELFHOST_DEPLOYMENT_SLUGlocalstringShort name. Fixed after the first start. Default Sentry environment.
REMEMBERSTACK_SELFHOST_DEPLOYMENT_NAMELocal memorystringDisplay name. Fixed after the first start.
REMEMBERSTACK_SELFHOST_DEFAULT_LANGUAGEenstringDefault language of the deployment. Fixed after the first start.
REMEMBERSTACK_SELFHOST_API_HOST0.0.0.0stringAddress the API listens on inside the container.
REMEMBERSTACK_SELFHOST_API_PORT8000int 1–65535Port inside the container (Compose sets 8000). In .env it is the host port Compose publishes.
REMEMBERSTACK_SELFHOST_API_PUBLISH_ADDRESS127.0.0.1host addressRead by Compose only. Host address Compose publishes the API port on. Set a token before changing it; see Opening the API to other machines.
REMEMBERSTACK_SELFHOST_INGEST_BODY_MAX_BYTESunset (no cap)int > 0Largest POST /ingest body; larger uploads get 413.
REMEMBERSTACK_SELFHOST_BROWSER_ORIGINSemptycomma-separated https origins; http only on localhost, 127.0.0.1 or [::1]Browser origins allowed by CORS.
REMEMBERSTACK_SELFHOST_TRUSTED_PRINCIPAL_SOURCEfalseboolBelieve X-Ingest-Principal-* headers on POST /ingest.
REMEMBERSTACK_SELFHOST_API_ADMISSION_KEY_PER_MINUTEunset (no limit)int ≥ 0; 0 = no limitOptional. Requests per minute per credential (bursts of a quarter of it). Over it: 429 rate_limited.
REMEMBERSTACK_SELFHOST_API_ADMISSION_KEY_IN_FLIGHTunset (no limit)int ≥ 0; 0 = no limitOptional. Requests running at once per credential. Over it: 429 concurrency_limited.
REMEMBERSTACK_SELFHOST_API_ADMISSION_DEPLOYMENT_PER_MINUTEunset (no limit)int ≥ 0; 0 = no limitOptional. Requests per minute for the whole deployment (bursts of a quarter of it).
REMEMBERSTACK_SELFHOST_API_ADMISSION_DEPLOYMENT_IN_FLIGHTunset (no limit)int ≥ 0; 0 = no limitOptional. Requests running at once for the whole deployment.

Storage

VariableDefaultTypePurpose
REMEMBERSTACK_MINIO_ENDPOINT_URLrequiredURLS3-compatible endpoint. Compose sets http://object-store:8333.
REMEMBERSTACK_MINIO_ACCESS_KEYrequiredsecretObject-store access key; also the bundled SeaweedFS store's admin access key. .env.example ships none; generate it at install.
REMEMBERSTACK_MINIO_SECRET_KEYrequiredsecretObject-store secret key; also the bundled SeaweedFS store's admin secret key. .env.example ships none; generate it at install.
REMEMBERSTACK_MINIO_REGIONus-east-1stringS3 region name used for signing.
REMEMBERSTACK_SELFHOST_RAW_BUCKET_NAMEremember-rawstringBucket for original files. Fixed after the first start.
REMEMBERSTACK_SELFHOST_ARTIFACTS_BUCKET_NAMEremember-artifactsstringBucket for converted Markdown and artifacts. Fixed after the first start.
REMEMBERSTACK_SELFHOST_CORPUSFS_BUCKET_NAMEremember-corpusfsstringBucket for filesystem-view snapshots. Fixed after the first start.
REMEMBERSTACK_SELFHOST_RAW_MOUNT_ROOTunsetpathDefault --raw-root for mounts.
REMEMBERSTACK_SELFHOST_ARTIFACTS_MOUNT_ROOTunsetpathDefault --artifacts-root for mounts.
REMEMBERSTACK_SELFHOST_PROJECTION_WORK_ROOT/var/lib/rememberstack/projection-workpathWorking directory created by setup.
REMEMBERSTACK_SELFHOST_FORGET_MANIFEST_ROOT/var/lib/rememberstack/forget-manifestspathWhere hard-forget manifests are read.
REMEMBERSTACK_SELFHOST_MIGRATION_CONFIGalembic.inipathAlembic configuration used by setup.

Authentication

VariableDefaultTypePurpose
REMEMBERSTACK_SELFHOST_API_BEARER_TOKENunsetsecretShared secret with write scope. Setting it turns authentication on.
REMEMBERSTACK_SELFHOST_API_BEARER_BINDunset<deployment-uuid>:<sha256-hex>The shared secret's digest instead of the secret. Must match the token if both are set.
REMEMBERSTACK_SELFHOST_REQUIRE_API_AUTHfalseboolRefuse to start unless the token, the bind or the key issuer is set.
REMEMBERSTACK_SELFHOST_API_KEY_ISSUERunsetURLThe key issuer, matched exactly against iss. Setting it turns signed keys on and requires the tenant id and both URLs below.
REMEMBERSTACK_SELFHOST_API_KEY_TENANT_IDunsetstringThe issuer's tenant id for this deployment. Keys carry aud = org:<this> and org = <this>.
REMEMBERSTACK_SELFHOST_API_KEY_PROJECT_IDthe deployment idstringThe issuer's project id for this deployment, matched against a key's projects.
REMEMBERSTACK_SELFHOST_API_SIGNING_KEYS_URLunsethttp(s) URLWhere the issuer's JWKS of Ed25519 public keys is fetched.
REMEMBERSTACK_SELFHOST_API_REVOCATION_URLunsethttp(s) URLWhere the issuer's signed revocation document for this deployment is fetched.
REMEMBERSTACK_SELFHOST_API_KEY_REFRESH_S60float > 0Seconds between fetches of the key set and the revocation document.
REMEMBERSTACK_SELFHOST_API_REVOCATION_MAX_AGE_S3600float > 0Maximum age of the accepted revocation document; past it every signed key is refused.

See Authentication and scopes.

Pools and workers

VariableDefaultTypePurpose
REMEMBERSTACK_SELFHOST_WORKER_RATE_PER_S20.0float > 0Claims per second per worker process.
REMEMBERSTACK_SELFHOST_WORKER_BURST20.0float ≥ 1Claim burst per worker process.
REMEMBERSTACK_SELFHOST_WORKER_FALLBACK_POLL_S5.0float > 0Poll interval when no notification arrives.
REMEMBERSTACK_SELFHOST_WORKER_SESSION_S3600.0float > 0Length of one worker session.
REMEMBERSTACK_SELFHOST_RETRIEVAL_POOL_SIZE4int 1–32Connections for retrieval in the API.
REMEMBERSTACK_SELFHOST_RETRIEVAL_POOL_TIMEOUT_S1.0float, max 30Wait for a retrieval connection.
REMEMBERSTACK_SELFHOST_RETRIEVAL_MAX_CONCURRENCY4int 1–32, ≤ pool sizeRetrievals at once.
REMEMBERSTACK_SELFHOST_GRAPH_POOL_SIZE4int 1–32Connections for graph queries in the API.
REMEMBERSTACK_SELFHOST_GRAPH_POOL_TIMEOUT_S1.0float, max 30Wait for a graph slot.
REMEMBERSTACK_SELFHOST_GRAPH_MAX_CONCURRENCY2int 1–32, ≤ pool sizeGraph queries at once.
REMEMBERSTACK_SELFHOST_GRAPH_WORK_MEM_KIB16384int 64–65536PostgreSQL work_mem per graph query.
REMEMBERSTACK_WORK_RETRY_BACKOFF_BASE_S2.0floatFirst retry delay; doubles per attempt.
REMEMBERSTACK_WORK_RETRY_BACKOFF_MAX_S60.0floatLongest retry delay.
REMEMBERSTACK_WORK_BUDGETS[]JSON listSpend ceilings per deployment, stage and lane (Operating).
REMEMBERSTACK_E1_EMBED_BATCH_SIZE64int 1–512Chunks per embedding request.
REMEMBERSTACK_P1_EMBED_BATCH_SIZE64int 1–1024Claims or facts per embedding request.

Model provider

VariableDefaultTypePurpose
REMEMBERSTACK_OPENROUTER_API_KEYrequiredstringOpenRouter key for every model call.
REMEMBERSTACK_OPENROUTER_BASE_URLhttps://openrouter.ai/api/v1URLOpenRouter API address.
REMEMBERSTACK_OPENROUTER_TIMEOUT_S120.0float > 0Per-request timeout.
REMEMBERSTACK_OPENROUTER_MAX_COMPLETION_TOKENS32000int ≥ 1Output allowance per chat call, reasoning included.
REMEMBERSTACK_OPENROUTER_CHAT_PROVIDER_ORDERunsetcomma-separated or JSON listPreferred chat providers, with fallback.
REMEMBERSTACK_OPENROUTER_CHAT_PROVIDER_ONLYunsetcomma-separated or JSON listOnly these chat providers, no fallback. Exclusive with the order.
REMEMBERSTACK_OPENROUTER_EMBEDDING_PROVIDER_ORDERunsetcomma-separated or JSON listPreferred embedding providers, with fallback.
REMEMBERSTACK_OPENROUTER_EMBEDDING_PROVIDERunsetstringThe one embedding provider, no fallback. The order wins if both are set.
REMEMBERSTACK_OPENROUTER_ZDRfalseboolOnly zero-data-retention endpoints for chat.
REMEMBERSTACK_OPENROUTER_REASONING_EFFORTunsetnone, minimal, low, medium, high, xhigh, maxReasoning effort for every chat call.
REMEMBERSTACK_OPENROUTER_REASONING_EFFORT_MAPunsetJSON objectReasoning effort per model id; wins over the global value.
REMEMBERSTACK_OPENROUTER_CHAT_THROTTLE_RETRIES3int ≥ 0Retries of a chat call after HTTP 429, outside the work attempts.
REMEMBERSTACK_OPENROUTER_CHAT_UPSTREAM_OVERLOAD_MAX_RETRY_AFTER_S30.0float > 0Longest wait before retrying an overloaded provider.
REMEMBERSTACK_OPENROUTER_INVALID_COMPLETION_CAPTURE_DIRunsetabsolute pathDebug only: keep schema-invalid model answers as files.
REMEMBERSTACK_TYPESAFE_API_KEYunsetstringTypeSafe AI key, required with the jev fact engine. Also read as TYPESAFE_AI_API_KEY.
REMEMBERSTACK_TYPESAFE_MODELjev-lateststringTypeSafe model.
REMEMBERSTACK_TYPESAFE_BASE_URLhttps://api.typesafe.ai/v1URLTypeSafe API address.
REMEMBERSTACK_TYPESAFE_TIMEOUT_S30.0floatTypeSafe request timeout.

Model seats

See Models and providers.

VariableDefaultTypePurpose
REMEMBERSTACK_STRUCTURER_MODELopenai/gpt-5.6-lunamodel idStructure fallback: section anchors when headings are unusable.
REMEMBERSTACK_STRUCTURER_MAX_PROMPT_CHARS200000int ≥ 1000Largest prompt sent to the structure fallback.
REMEMBERSTACK_STRUCTURER_MIN_HEADING_DENSITY_PER_10K0.25float ≥ 0Structure check: minimum headings per 10,000 characters.
REMEMBERSTACK_STRUCTURER_MAX_OVERSIZED_LEAF_RATIO0.75float 0–1Structure check: largest share of oversized sections.
REMEMBERSTACK_STRUCTURER_MIN_BLOCKS_FOR_LLM8int ≥ 1Accepted for compatibility; not used.
REMEMBERSTACK_SKELETON_CHECK_MODELz-ai/glm-4.7-flashmodel idChecks a proposed section outline.
REMEMBERSTACK_ROLE_MODELz-ai/glm-4.7-flashmodel idClassifies section roles.
REMEMBERSTACK_SUMMARY_MODELz-ai/glm-4.7-flashmodel idSection summaries.
REMEMBERSTACK_E2_EXTRACT_MODELopenai/gpt-5.6-lunamodel idClaim selection and extraction.
REMEMBERSTACK_E3_NORMALIZE_MODELopenai/gpt-5.6-lunamodel idRelation normalisation.
REMEMBERSTACK_OBS_SMALL_MODELopenai/gpt-5.6-lunamodel idEntity resolution.
REMEMBERSTACK_FACT_MODELopenai/gpt-5.6-lunamodel idFact adjudication with the prompt engine.
REMEMBERSTACK_FACT_ADJUDICATION_ENGINEpromptprompt or jevFact adjudication engine. Also read as REMEMBERSTACK_FACT_ENGINE.
REMEMBERSTACK_FACT_CONFIDENCE_FLOOR0.75float 0–1Below this, both the new statement and the existing fact are kept.
REMEMBERSTACK_FACT_FALLBACK_TO_PROMPTfalseboolFall back to prompt when a jev call fails. Also read as REMEMBERSTACK_TYPESAFE_FALLBACK_TO_PROMPT.
REMEMBERSTACK_P1_EMBEDDING_MODELqwen/qwen3-embedding-8bmodel id, 1,536-dim outputEvery embedding, including search queries. Fixed once anything is embedded.

Converters

See File formats and converters.

VariableDefaultTypePurpose
REMEMBERSTACK_SELFHOST_CONVERSION_ROUTESMarkdown and plain text → passthrough; HTML, .docx, .pptx, .xlsx → markitdown (the table)JSON objectMIME type → converter. Replaces the default table.
REMEMBERSTACK_MISTRAL_OCR_API_KEYunsetsecretMistral key; required by mistral_ocr and image_ocr_description.
REMEMBERSTACK_MISTRAL_OCR_BASE_URLhttps://api.mistral.aiURLMistral API address.
REMEMBERSTACK_MISTRAL_OCR_MODELmistral-ocr-lateststringOCR model.
REMEMBERSTACK_MISTRAL_OCR_TIMEOUT_S300float > 0OCR request timeout.
REMEMBERSTACK_MISTRAL_OCR_MAX_DOCUMENT_BYTES50000000int > 0Largest file sent to OCR.
REMEMBERSTACK_MISTRAL_OCR_INCLUDE_IMAGEStrueboolKeep embedded images.
REMEMBERSTACK_MISTRAL_OCR_TABLE_FORMATmarkdownmarkdown or htmlTable format.
REMEMBERSTACK_MISTRAL_OCR_EXTRACT_HEADERS_AND_FOOTERStrueboolExtract headers and footers separately.
REMEMBERSTACK_MISTRAL_OCR_CONFIDENCE_GRANULARITYwordword or pageConfidence score detail.
REMEMBERSTACK_MISTRAL_OCR_KEEP_PROVIDER_RESPONSEtrueboolKeep the provider response as an artifact.
REMEMBERSTACK_MISTRAL_OCR_PRICE_USD_PER_1000_PAGES1decimal ≥ 0Price used to record OCR cost.
REMEMBERSTACK_IMAGE_DESCRIPTION_API_KEYunsetsecretOpenRouter key for image descriptions; required by image_ocr_description.
REMEMBERSTACK_IMAGE_DESCRIPTION_BASE_URLhttps://openrouter.ai/api/v1URLAPI address.
REMEMBERSTACK_IMAGE_DESCRIPTION_MODELgoogle/gemini-2.5-flashmodel idVision model; must accept image input.
REMEMBERSTACK_IMAGE_DESCRIPTION_TIMEOUT_S120.0float > 0Request timeout.
REMEMBERSTACK_IMAGE_DESCRIPTION_MAX_IMAGE_BYTES10000000int > 0Largest image.
REMEMBERSTACK_IMAGE_DESCRIPTION_MAX_IMAGE_PIXELS40000000int > 0Largest width × height.
REMEMBERSTACK_IMAGE_DESCRIPTION_MAX_IMAGE_WIDTH16000int > 0Largest width.
REMEMBERSTACK_IMAGE_DESCRIPTION_MAX_IMAGE_HEIGHT16000int > 0Largest height.
REMEMBERSTACK_IMAGE_DESCRIPTION_MAX_DESCRIPTION_CHARS16000int > 0Longest description.
REMEMBERSTACK_IMAGE_DESCRIPTION_MAX_TOKENS4096int ≥ 1Output allowance of the description call.
REMEMBERSTACK_IMAGE_DESCRIPTION_LANE_CONCURRENCY2int 1–2OCR and description in parallel (2) or in turn (1).

Operations

VariableDefaultTypePurpose
REMEMBERSTACK_OPERATIONAL_SAMPLE_LIMIT20int 1–1000Cap on lists in remember ops inspect.
REMEMBERSTACK_P3_SNAPSHOT_PREFIXcorpusfs/snapshotsstringObject prefix of filesystem-view snapshots.
REMEMBERSTACK_P3_FACETS["by-source", "by-time", "by-topic"]JSON arrayTop-level view directories of the corpus tree.
REMEMBERSTACK_P3_SHARD_THRESHOLD150int ≥ 2Entries above which a directory is split.
REMEMBERSTACK_COST_EXPORT_BINDunsethost:port, [ipv6]:port or unix:/pathAddress of the HTTP cost export. Unset: off.
REMEMBERSTACK_COST_EXPORT_TOKENunsetsecret, ≥ 32 bytesBearer token for the cost export.

Observability

VariableDefaultTypePurpose
REMEMBERSTACK_SENTRY_DSNunsetsecretSentry-protocol DSN; unset keeps error tracking off.
REMEMBERSTACK_SENTRY_ENVIRONMENTdeployment slugstringEnvironment name on events.
REMEMBERSTACK_SENTRY_SAMPLE_RATE1.0float 0–1Share of error events sent.
REMEMBERSTACK_LANGFUSE_ENABLED, _HOST, _PUBLIC_KEY, _SECRET_KEY, _CA_FILE, _RUN_TAGfalse / emptyRead only by the benchmark harness; no effect on the engine.
LANGFUSE_PUBLIC_KEY, LANGFUSE_SECRET_KEY, LANGFUSE_HOSTemptyRead only by the benchmark harness; no effect on the engine.

Knowledge plane and other unused settings

These are read by code in the engine that no shipped command runs. Setting them has no effect on a Compose deployment.

VariablesRead by
REMEMBERSTACK_K_PLANNER_PLANNER_MODEL, _PLANNER_MODEL_FAMILY, _REFLECTION_MODEL, _REFLECTION_MODEL_FAMILY, _TIMEOUT_SECONDS, _AUTO_APPLY_MAX_EXPECTED_IMPACT, _TRANSCRIPT_PREFIXKnowledge-page planner
REMEMBERSTACK_K_WRITER_MODEL, _TIMEOUT_SECONDS, _RESIDUE_CLAIM_LIMIT, _EVIDENCE_CLAIMS_PER_FACT, _TRANSCRIPT_PREFIXKnowledge-page writer
REMEMBERSTACK_K_DRIVER_MAX_PARALLEL_PAGESKnowledge-page driver
REMEMBERSTACK_K_CODEX_EXECUTABLE, REMEMBERSTACK_K_WRITER_CODEX_EXECUTABLE (default codex)Knowledge-page agent adapter
REMEMBERSTACK_SYNC_DEBOUNCE_QUIET_SECONDS (default 120), REMEMBERSTACK_SYNC_LANE (default steady)Watched-directory sync loop
REMEMBERSTACK_BACKFILL_BATCH_SIZE (default 500)Backfill seeder
REMEMBERSTACK_VERTEX_PROJECT_ID, _LOCATION (default global), _TIMEOUT_S, _MAX_COMPLETION_TOKENS (default 128000), _PRICE_TABLE_USD_PER_MILLION, _THROTTLE_RETRY_DELAYS_SGoogle Vertex model adapter, used by the benchmark harness