Skip to main content

cognee.config

Static class for configuring Cognee’s runtime settings. All setters persist for the duration of the process (or until overridden). Use cognee.config.set(...) for supported runtime-safe settings inside a Python process. Cognee can also be configured through .env or process environment variables before import. Use those for process-level settings such as auth, logging, cache backend, storage backend, telemetry, API server settings, and deployment credentials. For the full environment variable reference and precedence rules, see Setup Configuration.

Configuration Types

set_llm_config() keys must match the internal attribute names on LLMConfig. The exact internal attributes name are displayed in the table below.
cognee.config.set(key, value) is not a free-form setter. Use it for supported runtime-safe settings such as LLMs, embeddings, graph/vector databases, chunking, model overrides, and root directories. Use .env, shell variables, deployment variables, or pre-import os.environ for process-level settings such as auth, logging, cache backend, storage backend, API server settings, telemetry, and cloud credentials.

All Configuration Methods