Skip to content

Environment variables

Cortex runtime commands use the following environment variables. Documentation builds use none of them.

Variable Consumers Required when Behavior
ANTHROPIC_API_KEY ingestion, query, semantic resolution Making model-backed runtime calls Read from the process; ingestion and query also fall back to ~/.secrets/anthropic-api-key.
CORTEX_DRIVE_ACCOUNT paper upload and PDF ingestion Accessing the private Drive corpus Google account passed to the gog CLI.
CORTEX_DRIVE_FOLDER_ID paper upload Uploading a PDF Parent Drive folder for new files.
COGNEE_DATA_PATH ingestion and query Overriding the default .cognee data root Sets Cognee's data and system roots for those commands.
GRAPH_DATABASE_PROVIDER standalone graph and resolution helpers Selecting a graph backend Defaults to kuzu; no other provider is implemented.
COGNEE_SKIP_CONNECTION_TEST Cognee internals Optional local tuning Passed through to the dependency; Cortex does not interpret it directly.

Repository .env

scripts.config reads a repository-root .env with simple KEY=VALUE lines. Existing process variables win over values in that file. The supplied .env.example documents Drive and Cognee settings.

Do not commit .env, API keys, credentials, account details, or machine-specific store paths. Prefer a secret manager or protected process environment for keys.

Store-path boundary

Ingestion and query honor COGNEE_DATA_PATH. The standalone graph backend, backup helper, deduplication commands, and alias-registry commands currently operate on the repository's .cognee/ path. Confirm the consumer before assuming one variable retargets every command.