Skip to main content

Environment Reference

All runtime settings are loaded from .env with the ACMF_ prefix. The checked-in .env.example uses stub providers by default, so no external model credentials are required for local startup.

How to read “Required”

  • Always: set this in any non-trivial deployment.
  • Required if ...: only mandatory when that condition is true.
  • Optional: has a safe default.

Core runtime

VariableWhat it doesRequiredDefault
ACMF_ENVRuntime environment name. test also switches some defaults to stub providers.Optionaldevelopment
ACMF_DEBUGEnables debug-oriented behavior.Optionaltrue
ACMF_HOSTFastAPI bind host.Optional0.0.0.0
ACMF_PORTFastAPI bind port.Optional8000
ACMF_DATABASE_URLPostgreSQL connection string.Alwayspostgresql+psycopg://acmf:acmf@postgres:5432/acmf in Docker example
ACMF_REDIS_URLRedis URL for Celery broker and result backend.Alwaysredis://redis:6379/0 in Docker example
ACMF_NEO4J_URINeo4j Bolt URI for graph projection and graph reads.Alwaysbolt://neo4j:7687 in Docker example
ACMF_NEO4J_USERNAMENeo4j username.Alwaysneo4j
ACMF_NEO4J_PASSWORDNeo4j password.Alwaysacmfpassword

Global OpenAI-compatible defaults

These are fallback values for any role that does not define its own override.
VariableWhat it doesRequiredDefault
ACMF_OPENAI_DEFAULT_BASE_URLDefault base URL for chat and embedding providers.Required if any role uses openai_compatible and does not override its own base URLhttps://api.openai.com/v1
ACMF_OPENAI_DEFAULT_API_KEYDefault API key fallback for any role using openai_compatible.Required if any role uses openai_compatible and does not override its own API keyempty
ACMF_OPENAI_DEFAULT_TIMEOUT_SECONDSDefault request timeout fallback for OpenAI-compatible roles.Optional30

Adjudicator role

VariableWhat it doesRequiredDefault
ACMF_ADJUDICATOR_PROVIDERProvider kind for post-turn adjudication. stub or openai_compatible.Optionalstub in .env.example, app default is openai_compatible outside tests
ACMF_ADJUDICATOR_BASE_URLRole-specific override for the adjudicator base URL.Required if ACMF_ADJUDICATOR_PROVIDER=openai_compatible and no global default base URL is setempty
ACMF_ADJUDICATOR_API_KEYRole-specific override for adjudicator credentials.Required if ACMF_ADJUDICATOR_PROVIDER=openai_compatible and no global default API key is setempty
ACMF_ADJUDICATOR_MODELModel name used by the adjudicator role.Required if ACMF_ADJUDICATOR_PROVIDER=openai_compatiblegpt-4.1-mini
ACMF_ADJUDICATOR_TIMEOUT_SECONDSRole-specific request timeout override.Optionalinherits ACMF_OPENAI_DEFAULT_TIMEOUT_SECONDS

Context Enhancer role

VariableWhat it doesRequiredDefault
ACMF_CONTEXT_ENHANCER_PROVIDERProvider kind for /v1/context and /v1/deep-memory synthesis.Optionalstub in .env.example
ACMF_CONTEXT_ENHANCER_BASE_URLRole-specific override for context enhancement requests.Required if ACMF_CONTEXT_ENHANCER_PROVIDER=openai_compatible and no global default base URL is setempty
ACMF_CONTEXT_ENHANCER_API_KEYRole-specific override for context enhancement credentials.Required if ACMF_CONTEXT_ENHANCER_PROVIDER=openai_compatible and no global default API key is setempty
ACMF_CONTEXT_ENHANCER_MODELModel name used for context and deep-memory synthesis.Required if ACMF_CONTEXT_ENHANCER_PROVIDER=openai_compatiblegpt-4.1-mini
ACMF_CONTEXT_ENHANCER_TIMEOUT_SECONDSRole-specific request timeout override.Optionalinherits ACMF_OPENAI_DEFAULT_TIMEOUT_SECONDS

Cortex role

