Skip to content

Configure

engram uses env-first configuration with no viper: every setting is an environment variable (MEM_*). Only a subset of settings expose a --flag on engram serve — specifically the server listen address and the OIDC settings; Qdrant, embedder, and logging variables are env-only. Where a flag exists, it takes precedence over the environment variable.

Environment variableFlagDefaultDescription
MEM_LISTEN_ADDR--listen-addr:8080TCP address the HTTP server binds to
MEM_MCP_PATH--mcp-path/mcpPath the MCP transport mounts at. / restores the legacy root catch-all (where the transport answered at every path). When the web UI is enabled and this is /mcp, the host root serves the console.

Source: cmd/engram/serve.go (f.StringVar(&listenAddr, "listen-addr", server.EnvOr("MEM_LISTEN_ADDR", ":8080"), ...), f.StringVar(&mcpPath, "mcp-path", server.EnvOr("MEM_MCP_PATH", ""), ...))

Environment variableFlagDefaultDescription
MEM_QDRANT_ADDRlocalhost:6334Qdrant gRPC address (host:port)
MEM_QDRANT_COLLECTIONmem_evalQdrant collection name for memories (binary default; the Helm chart sets this to memory — see Deploy)
MEM_EMBED_DIM1024Vector dimension; must match the embedding model

Source: internal/server/tools.go (StoreFromEnv).

Environment variableFlagDefaultDescription
MEM_LITELLM_URLhttp://localhost:4000OpenAI-compatible embeddings endpoint (LiteLLM or OpenAI)
MEM_LITELLM_KEY(empty)API key for the embeddings endpoint
MEM_EMBED_MODELollama/bge-m3Model name forwarded to the endpoint

Source: internal/server/tools.go (buildDepsFromEnv).

Setting MEM_OIDC_ISSUER enables bearer-token enforcement (JWKS signature + issuer + expiry validation). Without it, all requests are accepted and a loud warning is logged.

Environment variableFlagDefaultDescription
MEM_OIDC_ISSUER--oidc-issuer(empty)OIDC issuer URL; setting it enables bearer-token enforcement
MEM_OIDC_AUDIENCE--oidc-audience(empty)Expected aud claim (optional; omit to skip audience check)
MEM_OIDC_RESOURCE_METADATA--oidc-resource-metadata(empty)WWW-Authenticate resource metadata URL returned in 401 responses (optional)

Source: cmd/engram/serve.go (init() flag registration and withAuth).

Environment variableDefaultDescription
MEM_LOG_LEVELinfoLog level: debug, info, warn, error
MEM_LOG_FORMATjsonLog format: json or text
MEM_LOG_STDOUTtrueWrite logs to stdout; set false to suppress (requires OTLP endpoint)

Source: internal/telemetry/config.go (ConfigFromEnv).

OTLP export is enabled when OTEL_EXPORTER_OTLP_ENDPOINT is set (standard OpenTelemetry env var, not MEM_*). When it is empty, providers are no-ops.

The Helm chart exposes observability.otlpEndpoint, observability.otlpHeaders, and related values that the chart maps to the appropriate environment variables for the pod.

flag (--oidc-issuer) > environment variable (MEM_OIDC_ISSUER) > built-in default

No viper, no config file. The Helm chart sets MEM_* variables in the pod spec; use --set or a valuesObject override for cluster-specific values.