Skip to content

Environment Variables

This page is a quick-reference table of all AutoMem environment variables, grouped by category. For full documentation of each variable including validation rules, behavior details, and configuration examples, see Configuration Reference.


Variables are loaded from multiple sources in priority order:

  1. Process environmentexport VAR=value or variables injected by the platform (Railway, Docker)
  2. Project .env — File in repository root
  3. User config~/.config/automem/.env (personal overrides, never committed)

Variables set earlier in this list take precedence over later sources.


VariableRequiredDefaultDescription
FALKORDB_HOSTYeslocalhostFalkorDB graph database hostname
FALKORDB_PORTYes6379FalkorDB port
FALKORDB_PASSWORDNounsetFalkorDB/Redis password (set in production)
FALKORDB_GRAPHNomemoriesGraph name for Cypher queries
GRAPH_NAMENomemoriesAlias for FALKORDB_GRAPH
PORTNo8001Flask API server port

AutoMem operates in graph-only mode if these variables are not set. Qdrant enables semantic vector search but is optional.

VariableRequiredDefaultDescription
QDRANT_URLNounsetQdrant API endpoint (HTTP or HTTPS)
QDRANT_HOSTNounsetQdrant hostname (alternative to QDRANT_URL)
QDRANT_PORTNo6333Qdrant port (used with QDRANT_HOST)
QDRANT_API_KEYNounsetQdrant authentication key (required for Qdrant Cloud)
QDRANT_COLLECTIONNomemoriesCollection name for memory vectors
COLLECTION_NAMENomemoriesAlias for QDRANT_COLLECTION
VECTOR_SIZENo1024Embedding dimension — must match collection (768/1024/2048/3072)
VariableRequiredDefaultDescription
AUTOMEM_API_TOKENYesunsetToken for all standard API operations
ADMIN_API_TOKENYesunsetToken for admin endpoints (/admin/*, /enrichment/reprocess)
API_TOKENNounsetBackward-compatible alias for AUTOMEM_API_TOKEN
ADMIN_TOKENNounsetBackward-compatible alias for ADMIN_API_TOKEN

See Authentication for token generation and usage details.

VariableRequiredDefaultDescription
EMBEDDING_PROVIDERNoautoProvider selection: auto / voyage / openai / local / ollama / placeholder
EMBEDDING_MODELNotext-embedding-3-smallOpenAI model name
OPENAI_API_KEYNounsetOpenAI (or compatible provider) API key
OPENAI_BASE_URLNounsetCustom base URL for OpenAI-compatible APIs (OpenRouter, LiteLLM, vLLM)
VOYAGE_API_KEYNounsetVoyage AI API key
VOYAGE_MODELNovoyage-4Voyage model name (voyage-4, voyage-4-large)
OLLAMA_BASE_URLNohttp://localhost:11434Ollama server endpoint
OLLAMA_MODELNonomic-embed-textOllama embedding model
EMBEDDING_BATCH_SIZENo20Items per batch API call (reduces costs 40–50%)
EMBEDDING_BATCH_TIMEOUT_SECONDSNo2.0Max wait before flushing a partial batch

Background enrichment runs after each memory is stored — it generates similarity links, entity tags, and summaries.

VariableRequiredDefaultDescription
ENRICHMENT_MAX_ATTEMPTSNo3Retry limit before marking a job failed
ENRICHMENT_SIMILARITY_LIMITNo5Number of semantic neighbors to link
ENRICHMENT_SIMILARITY_THRESHOLDNo0.8Min cosine similarity for SIMILAR_TO edge
ENRICHMENT_IDLE_SLEEP_SECONDSNo2Worker sleep duration when queue is empty
ENRICHMENT_FAILURE_BACKOFF_SECONDSNo5Delay between retry attempts
ENRICHMENT_ENABLE_SUMMARIESNotrueAuto-generate memory summaries
ENRICHMENT_SPACY_MODELNoen_core_web_smspaCy model for NER (if installed)
JIT_ENRICHMENT_ENABLEDNotrueRun enrichment inline on store (just-in-time)

Background maintenance cycles that decay, cluster, and optionally forget low-value memories.

VariableRequiredDefaultDescription
CONSOLIDATION_TICK_SECONDSNo60Scheduler check interval
CONSOLIDATION_DECAY_INTERVAL_SECONDSNo86400Decay cycle frequency (1 day)
CONSOLIDATION_DECAY_IMPORTANCE_THRESHOLDNo0.3Min importance to process in decay
CONSOLIDATION_CREATIVE_INTERVAL_SECONDSNo604800Creative association cycle frequency (1 week)
CONSOLIDATION_CLUSTER_INTERVAL_SECONDSNo2592000Cluster pattern cycle frequency (1 month)
CONSOLIDATION_FORGET_INTERVAL_SECONDSNo0Forget cycle frequency (disabled by default)
CONSOLIDATION_ARCHIVE_THRESHOLDNo0.0Relevance threshold for archiving (0.0 = disabled)
CONSOLIDATION_DELETE_THRESHOLDNo0.0Relevance threshold for deletion (0.0 = disabled)
CONSOLIDATION_GRACE_PERIOD_DAYSNo90Min age in days before a memory can be forgotten
CONSOLIDATION_IMPORTANCE_PROTECTION_THRESHOLDNo0.7Memories above this importance are never forgotten
CONSOLIDATION_PROTECTED_TYPESNoDecision,InsightComma-separated types to never forget
CONSOLIDATION_BASE_DECAY_RATENo0.01Base rate applied per decay cycle
CONSOLIDATION_IMPORTANCE_FLOOR_FACTORNo0.3Minimum importance fraction after decay
VariableRequiredDefaultDescription
SEARCH_WEIGHT_VECTORNo0.35Vector similarity weight
SEARCH_WEIGHT_KEYWORDNo0.35Keyword/TF-IDF matching weight
SEARCH_WEIGHT_TAGNo0.20Tag overlap weight
SEARCH_WEIGHT_IMPORTANCENo0.10User-assigned importance weight
SEARCH_WEIGHT_RECENCYNo0.10Freshness boost weight
SEARCH_WEIGHT_CONFIDENCENo0.05Memory confidence weight
SEARCH_WEIGHT_EXACTNo0.20Content token overlap weight
SEARCH_WEIGHT_RELATIONNo0.25Graph relation proximity boost
SEARCH_WEIGHT_RELEVANCENo0.0LLM-scored relevance (disabled by default)
RECALL_MAX_LIMITNo100Maximum results returned by /recall
RECALL_RELATION_LIMITNo5Max related memories per result
RECALL_EXPANSION_LIMITNo25Max memories added via expand_relations=true
RECALL_MIN_SCORENo0.0Minimum score threshold for returned results
RECALL_ADAPTIVE_FLOORNotrueDynamically adjust score floor based on result set
VariableRequiredDefaultDescription
SYNC_CHECK_INTERVAL_SECONDSNo3600Frequency of drift checks between FalkorDB and Qdrant (1 hour)
SYNC_AUTO_REPAIRNotrueAutomatically queue missing embeddings when drift detected
VariableRequiredDefaultDescription
MEMORY_TYPESNoDecision,Pattern,Preference,Style,Habit,Insight,ContextComma-separated valid memory types (Memory is a legacy alias for Context)
RELATIONSHIP_TYPESNoRELATES_TO,LEADS_TO,...Comma-separated valid relationship types (16 total)
ALLOWED_RELATIONSNoSame as RELATIONSHIP_TYPESAlias for backward compatibility
CLASSIFICATION_MODELNogpt-4o-miniOpenAI model used for content classification fallback
MEMORY_CONTENT_SOFT_LIMITNo500Character threshold above which a warning is issued and auto-summarize may trigger
MEMORY_CONTENT_HARD_LIMITNo2000Character limit above which the request is rejected immediately
MEMORY_AUTO_SUMMARIZENotrueAutomatically summarize content exceeding the soft limit
MEMORY_SUMMARY_TARGET_LENGTHNo300Target character length for auto-generated summaries
VariableRequiredDefaultDescription
LOG_LEVELNoINFOPython logging level (DEBUG, INFO, WARNING, ERROR)
FLASK_ENVNoproductionFlask environment mode

These variables configure the mcp-automem client package, not the server.

VariableRequiredDefaultDescription
AUTOMEM_ENDPOINTYeshttp://127.0.0.1:8001HTTP URL of the AutoMem server
AUTOMEM_API_KEYNounsetAPI key for authenticated instances (preferred name)
AUTOMEM_API_TOKENNounsetAlternative name for the API key
AUTOMEM_LOG_LEVELNounsetSet to debug for verbose MCP client logging
AUTOMEM_PROCESS_TAGNounsetProcess title tag for safe process management
MCP_PROCESS_TAGNounsetAlternative process tag variable

The client checks API key variables in this priority order: AUTOMEM_API_KEYAUTOMEM_API_TOKEN.


Used only for the AutoMem test suite — do not set in production.

VariableRequiredDefaultDescription
AUTOMEM_RUN_INTEGRATION_TESTSNo0Enable integration test suite
AUTOMEM_START_DOCKERNo0Auto-start Docker Compose before tests
AUTOMEM_STOP_DOCKERNo0Auto-stop Docker after tests
AUTOMEM_TEST_BASE_URLNohttp://localhost:8001Test target URL
AUTOMEM_ALLOW_LIVENo0Allow tests against non-localhost URLs
AUTOMEM_TEST_API_TOKENNounsetAPI token for integration tests
AUTOMEM_TEST_ADMIN_TOKENNounsetAdmin token for integration tests

Section titled “Minimal local (graph-only, no vector search)”
Terminal window
AUTOMEM_API_TOKEN=your-token-here
ADMIN_API_TOKEN=your-admin-token-here
FALKORDB_HOST=localhost
FALKORDB_PORT=6379
PORT=8001
Terminal window
AUTOMEM_API_TOKEN=your-token-here
ADMIN_API_TOKEN=your-admin-token-here
FALKORDB_HOST=localhost
PORT=8001
OPENAI_API_KEY=sk-...
QDRANT_URL=http://localhost:6333
VECTOR_SIZE=1024
Terminal window
AUTOMEM_API_TOKEN=your-token-here
ADMIN_API_TOKEN=your-admin-token-here
FALKORDB_HOST=localhost
PORT=8001
EMBEDDING_PROVIDER=ollama
OLLAMA_BASE_URL=http://localhost:11434
OLLAMA_MODEL=nomic-embed-text
QDRANT_URL=http://localhost:6333
VECTOR_SIZE=768
Terminal window
PORT=8001
FALKORDB_HOST=falkordb.railway.internal
FALKORDB_PORT=6379
FALKORDB_PASSWORD=<generated>
AUTOMEM_API_TOKEN=<generated>
ADMIN_API_TOKEN=<generated>
OPENAI_API_KEY=sk-...
QDRANT_URL=https://your-cluster.cloud.qdrant.io
QDRANT_API_KEY=your-qdrant-key
VECTOR_SIZE=1024
{
"env": {
"AUTOMEM_ENDPOINT": "https://your-service.railway.app",
"AUTOMEM_API_KEY": "your-api-token"
}
}

  • Never commit .env files — add to .gitignore
  • Use strong tokens — minimum 32 bytes: openssl rand -hex 32
  • Use separate tokens for AUTOMEM_API_TOKEN and ADMIN_API_TOKEN
  • Set FALKORDB_PASSWORD in all production environments
  • Use HTTPS for all external service endpoints (Qdrant Cloud, OpenAI, Voyage)
  • Use Railway private networking — never expose FalkorDB publicly
  • Avoid query parameter auth (?api_key=) in production — tokens appear in server logs