VariableWhat it doesRequiredDefault
ACMF_CORTEX_PROVIDERProvider kind for Cortex review and snapshot summarization.Optionalstub in .env.example
ACMF_CORTEX_BASE_URLRole-specific override for Cortex requests.Required if ACMF_CORTEX_PROVIDER=openai_compatible and no global default base URL is setempty
ACMF_CORTEX_API_KEYRole-specific override for Cortex credentials.Required if ACMF_CORTEX_PROVIDER=openai_compatible and no global default API key is setempty
ACMF_CORTEX_MODELModel name used by the Cortex role.Required if ACMF_CORTEX_PROVIDER=openai_compatiblegpt-4.1-mini
ACMF_CORTEX_TIMEOUT_SECONDSRole-specific request timeout override.Optionalinherits ACMF_OPENAI_DEFAULT_TIMEOUT_SECONDS

Embeddings role

VariableWhat it doesRequiredDefault
ACMF_EMBEDDING_PROVIDERProvider kind for embedding generation.Optionalstub in .env.example
ACMF_EMBEDDING_BASE_URLRole-specific override for embedding requests.Required if ACMF_EMBEDDING_PROVIDER=openai_compatible and no global default base URL is setempty
ACMF_EMBEDDING_API_KEYRole-specific override for embedding credentials.Required if ACMF_EMBEDDING_PROVIDER=openai_compatible and no global default API key is setempty
ACMF_EMBEDDING_MODELEmbedding model name.Required if ACMF_EMBEDDING_PROVIDER=openai_compatibletext-embedding-3-small
ACMF_EMBEDDING_DIMENSIONSExpected embedding width for the configured model.Required if embeddings are enabled1536
ACMF_EMBEDDING_TIMEOUT_SECONDSRole-specific request timeout override.Optionalinherits ACMF_OPENAI_DEFAULT_TIMEOUT_SECONDS

Read-path tuning

VariableWhat it doesRequiredDefault
ACMF_CONTEXT_MAX_OUTPUT_TOKENSDefault output budget for /v1/context.Optional400
ACMF_DEEP_MEMORY_MAX_OUTPUT_TOKENSDefault output budget for /v1/deep-memory.Optional500
ACMF_CONTEXT_DEFAULT_CANDIDATE_LIMITDefault candidate budget for context-style reads.Optional30
ACMF_DEEP_MEMORY_DEFAULT_CANDIDATE_LIMITDefault candidate budget for deep-memory reads.Optional40
ACMF_SIMPLE_CANDIDATE_LIMITMax final candidates for simple reads.Optional10
ACMF_BALANCED_CANDIDATE_LIMITMax final candidates for balanced reads.Optional30
ACMF_DEEP_CANDIDATE_LIMITMax final candidates for deep reads.Optional50
ACMF_SIMPLE_GRAPH_LIMITGraph traversal limit for simple reads.Optional5
ACMF_BALANCED_GRAPH_LIMITGraph traversal limit for balanced reads.Optional10
ACMF_DEEP_GRAPH_LIMITGraph traversal limit for deep reads.Optional20
ACMF_QUERY_TEXT_RELEVANCE_THRESHOLDMinimum lexical relevance for a memory to remain public in read responses.Optional0.25
ACMF_QUERY_VECTOR_SIMILARITY_THRESHOLDMinimum vector similarity for a raw vector hit to remain public.Optional0.78
ACMF_GRAPH_QUERY_RELEVANCE_THRESHOLDMinimum graph-text relevance for graph-expanded memories to remain public.Optional0.2
ACMF_EVIDENCE_ABSTAIN_THRESHOLDMinimum evidence strength before a deep-memory answer is allowed.Optional0.45

Background processing

VariableWhat it doesRequiredDefault
ACMF_CELERY_TASK_ALWAYS_EAGERRuns Celery tasks inline for tests or local debugging.Optionalfalse
ACMF_GRAPH_PROJECTION_BATCH_SIZEMax outbox events processed per graph sync batch.Optional100
ACMF_GRAPH_PROJECTION_MAX_ATTEMPTSMax projection retries before an outbox event is marked failed.Optional5
ACMF_GRAPH_PROJECTION_RETRY_BACKOFF_SECONDSBackoff window used by the periodic graph retry path.Optional300

Practical defaults

  • Local deterministic development:
    • keep all provider vars on stub
    • keep Docker service URLs from .env.example
  • Real model providers:
    • set each *_PROVIDER=openai_compatible
    • supply either the role-specific BASE_URL and API_KEY, or the shared global defaults
  • If you change .env, recreate the affected containers:
docker compose up -d --force-recreate api worker beat