Skip to content

Configuration

MemoryLayer Enterprise reads the same environment variables as the core server and adds its own. Enterprise changes several core defaults; any value you set in the environment still wins. This page lists the most commonly used settings. The enterprise server and worker share one configuration.


Connections

VariableDefaultDescription
MEMORYLAYER_POSTGRESQL_URLpostgresql://localhost:5432/memorylayerPostgreSQL URL; postgres:// and postgresql:// are normalized to postgresql+asyncpg://
MEMORYLAYER_POSTGRESQL_POOL_SIZE10Connection pool size
MEMORYLAYER_EMBEDDING_DIMENSIONS1536Dimension of vector columns; must match your embedding model
MEMORYLAYER_CACHE_REDIS_URLredis://localhost:6379/0Redis-compatible cache
MEMORYLAYER_EMBED_SERVER_URLhttp://localhost:61051Embedding server (embeddings, reranking, transcription)
MEMORYLAYER_GLINER2_NER_URL(empty)GLiNER2 NER service used for typed entity extraction; extraction falls back to the regex extractor when unavailable
AETHER_GATEWAY_ADDRlocalhost:50051Aether gateway gRPC address
AETHER_API_KEY / AETHER_API_KEY_FILE—Aether credentials
AETHER_WORKSPACE_systemAether workspace for the service connection

Enterprise Defaults

Enterprise sets these service selections on top of the core defaults:

VariableEnterprise defaultNotes
MEMORYLAYER_STORAGE_BACKENDpostgresqlPostgreSQL + pgvector with LEANN cold tier
MEMORYLAYER_MEMORY_SERVICEsaasEnterprise memory service (tiering, agentic recall, trajectories)
MEMORYLAYER_CACHE_SERVICEredis
MEMORYLAYER_EMBEDDING_SERVICEmvMultivector-capable embedding service
MEMORYLAYER_EMBEDDING_PROVIDERembed_server
MEMORYLAYER_GRAPH_ANALYSIS_PROVIDER / MEMORYLAYER_GRAPH_QUERY_PROVIDERageApache AGE
MEMORYLAYER_EXTRACTION_SERVICEgliner2Typed NER extraction
MEMORYLAYER_ENTITY_REGISTRY_PROVIDERpostgresqlEmbedding-based fuzzy entity resolution
MEMORYLAYER_KNOWLEDGEBASE_PROVIDERenterpriseAdds entity-registry articles
MEMORYLAYER_CHAT_SERVICEenterpriseAdds optional chat-thread auto-titling
MEMORYLAYER_TASK_PROVIDERaetherBackground tasks are delivered to memorylayer-worker through Aether
MEMORYLAYER_AUDIT_SERVICEpostgresql
MEMORYLAYER_RATE_LIMIT_SERVICEaether-kv
MEMORYLAYER_METRICS_SERVICEprometheus
MEMORYLAYER_API_KEY_STOREaether
MEMORYLAYER_AUTHENTICATION_SERVICE / MEMORYLAYER_AUTHORIZATION_SERVICEaetherTrust identity forwarded by the Aether auth proxy
MEMORYLAYER_WORKSPACE_IMPLICIT_CREATEfalseWorkspaces must be created explicitly

Security

VariableDefaultDescription
MEMORYLAYER_REQUIRE_SECURE_AUTHfalseWhen true, the server refuses to start if authentication or authorization resolves to the open default service
MEMORYLAYER_ENCRYPTION_KEY—Fernet key used to encrypt data-provider secrets (encrypted_args) at rest

Database Migrations

VariableDefaultDescription
MEMORYLAYER_AUTO_MIGRATE1Apply Alembic migrations at startup. Set 0 on replicas when one migrator owns the schema.
MEMORYLAYER_ALEMBIC_DIRsource-tree migrations/ (image: /app/migrations)Alembic script location
MEMORYLAYER_ALEMBIC_CONFIGsource-tree alembic.ini (image: /app/alembic.ini)Alembic config path
MEMORYLAYER_ALEMBIC_STAMP_UNTRACKED—Force stamp head on a database that has tables but no Alembic version (only when the schema is known to match)

Blob Storage

Document sources, page images, and dataset files are stored in a blob store.

VariableDefaultDescription
MEMORYLAYER_BLOB_STORAGE_SERVICEdefaultdefault (fsspec local or S3) or blobgw (MemoryLayer Storage gateway)
MEMORYLAYER_BLOB_STORAGE_TYPElocalFor the default service: local or s3
MEMORYLAYER_BLOB_STORAGE_BASE_PATH/var/lib/memorylayer/blobsBase path (or bucket path for S3)
MEMORYLAYER_BLOB_S3_ENDPOINT_URL, MEMORYLAYER_BLOB_S3_ACCESS_KEY, MEMORYLAYER_BLOB_S3_SECRET_KEY, MEMORYLAYER_BLOB_S3_REGION—S3 settings
MEMORYLAYER_BLOBGW_URLhttp://localhost:8080blobgw URL when MEMORYLAYER_BLOB_STORAGE_SERVICE=blobgw (requires the storage Python client)

