pub struct HttpServerConfig {Show 42 fields
pub host: String,
pub port: u16,
pub cors_allowed_origins: Vec<String>,
pub ui_app_url: String,
pub env: Environment,
pub require_authentication: bool,
pub jwt_secret: SecretString,
pub jwt_lifetime: Duration,
pub body_limit: usize,
pub pipeline_registry_max_runs: usize,
pub pipeline_registry_finished_retention_secs: u64,
pub pipeline_registry_channel_capacity: usize,
pub pipeline_registry_abort_writes_errored: bool,
pub notebook_run_timeout: Duration,
pub health_probe_llm: bool,
pub health_probe_timeout_ms: u64,
pub health_cache_ttl_ms: u64,
pub data_root_directory: PathBuf,
pub system_root_directory: PathBuf,
pub relational_db_url: String,
pub graph_provider: String,
pub graph_file_path: PathBuf,
pub vector_provider: String,
pub vector_db_url: String,
pub embedding_provider: String,
pub embedding_dimensions: u32,
pub embedding_model_name: String,
pub embedding_model_path: Option<PathBuf>,
pub embedding_tokenizer_path: Option<PathBuf>,
pub embedding_endpoint: String,
pub embedding_api_key: SecretString,
pub llm_provider: String,
pub llm_model: String,
pub llm_api_key: SecretString,
pub llm_endpoint: String,
pub llm_max_retries: u32,
pub session_store_backend: String,
pub session_root_directory: PathBuf,
pub notebook_runner_enabled: bool,
pub responses_client_enabled: bool,
pub disable_default_backends: bool,
pub default_user_email: String,
}Expand description
All tuneable server parameters.
Defaults mirror the Python FastAPI server defaults.
Fields§
§host: StringBind address. Env: HTTP_API_HOST. Default: "0.0.0.0".
port: u16Bind port. Env: HTTP_API_PORT. Default: 8000.
cors_allowed_origins: Vec<String>Explicit CORS allowed origins. Env: CORS_ALLOWED_ORIGINS (comma-sep).
Falls back to [ui_app_url] when empty.
ui_app_url: StringFrontend URL used as the CORS fallback. Env: UI_APP_URL.
Default: "http://localhost:3000".
env: EnvironmentDeployment environment. Env: ENV. Default: Prod.
require_authentication: boolEnforce authentication on every request.
OSS default: false — the slim auth/extractor.rs falls back
to default_user_from_state (the uuid5(NAMESPACE_OID, email)
default user) when no AuthResolver is wired and the request
carries no credential. Closed cloud builds inject an
AuthResolver via RouterBuilder::with_auth_resolver(...) and
set this to true to require credentials.
Override at runtime with REQUIRE_AUTHENTICATION=true.
jwt_secret: SecretStringJWT signing secret. Env: AUTH_JWT_SECRET.
Randomly generated at boot when unset (tokens are invalidated on restart).
jwt_lifetime: DurationJWT validity window. Env: AUTH_JWT_LIFETIME_SECONDS. Default: 3600 s.
body_limit: usizeMaximum request body size in bytes. Env: HTTP_BODY_LIMIT_BYTES.
Default: 100 MiB.
pipeline_registry_max_runs: usizeMax in-memory runs. Env: PIPELINE_REGISTRY_MAX_RUNS. Default: 4096.
pipeline_registry_finished_retention_secs: u64Finished-run retention in seconds. Env: PIPELINE_REGISTRY_FINISHED_RETENTION_SECS.
Default: 3600.
pipeline_registry_channel_capacity: usizePer-run broadcast channel capacity. Env: PIPELINE_REGISTRY_CHANNEL_CAPACITY.
Default: 64.
pipeline_registry_abort_writes_errored: boolWhether to write ERRORED rows on abort/shutdown.
Env: PIPELINE_REGISTRY_ABORT_WRITES_ERRORED. Default: true.
Set to false for strict Python parity (Python leaves rows as STARTED on
unclean shutdown). See pipelines.md §12.
notebook_run_timeout: DurationWall-clock timeout for POST /api/v1/notebooks/{id}/{cell}/run.
Env: NOTEBOOK_RUN_TIMEOUT_SECS. Default: 30 s.
health_probe_llm: boolWhether the /health/detailed probe should test the LLM provider and
the embedding engine.
Env: COGNEE_HEALTH_PROBE_LLM. Default: false.
LLM probes consume tokens; embedding probes can hit a remote provider,
so both are opt-in. When false, the corresponding entries are omitted
from the report (mirrors Python’s opt-in behavior).
health_probe_timeout_ms: u64Per-probe timeout in milliseconds. Each component probe is wrapped in
tokio::time::timeout(..) with this value; expiry yields an
Unhealthy (critical) or Degraded (non-critical) entry.
Env: COGNEE_HEALTH_PROBE_TIMEOUT_MS. Default: 2000.
health_cache_ttl_ms: u64In-process cache TTL for the aggregated HealthCheckReport.
Back-to-back /health requests within this window are served from
cache to avoid hammering all backends from k8s liveness probes.
Env: COGNEE_HEALTH_CACHE_TTL_MS. Default: 5000. Set to 0 to
disable caching.
data_root_directory: PathBufRoot directory for ingested data files (LocalStorage).
Env: DATA_ROOT_DIRECTORY.
system_root_directory: PathBufRoot directory for system state (graph/vector/sqlite files).
Env: SYSTEM_ROOT_DIRECTORY.
relational_db_url: StringRelational DB URL.
Env: RELATIONAL_DB_URL (fallback DATABASE_URL).
graph_provider: StringGraph provider name.
Env: GRAPH_DATABASE_PROVIDER. Default: ladybug.
graph_file_path: PathBufGraph file path (for embedded ladybug graph DB).
Env: GRAPH_FILE_PATH.
vector_provider: StringVector provider name.
Env: VECTOR_DB_PROVIDER. Default: pgvector.
Note: the qdrant adapter has been extracted to the closed
cognee-vector-qdrant crate as part of the OSS/closed split. The OSS
http-server now defaults to pgvector and supports mock only when
built with the dev-mock cargo feature.
vector_db_url: StringVector DB URL/path.
Env: VECTOR_DB_URL. For pgvector this is a Postgres connection string.
embedding_provider: StringEmbedding provider name.
Env: EMBEDDING_PROVIDER.
embedding_dimensions: u32Embedding vector dimensions.
Env: EMBEDDING_DIMENSIONS.
embedding_model_name: StringEmbedding model identifier.
Env: EMBEDDING_MODEL_NAME (fallback EMBEDDING_MODEL).
embedding_model_path: Option<PathBuf>Embedding model file path (ONNX).
Env: EMBEDDING_MODEL_PATH.
embedding_tokenizer_path: Option<PathBuf>Embedding tokenizer file path (ONNX).
Env: EMBEDDING_TOKENIZER_PATH.
embedding_endpoint: StringEmbedding endpoint for remote providers.
Env: EMBEDDING_ENDPOINT.
embedding_api_key: SecretStringEmbedding API key.
Env: EMBEDDING_API_KEY (fallbacks: LLM_API_KEY, OPENAI_TOKEN).
llm_provider: StringLLM provider name.
Env: LLM_PROVIDER.
llm_model: StringLLM model name.
Env: LLM_MODEL (fallback OPENAI_MODEL).
llm_api_key: SecretStringLLM API key.
Env: LLM_API_KEY (fallback OPENAI_TOKEN).
llm_endpoint: StringLLM endpoint.
Env: LLM_ENDPOINT (fallback OPENAI_URL).
llm_max_retries: u32LLM retry count for both structured-output and network retries.
Env: LLM_MAX_RETRIES.
session_store_backend: StringSession store backend selector.
Env: COGNEE_SESSION_STORE.
session_root_directory: PathBufSession root directory (for fs-based stores).
Env: COGNEE_SESSION_DIR.
notebook_runner_enabled: boolWhether notebook code execution backend is enabled.
Env: COGNEE_NOTEBOOK_RUNNER_ENABLED.
responses_client_enabled: boolWhether Responses API client should be wired.
Env: COGNEE_RESPONSES_CLIENT_ENABLED.
disable_default_backends: boolDisable standalone default backend wiring in main.
Env: COGNEE_DISABLE_DEFAULT_BACKENDS.
default_user_email: StringEmail address used to derive the synthetic default user when
require_authentication=false and no AuthResolver is wired.
The resulting owner id is
Uuid::new_v5(&Uuid::NAMESPACE_OID, default_user_email.as_bytes())
— the same derivation used by
[cognee_lib::api::user::get_or_create_default_user] and the
Python reference SDK (uuid5(NAMESPACE_OID, email)).
Mirrors Settings::default_user_email in cognee-lib so the HTTP
server and the bindings/CLI agree on owner ids for the same
configured email. Env: DEFAULT_USER_EMAIL. Default:
"default_user@example.com".
Implementations§
Source§impl HttpServerConfig
impl HttpServerConfig
Sourcepub fn from_env() -> Result<Self, ServerError>
pub fn from_env() -> Result<Self, ServerError>
Build config by overlaying environment variables on top of the defaults.
Called only by the standalone binary entry point; library embedders
construct HttpServerConfig directly.
Source§impl HttpServerConfig
impl HttpServerConfig
Sourcepub fn to_registry_config(&self) -> RegistryConfig
pub fn to_registry_config(&self) -> RegistryConfig
Build a RegistryConfig from the matching HttpServerConfig fields.
Trait Implementations§
Source§impl Clone for HttpServerConfig
impl Clone for HttpServerConfig
Source§fn clone(&self) -> HttpServerConfig
fn clone(&self) -> HttpServerConfig
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for HttpServerConfig
impl Debug for HttpServerConfig
Auto Trait Implementations§
impl Freeze for HttpServerConfig
impl RefUnwindSafe for HttpServerConfig
impl Send for HttpServerConfig
impl Sync for HttpServerConfig
impl Unpin for HttpServerConfig
impl UnsafeUnpin for HttpServerConfig
impl UnwindSafe for HttpServerConfig
Blanket Implementations§
impl<T> Allocation for T
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> FmtForward for T
impl<T> FmtForward for T
Source§fn fmt_binary(self) -> FmtBinary<Self>where
Self: Binary,
fn fmt_binary(self) -> FmtBinary<Self>where
Self: Binary,
self to use its Binary implementation when Debug-formatted.Source§fn fmt_display(self) -> FmtDisplay<Self>where
Self: Display,
fn fmt_display(self) -> FmtDisplay<Self>where
Self: Display,
self to use its Display implementation when
Debug-formatted.Source§fn fmt_lower_exp(self) -> FmtLowerExp<Self>where
Self: LowerExp,
fn fmt_lower_exp(self) -> FmtLowerExp<Self>where
Self: LowerExp,
self to use its LowerExp implementation when
Debug-formatted.Source§fn fmt_lower_hex(self) -> FmtLowerHex<Self>where
Self: LowerHex,
fn fmt_lower_hex(self) -> FmtLowerHex<Self>where
Self: LowerHex,
self to use its LowerHex implementation when
Debug-formatted.Source§fn fmt_octal(self) -> FmtOctal<Self>where
Self: Octal,
fn fmt_octal(self) -> FmtOctal<Self>where
Self: Octal,
self to use its Octal implementation when Debug-formatted.Source§fn fmt_pointer(self) -> FmtPointer<Self>where
Self: Pointer,
fn fmt_pointer(self) -> FmtPointer<Self>where
Self: Pointer,
self to use its Pointer implementation when
Debug-formatted.Source§fn fmt_upper_exp(self) -> FmtUpperExp<Self>where
Self: UpperExp,
fn fmt_upper_exp(self) -> FmtUpperExp<Self>where
Self: UpperExp,
self to use its UpperExp implementation when
Debug-formatted.Source§fn fmt_upper_hex(self) -> FmtUpperHex<Self>where
Self: UpperHex,
fn fmt_upper_hex(self) -> FmtUpperHex<Self>where
Self: UpperHex,
self to use its UpperHex implementation when
Debug-formatted.Source§impl<T> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
Source§fn with_current_context(self) -> WithContext<Self> ⓘ
fn with_current_context(self) -> WithContext<Self> ⓘ
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::RequestSource§impl<T, U, C> IntoWithContext<U, C> for Twhere
U: FromWithContext<T, C>,
impl<T, U, C> IntoWithContext<U, C> for Twhere
U: FromWithContext<T, C>,
Source§impl<T> Pipe for Twhere
T: ?Sized,
impl<T> Pipe for Twhere
T: ?Sized,
Source§fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> Rwhere
Self: Sized,
fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> Rwhere
Self: Sized,
Source§fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> Rwhere
R: 'a,
fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> Rwhere
R: 'a,
self and passes that borrow into the pipe function. Read moreSource§fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> Rwhere
R: 'a,
fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> Rwhere
R: 'a,
self and passes that borrow into the pipe function. Read moreSource§fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> R
fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> R
Source§fn pipe_borrow_mut<'a, B, R>(
&'a mut self,
func: impl FnOnce(&'a mut B) -> R,
) -> R
fn pipe_borrow_mut<'a, B, R>( &'a mut self, func: impl FnOnce(&'a mut B) -> R, ) -> R
Source§fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> R
fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> R
self, then passes self.as_ref() into the pipe function.Source§fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> R
fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> R
self, then passes self.as_mut() into the pipe
function.Source§fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> R
fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> R
self, then passes self.deref() into the pipe function.Source§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> Read<Exclusive, BecauseExclusive> for Twhere
T: ?Sized,
Source§impl<T> Tap for T
impl<T> Tap for T
Source§fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Self
fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Self
Borrow<B> of a value. Read moreSource§fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Self
fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Self
BorrowMut<B> of a value. Read moreSource§fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Self
fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Self
AsRef<R> view of a value. Read moreSource§fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Self
fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Self
AsMut<R> view of a value. Read moreSource§fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Self
fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Self
Deref::Target of a value. Read moreSource§fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Self
fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Self
Deref::Target of a value. Read moreSource§fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self
fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self
.tap() only in debug builds, and is erased in release builds.Source§fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self
fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self
.tap_mut() only in debug builds, and is erased in release
builds.Source§fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Self
fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Self
.tap_borrow() only in debug builds, and is erased in release
builds.Source§fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Self
fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Self
.tap_borrow_mut() only in debug builds, and is erased in release
builds.Source§fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Self
fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Self
.tap_ref() only in debug builds, and is erased in release
builds.Source§fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Self
fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Self
.tap_ref_mut() only in debug builds, and is erased in release
builds.Source§fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Self
fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Self
.tap_deref() only in debug builds, and is erased in release
builds.