Settings struct and the
ConfigManager runtime API β build the rustdoc with
cargo doc -p cognee-lib --no-deps --open to browse every field and setter with
its type. This page groups those fields by subsystem and gives the env-var name
and default for each.
How configuration resolves
Three layers, lowest precedence first:- Defaults β
Settings::default()incrates/lib/src/config.rs. - Persisted config file (CLI only) β JSON at
~/.config/cognee-rust/config.json($XDG_CONFIG_HOME/cognee-rust/config.json), managed bycognee-cli config. Seecrates/cli/src/config_store.rs. - Environment variables β bound by
Settings::overlay_from_env(). A.envfile in the working directory (or any ancestor) is loaded automatically viadotenv.
defaults < config.json < env. At runtime, code can also mutate settings
through ConfigManagerβs set_* methods (below) or the binding config APIs.
Parsing notes: booleans accept true|1|yes / false|0|no (cognee_utils::parse_env_bool);
empty env values are treated as unset; numeric vars that fail to parse are ignored.
LLM
Read by the LLM adapter. The deep reference is tools/cli for retries and thecognee-llm rustdoc for the adapter.
A fallback LLM (
llm_fallback_provider/_model/_endpoint/_api_key) is configurable
programmatically (no env binding). MOCK_LLM + cassettes power the offline
benchmark β see performance/mock-benchmark.md.
Embedding
Read byEmbeddingConfig::from_env() (crates/embedding/src/config.rs).
Provider values:
onnx, fastembed, openai, openai_compatible, ollama, mock.
Vector database
Supported providers:
lancedbβ embedded Apache-Arrow / Lance vector store, on disk. Default on every target except Android. The on-disk layout matches the Python SDKβs default LanceDB store, so a Rust deployment can be opened from Python and vice versa.brute-forceβ pure-Rust in-memory linear scan. Default on Android (where LanceDBβs native stack does not cross-compile). Selected on any target by settingvector_db_url = ":memory:".pgvectorβ Postgres + thepgvectorextension; requires thepgvectorCargo feature on the binary build.
cognee-cloud-rs as the cognee-vector-qdrant crate
and is not part of OSS. See tools/backends.
Setting vector_db_provider to qdrant is rejected at component
initialization in OSS (it returns a config error rather than falling back).
Graph database
Supported providers:
ladybug/kuzu (embedded), postgres (feature pggraph).
When Postgres graph credentials are unset they fall back to the relational DB_*
config (see roadmap/cognify-compatibility-plan.md).
Relational database
Chunking & tokenizer
Read bycrates/chunking/src/config.rs. Most
chunking knobs (chunk_strategy default PARAGRAPH, chunk_size 1500,
chunk_overlap 10, chunk_engine) are Settings/CognifyConfig fields without
env bindings. The token counter is env-selected:
Ontology
System paths, users & datasets
Setting
system_root_directory cascades to the default graph_file_path and
vector_db_url unless those are set explicitly.
Session / cache & rate limiting
Logging
Canonical table. Binding READMEs and.env.examplelink here. cognee writes structured logs to stdout and (when writable) to a rotating file. File logging is owned bycognee-logging, initialised by the CLI and HTTP server viacognee_logging::init_logging.
Multi-process warning β when several cognee processes share one log file viaLOG_FILE_NAME, rotation is not coordinated; concurrent rotation can corrupt the log. For sharded workers, give each shard its ownCOGNEE_LOGS_DIR(or unsetLOG_FILE_NAMEper shard).
Observability & telemetry
cognee emits OpenTelemetry traces (behind thetelemetry feature) and opt-out
product analytics. The deep references are
observability/opentelemetry.md and
observability/send_telemetry.md; the env surface:
HTTP server
The server binary reads its own env surface (crates/http-server/src/config.rs) β
host/port, auth, body limits, pipeline registry, notebooks, health probes. See
tools/http-server and
HTTP server architecture: config.
Cloud
Cloud/Auth0 configuration (COGNEE_CLOUD_URL, COGNEE_AUTH0_*) and the
serve()/disconnect() flow live in the closed cognee-cloud-rs product
(the cognee-cloud crate) and are not part of OSS.
Runtime configuration API
ConfigManager (Arc<RwLock<Settings>>) exposes typed setters used by the
bindings and CLI. Families: set_llm_*, set_embedding_*, set_vector_db_*,
set_graph_*, set_chunk_*, set_relational_db_*, set_*_root_directory,
set_ontology_*, set_classification_model / set_summarization_model /
set_summarization_schema, plus four bulk setters (set_llm_config,
set_embedding_config, set_vector_db_config, set_graph_db_config) and a
generic set(key, value). Introspection: read(), version(), get_settings()
(secrets masked). Full signatures are in the
ConfigManager rustdoc. The binding ergonomics
(granular JS setters vs generic set in Python/C) are documented in
Language bindings: configuration.
CLI config subcommand
cognee-cli config get|set|unset <key> reads/writes the persisted JSON file.
The settable keys are the snake_case Settings field names β see
known_keys(). Example: