Expand description
Cognee HTTP server library — OSS surface.
Provides RouterBuilder (the embedder-facing injection seam) and a
free-function build_router shorthand. Closed embedders use
RouterBuilder to splice the moved auth / api-keys / users / sync /
checks / permissions routers back onto the OSS surface and to install
an AuthResolver / ExtraAuthValidator against the
AuthenticatedUser extractor.
Pure-OSS callers (and tests) use build_router(state) which is
equivalent to RouterBuilder::new(state).build().
The standalone cognee-http-server binary is a thin shell over
build_router + axum::serve.
Re-exports§
pub use config::HttpServerConfig;pub use error::ApiError;pub use error::ServerError;pub use state::AppState;
Modules§
- auth
- Slim OSS auth module. The full closed
auth/subtree (JWT, cookie, API key, register/reset/verify, password hashing, mailer, superuser-only extractor, AuthContext, etc.) lives in the closedcognee-http-cloudcrate alongside the auth router family. OSS keeps only the in-extractor types and the default-user fallback. - auth_
resolver - Injection seam for closed-side authentication.
- cloud_
client - components
ComponentHandles— pre-built component instances passed to P2 handlers.- config
- HTTP server configuration.
- dto
- Data Transfer Objects (DTOs) for the cognee HTTP server.
- error
- Error types for the cognee HTTP server.
- health
- Real
HealthCheckerimplementation — probes the live backends behindComponentHandlesand aggregates them into aHealthCheckReport. - lifecycle
- Server startup and shutdown lifecycle hooks.
- middleware
- Tower middleware layers for the cognee HTTP server.
- multipart
- Shared multipart-body parsing helpers.
- notebook_
runner - Notebook cell execution backend for
POST /api/v1/notebooks/{notebook_id}/{cell_id}/run. - observability
- In-process observability tier — span buffer, redaction, and the
tracinglayer that feeds them. - openapi
- OpenAPI document assembly via
utoipa. - permissions
- Permission-gate helpers used across the write-path routers.
- pipelines
- HTTP-server-side pipeline dispatch machinery.
- responses
- Response helpers for the cognee HTTP server.
- responses_
dispatch - Function-call dispatcher for
POST /api/v1/responses. - routers
- HTTP router modules — one file per FastAPI router.
- state
- Application state — a single
Clone-able struct injected into every handler viaaxum::extract::State. - sync
- In-memory sync registry — one running cloud sync per user.
- telemetry
- Per-endpoint product-analytics emission helper.
- wiring
- Construct default standalone backend handles for the HTTP server binary.
Structs§
- Router
Builder - Builder for the full
axum::Router. Closed embedders use this to inject extra routers (e.g. the auth/permissions families) and to install anAuthResolveragainst theAuthenticatedUserextractor.
Functions§
- build_
router - Assemble the full
axum::Routerwith no extra routers — equivalent toRouterBuilder::new(state).build(). - run
- Bind
addr, build the router, and serve until a shutdown signal.