Documents

VariableDefaultDescription
MEMORYLAYER_DOCUMENT_MAX_FILE_SIZE524288000 (500 MB)Maximum document upload size in bytes
MEMORYLAYER_DOCUMENT_TRANSCRIBE_ENABLEDtrueTranscribe pages (OCR) during ingestion
MEMORYLAYER_TRANSCRIPTION_SERVICEembed_serverTranscription backend
MEMORYLAYER_TRANSCRIBE_CASCADEunlimitedOrdered transcription profile cascade
MEMORYLAYER_TRANSCRIBE_FIGURE_CAPTIONStrueCaption figures detected on pages
MEMORYLAYER_VISUAL_TOKENIZER_ENABLEDfalseProduce visual tokens (requires the embedding extension)
MEMORYLAYER_DOCUMENT_CHAT_ENABLEDtrueEnable POST /v1/documents/chat
MEMORYLAYER_DOC_VERIFY_ENABLEDtruePeriodic document verification sweep
MEMORYLAYER_DOC_VERIFY_INTERVAL21600Seconds between verification sweeps
MEMORYLAYER_DOCUMENT_BLOB_GC_ENABLEDtruePeriodic garbage collection of orphaned document blobs
MEMORYLAYER_AUTO_KB_UPDATE_ON_INGESTtrueRefresh the knowledge base when a document finishes ingesting

Background Jobs

VariableDefaultDescription
MEMORYLAYER_JOB_RECONCILE_ENABLEDtrueCancel orphaned ingestion jobs whose documents have already completed
MEMORYLAYER_JOB_RECONCILE_INTERVAL_SEC3600Reconciler interval
MEMORYLAYER_KB_REFRESH_ENABLEDtrueRegenerate stale knowledge bases
MEMORYLAYER_KB_REFRESH_INTERVAL_SEC21600KB refresh interval
MEMORYLAYER_TIERING_ARCHIVAL_ENABLEDfalseRecurring cold-tier archival sweep (see Storage Tiering)
MEMORYLAYER_TIERING_ARCHIVAL_INTERVAL_SEC86400Archival sweep interval
MEMORYLAYER_TIERING_ARCHIVAL_BATCH_SIZE100Memories archived per workspace per sweep
MEMORYLAYER_REPRESENTATION_CONSOLIDATION_ENABLEDfalsePersist maintained representations instead of deriving on every call
MEMORYLAYER_CHAT_TITLE_ENABLEDfalseAuto-title chat threads

The worker (memorylayer-worker start) also accepts --aether-addr (MEMORYLAYER_WORKER_AETHER_ADDR, default localhost:50051), --workspace (MEMORYLAYER_WORKER_WORKSPACE, default _system), --specifier (MEMORYLAYER_WORKER_SPECIFIER), and --task-types (MEMORYLAYER_WORKER_TASK_TYPES, comma-separated; empty handles all).


Tiering Defaults

VariableDefaultDescription
MEMORYLAYER_TIERING_MAX_IMPORTANCE0.3Archive candidates at or below this importance
MEMORYLAYER_TIERING_MAX_ACCESS_COUNT5Archive candidates accessed at most this many times
MEMORYLAYER_TIERING_OLDER_THAN_DAYS90Minimum days since last access
MEMORYLAYER_TIERING_WARMUP_ACCESS_THRESHOLD10Cold-tier access count that triggers promotion

Datasets

VariableDefaultDescription
MEMORYLAYER_DATASET_MAX_FILE_SIZE2147483648 (2 GB)Maximum dataset upload size in bytes

Data Connectors Service

The data-connectors service is configured separately:

VariableDefaultDescription
DC_HOST / DC_PORT0.0.0.0 / 8100Listen address
DC_POSTGRESQL_URL—PostgreSQL URL for the VFS catalog and provider store. When unset, in-memory stores are used (development only).
DC_DATABASE_URL—URL for the Alembic CLI
DC_BLOB_TYPEs3s3 or blobgw
DC_BLOB_BUCKETdata-connectors-devS3 bucket
DC_BLOB_PREFIX, DC_BLOB_ENDPOINT_URL, DC_BLOB_REGION (us-east-1), DC_BLOB_ACCESS_KEY_ID, DC_BLOB_SECRET_ACCESS_KEY—S3 settings; without static keys the default AWS credential chain is used
DC_BLOBGW_URL—blobgw URL (also used for storage-usage reporting)
DC_SERVICE_SPECIFIERhostnameAether service specifier (sv::data-connectors::<specifier>)
AETHER_GATEWAY_ADDR, AETHER_API_KEY—Aether connection

The enterprise server reaches the connectors service at the Aether topic MEMORYLAYER_DATA_CONNECTORS_TOPIC (default sv::data-connectors).