Security Controls
Authentication
Authentication
Require authentication for all API requests
ENABLE_BACKEND_ACCESS_CONTROL is the canonical posture switch; REQUIRE_AUTHENTICATION is an optional override on the auth requirement alone.When neither variable is set, the default is multi-tenant mode with authentication required.
At startup, Cognee logs an
auth posture: ... line summarizing the resolved decision and the reason (default, inherited from ENABLE_BACKEND_ACCESS_CONTROL, explicit REQUIRE_AUTHENTICATION, or forced on by multi-tenant mode). Use this log line to verify what is actually in effect after deployment.JWT token settings
FASTAPI_USERS_JWT_SECRET must be the same across all instances (e.g., all Kubernetes pods) so that a token issued by one pod is accepted by another.The two sibling token secrets behave identically, and are also generated per process when unset:At startup, the API server logs a warning for each of these three variables it had to generate a secret for, naming the variable and what stops working without it. Startup is silent on this when all three are set. Only the server reports it — SDK, CLI and MCP usage never verifies tokens.
JWT_LIFETIME_SECONDS controls how long a bearer token or cookie remains valid before the user must log in again.AUTH_TOKEN_COOKIE_SECURE sets the Secure attribute on the auth cookie that POST /api/v1/auth/login writes. With Secure set, browsers send the cookie over https only:true and false (case-insensitive). Any other value raises an error at import, so the server does not start. Set it to true on any deployment served over TLS, including one behind a TLS-terminating proxy. Cognee sees plain http behind such a proxy, so it cannot work this out on its own. Leave it false only for http://localhost, because browsers will not store a Secure cookie from a plain-http origin.Session revocation on password change
Each session token is bound to the password it was issued under. When a user’s password changes, every token issued before the change is rejected, including the one that made the change. This applies to the session cookie and to theAuthorization: Bearer token alike, since /api/v1/auth/login returns the same token for both. All sessions are signed out immediately, including the current one, and the user signs in again to get a working token. API keys sent as X-Api-Key are not bound to the password and keep working after a change. A sign-in that upgrades the stored password hash format has the same effect, signing out the user’s other sessions.The token carries a fingerprint keyed with FASTAPI_USERS_JWT_SECRET, not the password hash itself, so a decoded token does not reveal the hash. Rotating FASTAPI_USERS_JWT_SECRET still invalidates every token, as before.Logging out only clears the cookie. The logout response deletes it with the same path, domain, Secure, HttpOnly and SameSite attributes it was set with, so the browser also drops a Secure cookie. A copied token stays valid until it expires or the password changes.Upgrading: tokens issued by earlier versions have no password fingerprint and are rejected, so every signed-in user has to sign in again once after the upgrade. Plan the rollout and tell your users before you deploy.When the API server rejects a token because it predates session revocation or because the password changed after it was issued, it logs the user id and the reason at info level. Check these lines when a client suddenly gets 401 responses; expired or invalid tokens are rejected without a log line.Default user credentials
When an operation runs without an explicit authenticated user, Cognee falls back to a built-in default user — created on first use as a superuser. This happens for SDK/library calls, and for HTTP requests when authentication is off (single-user mode). Configure its credentials with:DEFAULT_USER_PASSWORD unset, the account is created password-less: SDK, CLI, and the API’s own user resolution still use it (none of them authenticate as it), but POST /api/v1/auth/login rejects every password for it. There is no built-in fallback password — earlier releases used the literal default_password, which gave every install a superuser with publicly known credentials.DEFAULT_USER_PASSWORD is applied once. When the API server starts with it set, it creates the default user if needed and gives a password-less default user that password. It never changes a password the account already has: if the value does not match the stored password, the server logs a warning and leaves the account alone — change an existing password through the API instead (log in as the account, then PATCH /api/v1/users/me with a new password; see Deploy REST API Server). When the variable is unset, the server does not create the default user at startup and logs a warning that no default-user login is configured.The local stacks supply a password for you: cognee-cli -ui (which binds the backend to localhost) and docker-compose.yml both set DEFAULT_USER_PASSWORD=default_password unless you provide your own value, so the UI login works out of the box. Do not reuse that value on a server reachable from a network — set a strong one before the first start. Leaving the variable unset avoids a default-user login only when you start the API server directly; cognee-cli -ui and docker-compose.yml both fill in default_password when it is unset.When ENABLE_BACKEND_ACCESS_CONTROL=true, HTTP endpoints require an authenticated user, so the default user is not used to serve unauthenticated requests — but SDK calls still fall back to it. DEFAULT_USER_EMAIL only takes effect before the default user is first created; changing it later does not rename an existing user. See Users for the full permission model.Encryption & Secrets
Encryption & Secrets
API Key Storage
false, API keys are stored as plaintext in the relational database.
When true, each key is hashed with SHA-256 before storage. The raw key is shown to the user only once at creation time and cannot be recovered afterward.Encrypting Neo4j Credentials
When using theneo4j_aura_dev or neo4j_community dataset database handler for multi-user mode, Cognee stores per-dataset Neo4j connection info in the relational database — for neo4j_aura_dev the provisioned Aura instance, for neo4j_community the per-dataset Docker container. The stored database password is encrypted with Fernet symmetric encryption; both handlers derive the encryption key from the same NEO4J_ENCRYPTION_KEY:"test_key" is intentionally insecure. Replace it with a long random string in any environment that stores real Neo4j credentials.The Aura API credentials used to create or delete instances (
NEO4J_CLIENT_ID, NEO4J_CLIENT_SECRET, and NEO4J_TENANT_ID) are read from environment variables when needed and are not stored in the relational database by this handler.Encrypting Integration Credentials
Third-party OAuth integrations (Slack, GitHub, Linear, Google Drive, Gmail, Google Calendar, and Notion) store their tokens in the relationalintegration_credentials table. The token payload is encrypted with AES-256-GCM under a fresh random 96-bit nonce per write; only non-secret metadata — the workspace label, Slack team and enterprise ids, the bot and installing member’s user ids, the granted OAuth scopes, the allowed-channel list, the saved sync or resource selection, per-run sync counts, Slack’s sync bookkeeping (the forget-unavailable-channels setting, uninstall and deletion timestamps, and the channel ids and message timestamps of threads marked for re-reading or messages taken out of memory), and the Notion bot id and workspace icon — is stored in the clear.Keys are configured as a keyring — a set of 32-byte keys, each addressed by a short key id — so that keys can be rotated without re-encrypting existing rows:There is no default key and no derived fallback: if neither variable is set, or a key does not decode to exactly 32 bytes, credential writes fail with a
RuntimeError rather than producing ciphertext nobody can decrypt later. Generate a key with:INTEGRATION_CREDENTIALS_KEYS alongside the old one under a new id, then point INTEGRATION_CREDENTIALS_ACTIVE_KEY_ID at it. Every row records the key id it was written with, so existing rows keep decrypting under their original key; reconnecting an integration rewrites its row under the active key. Remove an old key from the ring only once no row still references it.Revocation. Disconnecting an integration marks the stored credential revoked and makes a best-effort call to the provider’s revoke endpoint. When a set ALLOW_HTTP_REQUESTS disables outbound HTTP, that call is skipped and the response carries remoteRevokeSkipped: true (see Integrations). Provider-side removal has the same effect: for Slack, an app_uninstalled or tokens_revoked event deactivates the stored installation, so no usable token survives an uninstall.File Encryption
Cognee can encrypt the files it writes underDATA_ROOT_DIRECTORY itself, in addition to whatever your disk, volume or object store provides. It is off by default:DATA_ROOT_DIRECTORY: ingested originals and the text loaders derive from them, including per-dataset data directories, and the ontologies uploaded through POST /api/v1/ontologies with their per-user index, on local disk or S3. Nothing else is. Files Cognee references in place instead of copying, such as a local path or an s3:// URL passed to add(), stay as they are. SYSTEM_ROOT_DIRECTORY (the embedded SQLite, LanceDB and Ladybug files), the cache and logs are not sealed. The graph, vector and relational stores and the session cache aren’t covered either, so they still rely on backend or volume encryption at rest.Local keys. Generate a key with:
FILE_ENCRYPTION_KEYS under a new id and point FILE_ENCRYPTION_ACTIVE_KEY_ID at it. Each file records the key id it was written under, so existing files keep decrypting under their original key. Remove an old key only once no file still uses it.aws_kms, Cognee never holds a key-encryption key. Each file’s data key comes from KMS GenerateDataKey and is unwrapped by Decrypt. Both calls carry the encryption context cognee:purpose=file-storage. The provider needs boto3 (pip install "cognee[aws]"), and the runtime role must be allowed kms:GenerateDataKey and kms:Decrypt on the key. The file header records the key ARN KMS answered with, not the alias, so repointing an alias doesn’t break existing files.FILE_ENCRYPTION_* variables you set are available on it:name and implements generate_data_key(), which returns a DataKey(plaintext, wrapped, key_id), and unwrap_data_key(wrapped, key_id).Existing files. Turning encryption on does not rewrite files that are already stored. Plaintext files stay readable and are sealed the next time they are written, for example when the document is added again. There is no bulk re-encryption tool. Turning encryption off again doesn’t unseal anything: with FILE_ENCRYPTION_ENABLED=false, sealed files are read back as ciphertext, so keep the layer on with its keys while sealed files remain.Reading files back. Ingestion, loaders and GET /api/v1/datasets/{dataset_id}/data/{data_id}/raw decrypt transparently, so the raw-data endpoint still returns the original bytes. Loaders open files by path, so while one runs, a sealed file is unsealed into a temporary file readable only by the Cognee process user, which is deleted when the loader finishes. Put the system temp directory on an encrypted volume if that matters to you.Errors. The configuration is checked the first time Cognee stores or opens a file under DATA_ROOT_DIRECTORY, not at import. A missing or malformed key, an active key id that isn’t in the ring, an unknown provider, a missing FILE_ENCRYPTION_KMS_KEY_ID or missing boto3 raises FileEncryptionConfigurationError. The error message says how to fix it. Reading a file whose key id is no longer in the ring, or whose envelope is corrupt or tampered with, raises FileDecryptionError. A refused KMS Decrypt surfaces as botocore’s ClientError with AWS’s own error code, such as AccessDeniedException.Filesystem & Network Access
Filesystem & Network Access
Local File System Access
ACCEPT_LOCAL_FILE_PATH decides whether a path the caller passes may be read with the Cognee process’s own access. That covers local files and directories (for example /etc/passwd), file:// URIs, and s3:// objects and prefixes, which Cognee reads with its own AWS credentials. The setting has three states:Left unset, the answer depends on who is calling. The SDK, the CLI and an MCP server over stdio run on the caller’s own machine, so paths are accepted there. An API request, or an MCP tool call served over
sse or streamable http, names a file on the server, so it is refused, whatever address the server binds to. An explicit value applies to every surface. Set ACCEPT_LOCAL_FILE_PATH=true only when HTTP callers are trusted to read the server’s files, for example a local server that shares the caller’s checkout.A refused path raises IngestionError with HTTP status 403, before anything is read. Directories and s3:// prefixes are refused before they are listed. The message names the setting that refused the path:false. Releases before 1.6.7 returned 415 with Local files are not accepted. instead. Over HTTP, POST /api/v1/remember with content_type="code" refuses a local repository path with 400 and asks for a git URL instead.Cognee’s own storage gets no exemption: a caller’s path into the data root is refused like any other path. The only paths that skip the check are the document files of a repository that Cognee cloned itself from a URL, since the caller named the URL, not the paths. Uploads, raw text and web URLs are not affected, because they are stored first and loaded from Cognee’s own copy.When paths are refused, a string’s shape decides what it is, and Cognee never looks it up on disk, so no reply reveals whether a path exists. A web URL or a database connection string goes on to its own check. A server path is refused with 403 whether or not it exists: a file:// or s3:// URL, or a string that is only a path, meaning one token that starts with a root, ~, ./, ../ or a drive and holds a separator after its first character (/etc/passwd, ~/x, C:\data), or a hidden file at the root (/.env). Anything else is stored as literal text, for example /start, CI/CD, docs/../x or /remember to call Bob. Earlier releases stored a path-only string that named no existing file as text. When paths are accepted, nothing changes: a string that does not point to an existing file is still ingested as text.Allowed local roots
AlongsideACCEPT_LOCAL_FILE_PATH, you can confine every local path Cognee dereferences to a set of allowed roots. With paths accepted, a plain path string outside every root is treated as text, so it is never refused or read; a file:// URI outside every root is refused instead. A path inside a root still has to pass ACCEPT_LOCAL_FILE_PATH:ACCEPT_LOCAL_FILE_PATH. That is what lets a local install ingest a repository or document tree from wherever it happens to live on the machine. Set this variable on any deployment reachable by untrusted callers; leaving it unset there with ACCEPT_LOCAL_FILE_PATH=true means an authenticated caller can name any path the Cognee process can read.When it is set, its entries are the allowed roots, separated by the platform path separator (: on Linux/macOS, ; on Windows). Cognee’s own DATA_ROOT_DIRECTORY, SYSTEM_ROOT_DIRECTORY, cache, log, and repository-clone (COGNEE_REPOS_DIR) directories are always appended to that list, so a restrictive value cannot lock Cognee out of its own storage. The clone root has to be on the list because a cloned repository’s document files (README, docs) are ingested by path exactly like a local project’s, and pass through this same check.Paths are canonicalized with realpath before the containment check, so a symlink inside an allowed root that points outside it is rejected rather than followed. Once the variable is set, a path outside every allowed root raises:add() / remember() ingestion path with paths accepted, a path-looking string outside the allowed roots is never read from disk — it falls through and is ingested as plain text instead (with paths refused, a path-only string is refused before the roots are checked, as described above), though an explicit file:// URI raises IngestionError with the same message rather than falling through. Callers that read a file explicitly, such as the memory-migration sources, surface the error directly. A local repository path handed to the code-graph pipeline reports the same rejection as a CodeRepositoryError instead:data string and uploads it to the backend. Because the file is opened on the MCP host, the checks use the MCP process’s own environment, not the backend’s: an allowed path is uploaded as the file, a path outside COGNEE_ALLOWED_LOCAL_FILE_ROOTS is uploaded as plain text, and with paths refused the call fails with IngestionError and nothing is sent. Paths are refused there with ACCEPT_LOCAL_FILE_PATH=false, and also when it is unset and the MCP server runs over sse or streamable http, since its callers are then network callers. Set both variables on the MCP host as well as on the backend; setting them only on the backend does not stop the MCP host from reading its own files.Presort scan roots
Folder presort is the one path that does not inherit the permissive default above. A scan opens every candidate file in a folder to hash it and sample it for personal data, so it always requires a bounded root set — even whenCOGNEE_ALLOWED_LOCAL_FILE_ROOTS is unset.When the variable is set, its entries are the permitted roots, exactly as for ordinary ingestion. When it is unset, presort falls back to its own bounded default instead of “anywhere”:- the current working directory
- the system temporary directory
- Cognee’s own
DATA_ROOT_DIRECTORY,SYSTEM_ROOT_DIRECTORY, cache, log, and repository-clone roots
realpath before the containment check, so a symlink pointing out of a permitted root is rejected rather than followed. A folder outside every permitted root is refused rather than falling through to text ingestion — the scan raises ValueError: Path is outside the allowed local file roots. Add the folder to COGNEE_ALLOWED_LOCAL_FILE_ROOTS (os.pathsep-separated list) to allow it, or use the CLI's --allow-root flag. The same check guards reading a saved *.presort.json report back in, which surfaces the shorter ValueError: Local file path is outside allowed roots.The CLI’s --allow-root flag is the explicit opt-in for a folder outside those roots:j***@example.com); the raw matched values are never written into the report.Outbound HTTP Requests (SSRF Protection)
http(s) URL (via add() → save_data_item_to_storage) or crawls a page, it fetches that URL server-side. To prevent Server-Side Request Forgery (SSRF, CWE-918), every user-supplied outbound URL is now validated before any request is made.ALLOW_HTTP_REQUESTS gates outbound URL fetching and remote repository cloning. Its default depends on where the call comes from:An API server that should ingest web URLs or clone repositories needs the opt-in in its own environment:
ALLOW_HTTP_REQUESTS=ture disables fetching on every surface instead of enabling it. A blank value (an empty .env line, or a compose ${ALLOW_HTTP_REQUESTS} with no host value) counts as unset.Connectors keep working while the setting is unset, on the API too — see Integrations. The setting does not affect LLM or embedding provider calls, plain text, or file uploads.This table describes cognee 1.6.8 and later. In cognee 1.6.7 and earlier, an unset
ALLOW_HTTP_REQUESTS allows URL fetching and repository cloning on every surface, the API included. Only false, 0, no or off disables them, and any other value, a misspelling included, enables them. To keep an API server on those releases from fetching URLs and cloning repositories, set ALLOW_HTTP_REQUESTS=false.- Scheme — only
httpandhttpsare permitted. Other schemes (e.g.ftp://,gopher://) are rejected. - Host — the URL must contain a host, and that host must resolve. Hostless or unresolvable URLs are rejected.
- Resolved address — the host is resolved and every resolved IP is checked. The request is blocked if any address is loopback, private, link-local, reserved, multicast, unspecified, or IPv6 site-local. This blocks internal and cloud-metadata targets such as
127.0.0.1,::1,169.254.169.254,10.0.0.0/8,172.16.0.0/12, and192.168.0.0/16. IP-literal URLs (e.g.http://[::1]) are validated directly, so DNS-rebinding and IP-literal bypasses are also caught.
follow_redirects=False — redirects are not followed automatically.A GitHub/GitLab repository URL is fetched server-side too, by git rather than by the HTTP client: add() and remember() shallow-clone it into COGNEE_REPOS_DIR (default ~/.cognee/repos) and index it as a code graph. Cloning follows the same ALLOW_HTTP_REQUESTS rule (a disabled clone is refused with HTTP 403: SSRFProtectionError from add() and remember(), CodeRepositoryError from remember(..., content_type="code")), and the clone URL clears the same outbound checks as any other http(s) ingestion. Git LFS is disabled for every git command Cognee runs, so LFS files stay small pointer files and are never downloaded. On a deployment reachable by untrusted callers, size the disk behind COGNEE_REPOS_DIR for the clones it will accumulate — they are kept and reused across calls, not deleted after ingestion.Integrations (OAuth connectors)
The built-in connectors (Slack, GitHub, Notion, Linear, Gmail, Google Drive, Google Calendar) call their providers over HTTPS, soALLOW_HTTP_REQUESTS governs them too, with one difference from URL ingestion: an unset or blank value leaves connectors working on every surface, API included, because a connector only reaches its provider’s fixed hosts and no caller chooses where the server connects. Only a set value that disables outbound HTTP (false, or anything other than true, 1, yes or on) stops them:POST /api/v1/integrations/{provider}/authorize,POST /api/v1/integrations/{provider}/syncand the resource pickers (GET /api/v1/integrations/{provider}/resources,/folders,/labels) answer 503, with adetailmessage that names the setting.- Every provider call is refused before a connection is opened, and a sync started by a webhook, the sync scheduler or the resume worker is refused before anything is fetched and recorded as a failed run.
DELETE /api/v1/integrations/{provider}/connectionstill revokes the connection locally but skips the provider-side token revoke and returnsremoteRevokeSkipped: true. The token then stays live at the provider until it expires or the app is removed there.
add() over a dlt connector source from the SDK does not go through this check. Connector HTTP calls never follow redirects: a 3xx answer from a provider fails the call instead of re-sending its credentials to another host.Database Connection-String Ingestion
postgresql://, postgres://, mysql://, mysql+pymysql://, sqlite:///, mssql://, oracle://) is opened by the Cognee process, from the server’s network position. A caller who can name a database can read any database the server can reach. ALLOW_DATABASE_INGESTION controls who may do this:cognee-cli --api-url and the MCP server in API mode do not open the database themselves: they upload the connection string to the API server as a text document, so it is ingested as text rather than read as a database.Whatever the setting, connection strings that point at Cognee’s own storage are refused:- SQLite files inside Cognee’s data, system, cache, log or repository-clone roots, or at its configured database paths (
SqliteSourceRefused). Paths are resolved withrealpath, so a symlink into those roots is refused too. - Strings that carry one of Cognee’s own database username/password pairs (from the relational, vector, graph and cache settings), whatever host they name (
DatabaseSourceRefused). - Hosts that resolve to one of Cognee’s database servers on the same port (
DatabaseSourceRefused). Loopback addresses,0.0.0.0/::, IPv4-mapped IPv6 addresses and the addresses this machine’s hostname resolves to all count as this machine. The check compares servers, not database names, because the per-dataset Postgres handlers keep every dataset’s database on one server.
127.0.1.1, and behind DB_HOST=host.docker.internal the host’s LAN address is not visible. If you enable the switch, also make sure Cognee’s databases require a password and restrict network egress.Connection strings must also meet these rules (otherwise 422):- A
sqlite:///path must name an existing regular file, because the driver would otherwise create it. The path may not carry theurioption, and it must be insideCOGNEE_ALLOWED_LOCAL_FILE_ROOTSwhen that is set (SqliteSourceRefused). - A network connection string must name its server as the URL host, that host must resolve, and the string may carry only the
sslmode,connect_timeout,application_nameandcharsetoptions (DatabaseSourceRefused). - When the driver fails to connect, the response gives only the exception class (
DatabaseSourceUnreachable). The full error is written to the server log.
Query & History
Query & History
Cypher Query Access
SearchType.CYPHER (raw Cypher queries against the graph database) and SearchType.NATURAL_LANGUAGE (natural language translated to Cypher, then executed) are rejected with SearchTypeDisabledError (HTTP 403 over the API, with the fix in the response’s remediation field; a subclass of UnsupportedSearchTypeError in the SDK), and the server logs a warning. While the flag is off, a FEELING_LUCKY search never selects either type: if the LLM proposes one, the search runs RAG_COMPLETION instead. To enable both types:Search History Retention
search() and recall() is saved as plaintext question and answer rows in the relational database. Answers can quote chunk text, so this history can hold the content of your documents. Set the variable to false where query and answer text must not be kept:forget(dataset=...)removes every user’s rows recorded for that dataset, since the dataset is gone for everyone it was shared with. Every other dataset delete does the same:datasets.empty_dataset(),datasets.delete_all()anddatasets.delete_data(..., delete_dataset_if_empty=True)when it drops the emptied dataset.forget(everything=True)removes those rows for each dataset it deletes, shared ones included, plus every row the caller owns.forget(data_id=...)leaves history in place, because rows are recorded per dataset, not per document. Answers that quoted the document stay until a dataset or everything forget.
forget(everything=True) removes only the caller’s own, so other users’ rows without a dataset stay.Multi-User Isolation
Multi-User Isolation
Dataset & Multi-User Isolation
If you configure an unsupported backend (e.g., Qdrant, Weaviate), disable access control to avoid runtime errors:
ENABLE_BACKEND_ACCESS_CONTROL=false alone also disables the auth requirement (single-user mode). You only need to add REQUIRE_AUTHENTICATION if you want to override that default — for example, REQUIRE_AUTHENTICATION=true to keep auth on for a single-user deployment behind a shared token.See Dataset Database Handlers for the full list of supported handlers.Disabling Authentication for Local Development
Disabling Authentication for Local Development
When running Cognee locally for development or testing, you can disable authentication so that API calls succeed without a bearer token. Setting the single posture switch is enough:With
ENABLE_BACKEND_ACCESS_CONTROL=false and REQUIRE_AUTHENTICATION unset, REQUIRE_AUTHENTICATION inherits from the posture switch and the auth requirement is turned off automatically. (Previously, both variables had to be set to false independently; that is no longer required.)These values are read once when the server process starts, so you must restart the server after changing them. Check the auth posture: ... line in the startup logs to confirm the resolved decision.When authentication is disabled, unauthenticated requests are automatically served under a built-in default user (default_user@example.com). The relational database must be initialized before the first request so that this default user can be looked up or created.Troubleshooting 401 errors after setting the variablesTelemetry
Cognee, whether used as the Python library, the REST API server or the MCP server, sends anonymous usage telemetry by default. It records which operations run and with which settings, never the contents of your documents, queries, prompts or answers. To turn it off, setTELEMETRY_DISABLED in .env or the process environment:
false included. To keep telemetry on, leave the variable unset. Telemetry is also off when ENV is dev or test.
During dlt ingestion (connectors, database and CSV sources), TELEMETRY_DISABLED also turns off the telemetry dlt sends to dltHub, by setting RUNTIME__DLTHUB_TELEMETRY=false in the process environment unless it’s already set. ENV set to dev or test doesn’t do this; only TELEMETRY_DISABLED does. That applies to the whole process, including your own dlt pipelines. If your process used dlt before Cognee’s first dlt call, dlt’s telemetry has already started, so set RUNTIME__DLTHUB_TELEMETRY=false yourself. Cognee also sets LOAD__DELETE_COMPLETED_JOBS=true by default, so dlt doesn’t keep a copy of loaded rows in its completed load packages. See Cleaning up dlt’s staging data.
What an event contains. Events go to Cognee’s analytics endpoint, https://test.prometh.ai. Each one carries:
- The event name, such as
cognee.remember,cognee.recall, a pipeline task starting, completing or erroring, or a REST endpoint being called, plus the date, the exact time the event happened (event_time, an ISO 8601 UTC timestamp), the Cognee version andTELEMETRY_ORIGIN. - Settings of the operation: for example the search type,
top_k, the length of the query (not its text), and the configured LLM and embedding provider and model. A model given as a local file path is reported aslocal_path. - Identifiers: two random IDs Cognee generates on first use (stored in
.anon_idin the install directory and in~/.cognee/.persistent_id), the Cognee user and tenant UUIDs, and a one-way hash ofLLM_API_KEY. The key itself is never sent. Every event also says whether the caller is an agent (is_agent), meaning a child user with its own API key, such as a provisioned Claude Code or MCP plugin. For an agent, the user UUID is the agent’s own,agent_owner_idis the owning user’s UUID, andagent_pluginis the plugin key, orcustomfor an agent not named after a known plugin. The agent’s name is never sent. - While the process is connected to an instance with
serve()and the instance reported a tenant:connected_tenant_id, the tenant UUID the instance’s/api/v1/users/mereturned for the API key, andconnected_host. A*.cognee.aihost is sent as is. Any other host is sent only aslocalhost(forlocalhost,127.0.0.1or::1) orself_hosted, so self-hosted hostnames and URL paths are never sent, and neither is the instance API key. Both fields are read from the active connection in memory: they are absent afterdisconnect()and in a process that never calledserve(), even when a saved connection exists on disk. - For REST API errors: the exception type, status code and route template, never the error message or the resolved path.
TELEMETRY_REQUEST_TIMEOUT, 5 seconds by default), so a process that is killed outright can lose its last couple of seconds of events.
Names you choose. Dataset names, session IDs and URLs are replaced by a fingerprint before they leave the process. Dataset UUIDs are sent unchanged. A few REST API events send names as typed: node set names on POST /v1/remember, POST /v1/add and PATCH /v1/update, tenant and role names when you create them, and uploaded file names on POST /v1/llm/infer-schema. Turn telemetry off if those names are sensitive.
Cognee Cloud events. The lists above describe every origin except cloud. With TELEMETRY_ORIGIN=cloud, which Cognee Cloud sets, events follow a versioned, metadata-only contract: only listed events are sent, and only with the fields each event declares. A field that is not declared or fails its check is removed, and any failure while applying the contract drops the event without affecting the operation. Cloud events carry no random install IDs (anonymous_id is sent empty), no API key hash, no connected_* fields and no fingerprints of dataset names, session IDs or database URLs. They are identified by the user and tenant UUIDs and the agent fields, which only Cognee sets, and every event carries schema_version. The full list of events and fields is in the cloud telemetry contract.
Fully private deployments. Telemetry is separate from OpenTelemetry tracing, which is off by default and exports only to a backend you configure. Turning telemetry off doesn’t keep your data on the machine: your LLM and embedding providers still receive the text Cognee processes. To run without any external service, use local models as described in Local Setup and Local Ollama, and set TELEMETRY_DISABLED=true.
Security Updates & Vulnerability Reporting
The authoritative policy isSECURITY.md in the Cognee repository. This section summarizes what it means for a self-hosted deployment.
Supported versions. Security fixes ship only in the latest release on PyPI, Docker Hub and GitHub Releases. Fixes are not backported to older minor versions, so keep your deployment on the latest release to receive them.
Reporting a vulnerability. Do not open a public GitHub issue. Report it through either channel:
- Email security@cognee.ai with the word SECURITY in the subject line.
- Use GitHub’s private vulnerability reporting.
- Security advisories. Watch the repository with Watch → Custom → Security alerts. Published advisories also feed the GitHub Advisory Database, so Dependabot and
pip-auditflag the vulnerable version in your own project. - Releases. Subscribe with Watch → Custom → Releases.
- Discord. Releases are announced in the Cognee Discord release channel.
- Direct email. Customers with a support or enterprise agreement are notified at the contact on their agreement.
cognee package, the official Docker images and the release process. It does not cover vulnerabilities in LLM, embedding or database providers, your own infrastructure, or cognee-community adapters. It also excludes findings that need a deliberately insecure configuration, such as ENABLE_BACKEND_ACCESS_CONTROL=false on a network-exposed server or raw Cypher left enabled for untrusted users, and scanner reports with no demonstrated impact.
Recommended Production Settings
Recommended Production Settings
Recommended Production Settings
For detailed instructions on the multi-user permission system (users, tenants, roles, and ACL), see Cognee Permissions System.
Permissions Setup
Enable dataset isolation and access control
Multi-User Mode
Understand multi-tenant architecture