> ## Documentation Index
> Fetch the complete documentation index at: https://docs.cognee.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Llms api

# Cognee API Documentation

> REST API and Python API reference documentation for building against Cognee programmatically.

See the full overview at [https://docs.cognee.ai/llms.txt](https://docs.cognee.ai/llms.txt).

## REST API

* [API Reference](https://docs.cognee.ai/api-reference/introduction.md): Complete API documentation for Cognee's knowledge graph platform
* [Login](https://docs.cognee.ai/api-reference/auth/login.md): Exchange email and password for an access token. Takes username and password as form fields. Returns access\_token and token\_type, and sets the same token as the authentication cookie. Unknown credentials, a wrong pass...
* [Logout](https://docs.cognee.ai/api-reference/auth/logout.md): Clear the authentication cookie for the current user. Requires authentication and returns an empty JSON object. It deletes the cookie with the same name, path and domain used at login; the token itself is not otherwis...
* [Get Me](https://docs.cognee.ai/api-reference/auth/get-me.md): Return the authenticated user's email address. The response body contains only the email field.
* [Register:Register](https://docs.cognee.ai/api-reference/auth/register:register.md)
* [Reset:Forgot Password](https://docs.cognee.ai/api-reference/auth/reset:forgot-password.md)
* [Reset:Reset Password](https://docs.cognee.ai/api-reference/auth/reset:reset-password.md)
* [Verify:Request-Token](https://docs.cognee.ai/api-reference/auth/verify:request-token.md)
* [Verify:Verify](https://docs.cognee.ai/api-reference/auth/verify:verify.md)
* [Get Api Keys For User](https://docs.cognee.ai/api-reference/auth/get-api-keys-for-user.md): List the authenticated user's API keys. Each entry carries key, label, name and id. With HASH\_API\_KEY=true the key field is masked as "\*\*\*\*\*\*\*\*\*\*\*\*", since only the hash is stored; with the default (false) it carries...
* [Create Api Key For User](https://docs.cognee.ai/api-reference/auth/create-api-key-for-user.md): Create an API key for the authenticated user. Returns key, label, name and id. With HASH\_API\_KEY=true the raw key value is only available in this response; with the default (false) GET /api/v1/auth/api-keys returns it...
* [Delete Api Key For User](https://docs.cognee.ai/api-reference/auth/delete-api-key-for-user.md): Delete one of the authenticated user's API keys. Only the caller's own keys can be deleted. Responds with a JSON null body on success. ## Path Parameters - **api\_key\_id** (UUID): UUID of the API key (from GET /api/v1/...
* [Add (low level): ingest files, text or URLs into a dataset without building the graph](https://docs.cognee.ai/api-reference/add/add-low-level:-ingest-files-text-or-urls-into-a-dataset-without-building-the-graph.md): Add data to a dataset for processing and knowledge graph construction. This endpoint accepts file uploads and string inputs (text, server-side file paths, web URLs, GitHub/GitLab repository URLs) and adds them to a sp...
* [Cognify (low level): build the knowledge graph from already-added data](https://docs.cognee.ai/api-reference/cognify/cognify-low-level:-build-the-knowledge-graph-from-already-added-data.md): Transform datasets into structured knowledge graphs through cognitive processing. This endpoint is the core of Cognee's intelligence layer, responsible for converting raw text, documents, and data added through the ad...
* [Memify](https://docs.cognee.ai/api-reference/memify/memify.md): **Deprecated** and removed in the next release. Use POST /api/v1/improve to enrich a dataset. Triplet embeddings were removed, so a call without tasks runs nothing and returns \{}. Runs the named enrichment tasks over...
* [Delete the caller's own search history](https://docs.cognee.ai/api-reference/search/delete-the-callers-own-search-history.md): Delete the authenticated user's search and recall history. Removes every query the caller ran and every result returned to them, the rows GET /api/v1/search and GET /api/v1/recall list. Only the caller's own history:...
* [List the caller's recent search history](https://docs.cognee.ai/api-reference/search/list-the-callers-recent-search-history.md): Get search history for the authenticated user. This endpoint retrieves the search history for the authenticated user, returning a list of previously executed searches with their timestamps. ## Response Returns a list...
* [Search (low level): run one SearchType over the caller's datasets](https://docs.cognee.ai/api-reference/search/search-low-level:-run-one-searchtype-over-the-callers-datasets.md): Search for nodes in the graph database. This endpoint performs semantic search across the knowledge graph to find relevant nodes based on the provided query. It supports different search types and can be scoped to spe...
* [Give Datasets Permission To Principal](https://docs.cognee.ai/api-reference/permissions/give-datasets-permission-to-principal.md): Grant permission on datasets to a principal (user or role). This endpoint allows granting specific permissions on one or more datasets to a principal (which can be a user or role). The authenticated user must have app...
* [Revoke Datasets Permission From Principal](https://docs.cognee.ai/api-reference/permissions/revoke-datasets-permission-from-principal.md): Revoke permission on datasets from a principal (user or role). ## Path Parameters - **principal\_id** (UUID): The UUID of the principal to revoke permission from ## Request Parameters - **permission\_name** (str): The n...
* [Get Principal Datasets](https://docs.cognee.ai/api-reference/permissions/get-principal-datasets.md): List the datasets a principal holds a permission on. A principal is a user, a role or a tenant. What the caller may ask about depends on which: themselves or any user if they can manage users; a role of this tenant th...
* [Create Role](https://docs.cognee.ai/api-reference/permissions/create-role.md): Create a new role. This endpoint creates a new role with the specified name in the caller's current tenant. Roles are used to group permissions and can be assigned to users to manage access control more efficiently. T...
* [Delete Role Endpoint](https://docs.cognee.ai/api-reference/permissions/delete-role-endpoint.md): Delete a role and all its associations. Removes all user-role memberships and ACL entries for this role, then deletes the role. The authenticated user must be able to manage users in the tenant. ## Path Parameters - \*...
* [Add User To Role](https://docs.cognee.ai/api-reference/permissions/add-user-to-role.md): Add a user to a role. This endpoint assigns a user to a specific role, granting them all the permissions associated with that role. The authenticated user must be able to manage users in the role's tenant, and must ho...
* [Remove User From Role Endpoint](https://docs.cognee.ai/api-reference/permissions/remove-user-from-role-endpoint.md): Remove a user from a role. The authenticated user must be able to manage users in the tenant. ## Path Parameters - **user\_id** (UUID): The UUID of the user to remove from the role ## Request Parameters - **role\_id** (...
* [Add User To Tenant](https://docs.cognee.ai/api-reference/permissions/add-user-to-tenant.md): Add a user to a tenant. This endpoint assigns a user to a specific tenant, allowing them to access resources and data associated with that tenant. The authenticated user must be able to manage users in the tenant; the...
* [Remove User From Tenant Endpoint](https://docs.cognee.ai/api-reference/permissions/remove-user-from-tenant-endpoint.md): Remove a user from a tenant. The tenant owner or any user with \`has\_user\_management\_permission in the tenant (e.g. users in the Admin role) can remove users from the tenant. The tenant owner cannot be removed from the...
* [Create Tenant](https://docs.cognee.ai/api-reference/permissions/create-tenant.md): Create a new tenant. This endpoint creates a new tenant with the specified name. Tenants are used to organize users and resources in multi-tenant environments, providing isolation and access control between different...
* [Select Tenant](https://docs.cognee.ai/api-reference/permissions/select-tenant.md): Select current tenant. This endpoint selects a tenant with the specified UUID. Tenants are used to organize users and resources in multi-tenant environments, providing isolation and access control between different gr...
* [Get Tenant Roles](https://docs.cognee.ai/api-reference/permissions/get-tenant-roles.md): List roles in a tenant. Callers who are the tenant owner or have user-management permission (e.g. Admin role) see every role in the tenant. Other callers see only the roles they are a member of. ## Path Parameters - \*...
* [Get Users In Role](https://docs.cognee.ai/api-reference/permissions/get-users-in-role.md): List the users assigned to a role. Visible to members of the role itself, and to callers with user-management permission in the tenant. ## Path Parameters - **tenant\_id** (UUID): The UUID of the tenant - **role\_id** (...
* [Get User Roles](https://docs.cognee.ai/api-reference/permissions/get-user-roles.md): List the roles assigned to a specific user. The authenticated user must have user-management permission in the tenant. ## Path Parameters - **tenant\_id** (UUID): The UUID of the tenant - **user\_id** (UUID): The UUID o...
* [Get Users In Tenant](https://docs.cognee.ai/api-reference/permissions/get-users-in-tenant.md): List all users in a tenant, with their roles. The authenticated user must be the tenant owner or have user-management permission (e.g. Admin role) in the tenant. ## Path Parameters - **tenant\_id** (UUID): The UUID of...
* [Get My Tenants](https://docs.cognee.ai/api-reference/permissions/get-my-tenants.md): List the tenants the authenticated user belongs to. Use the returned ids as the tenant\_id path parameter for the other /permissions/tenants/... endpoints. ## Response Returns a JSON list of tenants: \[\\\{"id", "name"\\}].
* [Get My Capabilities In Tenant](https://docs.cognee.ai/api-reference/permissions/get-my-capabilities-in-tenant.md): List the capabilities the authenticated user has in a tenant. Capabilities are tenant-scoped actions (as opposed to dataset permissions) and are the union of what the tenant and the caller's roles in it grant. The ten...
* [Give Capability To Principal](https://docs.cognee.ai/api-reference/permissions/give-capability-to-principal.md): Grant one or more capabilities to a principal: a user, a role, or a whole tenant. Granting to the tenant reaches every current and future member; granting to a role reaches its members; granting to a user reaches that...
* [Revoke Capability From Principal](https://docs.cognee.ai/api-reference/permissions/revoke-capability-from-principal.md): Take one or more capabilities away from a principal: a user, a role, or a tenant. A member keeps the capability if another level still grants it, since resolution is a union. Revoking something the principal never had...
* [Get Conflicts](https://docs.cognee.ai/api-reference/conflicts/get-conflicts.md): List conflicts, candidate fact ids, source evidence and previous decisions. A dataset with no matching FactConflict nodes returns an empty list. A caller without read permission on the dataset gets 403. ## Query Param...
* [Choose Fact](https://docs.cognee.ai/api-reference/conflicts/choose-fact.md): Accept one competing fact and mark the conflict resolved. Repeating a choice over the same facts is idempotent; repeated after a review listed new evidence, it also rejects that evidence. Choosing another fact revises...
* [Get Datasets](https://docs.cognee.ai/api-reference/datasets/get-datasets.md): Get all datasets accessible to the authenticated user. This endpoint retrieves all datasets that the authenticated user has read permissions for. The datasets are returned with their metadata including ID, name, creat...
* [Create New Dataset](https://docs.cognee.ai/api-reference/datasets/create-new-dataset.md): Create a new dataset or return existing dataset with the same name. This endpoint creates a new dataset with the specified name. If a dataset with the same name already exists for the user, it returns the existing dat...
* [Delete All](https://docs.cognee.ai/api-reference/datasets/delete-all.md): Delete all user's data. This endpoint permanently deletes all datasets that user created and all its associated data. The user must have delete permissions on the dataset to perform this operation. ## Response No cont...
* [Delete Dataset](https://docs.cognee.ai/api-reference/datasets/delete-dataset.md): Delete a dataset by its ID. This endpoint permanently deletes a dataset and all its associated data. The user must have delete permissions on the dataset to perform this operation. ## Path Parameters - **dataset\_id**...
* [Delete Data](https://docs.cognee.ai/api-reference/datasets/delete-data.md): Delete a specific data item from a dataset. This endpoint removes a specific data item from a dataset while keeping the dataset itself intact. The user must have delete permissions on the dataset to perform this opera...
* [Get Dataset Graph](https://docs.cognee.ai/api-reference/datasets/get-dataset-graph.md): Get the knowledge graph visualization for a dataset. This endpoint retrieves the knowledge graph data for a specific dataset, including nodes and edges that represent the relationships between entities in the dataset....
* [Query Dataset With Sparql](https://docs.cognee.ai/api-reference/datasets/query-dataset-with-sparql.md): Run a read-only SPARQL query over a dataset's knowledge graph. The dataset graph is read in full and loaded into an in-memory RDF store for the duration of the request (the same view cognee.modules.graph.rdf exports),...
* [Get Dataset Data](https://docs.cognee.ai/api-reference/datasets/get-dataset-data.md): Get a page of data items in a dataset. This endpoint retrieves data items (documents, files, etc.) that belong to a specific dataset. Each data item includes metadata such as name, type, creation time, and storage loc...
* [Get Dataset Data Count](https://docs.cognee.ai/api-reference/datasets/get-dataset-data-count.md): Count the data items in a dataset. Exists so callers that only need "how many documents" do not have to fetch the items to count them. GET /\{dataset\_id}/data is paginated, so its length is a page size, not a total. ##...
* [Get Dataset Status](https://docs.cognee.ai/api-reference/datasets/get-dataset-status.md): Get the processing status of datasets. This endpoint retrieves the current processing status of one or more datasets, indicating whether they are being processed, have completed processing, or encountered errors durin...
* [Get Dataset Progress](https://docs.cognee.ai/api-reference/datasets/get-dataset-progress.md): Get the processing status of datasets, together with in-flight progress. Same dataset/pipeline selection as **GET /v1/datasets/status**, but each status value is always an object \\\{status, progress\\} instead of a bare...
* [Get Dataset Memory Status](https://docs.cognee.ai/api-reference/datasets/get-dataset-memory-status.md): Get the memory state of datasets: what each one can answer right now. cognify() (and remember()) build memory in two runs per dataset: indexing (chunk search) and cognify (the knowledge graph). This endpoint folds the...
* [Get Datasets Graph Summary](https://docs.cognee.ai/api-reference/datasets/get-datasets-graph-summary.md): Get node/edge counts per dataset, cached per cognify run. Counts are computed once per dataset's latest cognify run and cached in GraphMetrics, keyed by pipeline\_run\_id — orders of magnitude cheaper on repeat polls th...
* [Get Raw Data](https://docs.cognee.ai/api-reference/datasets/get-raw-data.md): Download the raw data file for a specific data item. This endpoint allows users to download the original, unprocessed data file for a specific data item within a dataset. The file is returned as a direct download with...
* [Get Dataset Schema](https://docs.cognee.ai/api-reference/datasets/get-dataset-schema.md): Return the stored graph schema and custom prompt for a dataset. ## Path Parameters - **dataset\_id** (UUID): UUID of the dataset (from GET /api/v1/datasets).
* [Update Dataset Schema](https://docs.cognee.ai/api-reference/datasets/update-dataset-schema.md): Store or update the graph schema and custom prompt for a dataset. ## Path Parameters - **dataset\_id** (UUID): UUID of the dataset (from GET /api/v1/datasets). ## Request Parameters - **customPrompt** (Optional\[str]):...
* [Patch Dataset Schema](https://docs.cognee.ai/api-reference/datasets/patch-dataset-schema.md): Merge a partial graph-model spec into the dataset's stored graph schema. Where PUT replaces the schema wholesale, PATCH upserts by name: each entity in **entities** is added if new, otherwise its fields are upserted b...
* [Get Dataset Processing Status](https://docs.cognee.ai/api-reference/datasets/get-dataset-processing-status.md): Get item-level processing status for a dataset. GET /status reports whether a pipeline *run* is in progress or done for a dataset. This endpoint answers the finer question operators need when triaging incremental load...
* [List Ontologies](https://docs.cognee.ai/api-reference/ontologies/list-ontologies.md): List all uploaded ontologies for the authenticated user. ## Response Returns a dictionary mapping ontology keys to their metadata including filename, size, and upload timestamp. ## Error Codes - \*\*500 Internal Server...
* [Upload Ontology](https://docs.cognee.ai/api-reference/ontologies/upload-ontology.md): Upload a single ontology file for later use in cognify operations. ## Request Parameters - **ontology\_key** (str): Unique, user-defined identifier for the ontology (plain string — values starting with '\[' or '\\\{' are...
* [Delete Ontology](https://docs.cognee.ai/api-reference/ontologies/delete-ontology.md): Delete an uploaded ontology by key. ## Path Parameters - **ontology\_key** (str): The key of the ontology to delete. ## Error Codes - **400 Bad Request**: Ontology key not found - **500 Internal Server Error**: File sy...
* [Export Ontology](https://docs.cognee.ai/api-reference/ontologies/export-ontology.md): Download an uploaded ontology re-serialized in a chosen RDF syntax. The stored file is parsed with rdflib and serialized again, so the output is normalized regardless of the syntax it was uploaded in. ## Path Paramete...
* [Get Settings](https://docs.cognee.ai/api-reference/settings/get-settings.md): Get the current system settings. This endpoint retrieves the current configuration settings for the system, including LLM (Large Language Model) configuration and vector database configuration. These settings determin...
* [Save Settings](https://docs.cognee.ai/api-reference/settings/save-settings.md): Save or update system settings. This endpoint allows updating the system configuration settings. You can update either the LLM configuration, vector database configuration, or both. Only provided settings will be upda...
* [Visualize](https://docs.cognee.ai/api-reference/visualize/visualize.md): Generate an HTML visualization of the dataset's knowledge graph. By default renders a bounded subgraph around relevant seed nodes; pass \`full=true to render the entire graph (legacy behavior). Seeds come from query or...
* [Visualize Json](https://docs.cognee.ai/api-reference/visualize/visualize-json.md): Return the dataset's knowledge graph as a JSON-safe payload. Same authorization, dataset resolution and bounded fetch as GET /visualize — pass the same arguments to get the JSON behind the same subgraph the HTML page...
* [Visualize Semantic](https://docs.cognee.ai/api-reference/visualize/visualize-semantic.md): Return semantic positions and clusters for the same subgraph as GET /visualize/json. Pass the same arguments used for GET /visualize/json to lay out the same subgraph semantically. This is the one call that fetches em...
* [Visualize Brains](https://docs.cognee.ai/api-reference/visualize/visualize-brains.md): Return every dataset the caller may read, each as a small graph preview. No dataset\_id: this is the Brains overview, not one brain. Built on the same union CLO-399 already uses to decide which datasets a user can see...
* [Visualize Brains Summary](https://docs.cognee.ai/api-reference/visualize/visualize-brains-summary.md): Return every dataset the caller may read, described from relational metadata. The cheap counterpart of GET /visualize/brains: the same datasets, but only what an overview shows — name, sources, size, colors — built fr...
* [Visualize Live Events](https://docs.cognee.ai/api-reference/visualize/visualize-live-events.md): Return search/improve events newer than a cursor, for the Memory tab's live timeline. Meant to be polled instead of re-fetching the whole GET /visualize/json payload just to refresh the timeline: pass the previous res...
* [Visualize Multi](https://docs.cognee.ai/api-reference/visualize/visualize-multi.md): Generate a combined HTML visualization of graph data from multiple users' datasets. This endpoint aggregates knowledge graphs from multiple user+dataset pairs into a single interactive visualization, with each user's...
* [Schema Inventory](https://docs.cognee.ai/api-reference/schema/schema-inventory.md): Return the data-derived schema inventory for an authorized dataset. Summarizes the knowledge graph by semantic type: per-type instance counts, representative sample names, and the per-pair relationship distribution. W\...
* [Schema Provenance](https://docs.cognee.ai/api-reference/schema/schema-provenance.md): Return a caller-scoped HTML memory-provenance visualization. A tenant administrator sees the whole workspace; any other member sees only the datasets they hold a read grant on and the files hanging off them, the agent...
* [Schema Provenance Json](https://docs.cognee.ai/api-reference/schema/schema-provenance-json.md): Return a caller-scoped memory-provenance graph as a JSON-safe dict. Same scoping as GET /schema/provenance (the whole tenant for its administrators; for anyone else, tenant or not, the caller's readable datasets, thei...
* [Current ledger row of one entity](https://docs.cognee.ai/api-reference/provenance/current-ledger-row-of-one-entity.md): The live row (or current tombstone) for a ledger key; 404 if never tracked.
* [Version history of one entity](https://docs.cognee.ai/api-reference/provenance/version-history-of-one-entity.md): Oldest-first versions; tombstone versions carry invalidated\_by / invalidation\_reason, so a row reads "asserted by A, retracted by B".
* [Verify checksums and the hash chain](https://docs.cognee.ai/api-reference/provenance/verify-checksums-and-the-hash-chain.md): Tamper evidence. Without dataset\_id (superusers) the whole chain is walked; with it, each of the dataset's rows is checked against the checksum stored at the previous chain position.
* [Ledger statistics](https://docs.cognee.ai/api-reference/provenance/ledger-statistics.md): Row counts (total / live / archived), per-type counts, distinct sources, and live tombstones.
* [Export ledger rows as JSON Lines](https://docs.cognee.ai/api-reference/provenance/export-ledger-rows-as-json-lines.md): Streams one JSON object per line in chain order, so the export can be re-verified offline with cognee.modules.provenance.integrity.
* [Sign and record the current chain head](https://docs.cognee.ai/api-reference/provenance/sign-and-record-the-current-chain-head.md): Superuser only. Appends an HMAC-signed (sequence\_id, checksum) anchor to the external anchor file (PROVENANCE\_ANCHOR\_KEY / PROVENANCE\_ANCHOR\_PATH). Returns the anchor; \{"anchor": null} on an empty ledger.
* [Verify the ledger against its external anchors](https://docs.cognee.ai/api-reference/provenance/verify-the-ledger-against-its-external-anchors.md): Superuser only. Each anchor's signature must verify and the row at its chain position must still carry the anchored checksum.
* [Whether the audit ledger is being written](https://docs.cognee.ai/api-reference/provenance/whether-the-audit-ledger-is-being-written.md): PROVENANCE\_TRACKING as the server sees it. The ledger is off by default; while it is off the other routes answer 409 and nothing is recorded. Rows recorded earlier are served again once it is back on.
* [Ingest Skill](https://docs.cognee.ai/api-reference/skills/ingest-skill.md): Ingest a skill from inline SKILL.md markdown (no file upload needed). JSON-native companion to `POST /api/v1/remember` (content\_type=skills), for no-code clients. Reuses the same skills ingestion pipeline. ## Request...
* [List Dataset Skills](https://docs.cognee.ai/api-reference/skills/list-dataset-skills.md): Return the skills available in an authorized dataset, with publisher metadata. ## Query Parameters - **dataset\_id** (UUID): Dataset UUID to scope the skills to. List your datasets via GET /api/v1/datasets to find it....
* [Get Dataset Skill](https://docs.cognee.ai/api-reference/skills/get-dataset-skill.md): Return one skill, including its full procedure body. ## Path Parameters - **skill\_id** (str): ID of the skill (from GET /api/v1/skills/). ## Query Parameters - **dataset\_id** (UUID): Dataset UUID the skill belongs to.
* [Delete Dataset Skill](https://docs.cognee.ai/api-reference/skills/delete-dataset-skill.md): Delete one skill (graph node + embeddings) from an authorized dataset. ## Path Parameters - **skill\_id** (str): ID of the skill (from GET /api/v1/skills/). ## Query Parameters - **dataset\_id** (UUID): Dataset UUID the...
* [Get Skill Proposal](https://docs.cognee.ai/api-reference/skills/get-skill-proposal.md): Return one skill-improvement proposal with its before/after procedures. ## Path Parameters - **proposal\_id** (str): ID of the skill-improvement proposal. ## Query Parameters - **dataset\_id** (UUID): Dataset UUID the p...
* [Store User Configuration](https://docs.cognee.ai/api-reference/configuration/store-user-configuration.md): Store (upsert) a named configuration for the authenticated user. ## Request Parameters - **name** (str): Name of the configuration. If a configuration with the same name already exists for this user, it is updated in...
* [Get User Configuration](https://docs.cognee.ai/api-reference/configuration/get-user-configuration.md): Get a stored configuration by its UUID. ## Path Parameters - **config\_id** (UUID): The "id" of a configuration previously returned by GET /api/v1/configuration/get\_user\_configuration/. ## Response Returns the stored c...
* [Get User All Configuration](https://docs.cognee.ai/api-reference/configuration/get-user-all-configuration.md): List all configurations stored by the authenticated user and by the agent users they are the parent of. ## Response Returns a JSON list of records of the form \\\{"id", "ownerId", "name", "configuration", "createdAt", "...
* [Delete](https://docs.cognee.ai/api-reference/delete/delete.md): Delete data by its ID from the specified dataset. Args: data\_id: The UUID of the data to delete dataset\_id: The UUID of the dataset containing the data mode: "soft" (default) or "hard" - hard mode also deletes degree-...
* [Run Validate](https://docs.cognee.ai/api-reference/validate/run-validate.md): Cross-check the graph and vector stores of a dataset for consistency. Detects orphaned edges (referencing deleted nodes), nodes whose id no longer matches cognee's own dedup contract, and nodes present in the graph bu...
* [Update](https://docs.cognee.ai/api-reference/update/update.md): Update data in a dataset. This endpoint updates existing documents in a specified dataset by providing the data\_id of the existing document to update and the new document with the changes as the data. The document is...
* [Create Response](https://docs.cognee.ai/api-reference/responses/create-response.md): OpenAI-compatible responses endpoint with function calling support. This endpoint provides OpenAI-compatible API responses with integrated function calling capabilities for Cognee operations. ## Request Parameters - \*...
* [Generate Custom Prompt](https://docs.cognee.ai/api-reference/llm/generate-custom-prompt.md): Generate a custom extraction prompt from a provided graph model schema JSON. ## Request Parameters - **graphModel** (Dict\[str, Any]): Graph model schema as JSON object. - **parameters** (Dict\[str, Any]): Additional kw\...
* [Infer Schema](https://docs.cognee.ai/api-reference/llm/infer-schema.md): Analyze sample text and/or uploaded files, and propose a JSON Schema describing the entity types and relationships present. The returned schema can be passed directly to `/v1/llm/custom-prompt or /v1/cognify`. ## Requ...
* [Sync To Cloud](https://docs.cognee.ai/api-reference/sync/sync-to-cloud.md): Sync local data to Cognee Cloud. This endpoint triggers synchronization of local Cognee data to your cloud instance. It uploads your local datasets, knowledge graphs, and processed data to the cloud for backup, sharin...
* [Get Sync Status Overview](https://docs.cognee.ai/api-reference/sync/get-sync-status-overview.md): Check if there are any running sync operations for the current user. This endpoint provides a simple check to see if the user has any active sync operations without needing to know specific run IDs. ## Response Return...
* [Users:Current User](https://docs.cognee.ai/api-reference/users/users:current-user.md)
* [Users:Patch Current User](https://docs.cognee.ai/api-reference/users/users:patch-current-user.md)
* [Users:User](https://docs.cognee.ai/api-reference/users/users:user.md)
* [Users:Patch User](https://docs.cognee.ai/api-reference/users/users:patch-user.md)
* [Users:Delete User](https://docs.cognee.ai/api-reference/users/users:delete-user.md)
* [Get User Id](https://docs.cognee.ai/api-reference/users/get-user-id.md): Look up a user id by email address. Returns user\_id as a string, for sharing. Only users the caller may see resolve: the caller themselves, the members of the caller's tenants, or, for a caller in no tenant, users in...
* [Get Connection Check Endpoint](https://docs.cognee.ai/api-reference/checks/get-connection-check-endpoint.md): Verify a cloud API key against the cloud service. The key is read from the X-Api-Key request header; a missing header returns 400. On success the response body is JSON null; a non-200 answer from the cloud service, or...
* [Health Check](https://docs.cognee.ai/api-reference/health/health-check.md): Health check endpoint for liveness/readiness probes.
* [Detailed Health Check](https://docs.cognee.ai/api-reference/health/detailed-health-check.md): Comprehensive health status with component details.
* [List Agents Endpoint](https://docs.cognee.ai/api-reference/agent-management/list-agents-endpoint.md): List the agents owned by the authenticated user. Each entry carries agentId, agentEmail (in the form \ @cognee.agent) and apiKeyLabel, which is null when the agent has no API key. Returns an empty list when the user o...
* [Create Agent Endpoint](https://docs.cognee.ai/api-reference/agent-management/create-agent-endpoint.md): Create an agent sub-user and issue its API key. Returns agentId, agentEmail and agentApiKey. With HASH\_API\_KEY=true the raw key is shown only in this response; with the default (false) GET /api/v1/auth/api-keys also r...
* [List Agents Connections](https://docs.cognee.ai/api-reference/agent-connections/list-agents-connections.md): List agent connections for the caller and their agents. Returns agents (the requested page), memory\_sources, total, limit, offset and has\_more. Only connections belonging to the caller or their child agents are visibl...
* [Get My Connection Detail](https://docs.cognee.ai/api-reference/agent-connections/get-my-connection-detail.md): Get detail for one of the authenticated user's own connections. Returns agent, memory\_sources, recent\_sessions (at most the connection's one session), recent\_traces and recent\_qas, the last two capped at the 20 most r...
* [Get Connection Detail](https://docs.cognee.ai/api-reference/agent-connections/get-connection-detail.md): Get detail for one connection of a given agent. Returns agent, memory\_sources, recent\_sessions (at most the connection's one session), recent\_traces and recent\_qas, the last two capped at the 20 most recent entries. W\...
* [Register Agent Endpoint](https://docs.cognee.ai/api-reference/agent-connections/register-agent-endpoint.md): Register an agent connection for the authenticated user. Responds 201 with the registered connection. The connection is identified by agent\_session\_name plus the authenticated user's id, so re-registering the same nam...
* [Unregister Agent Endpoint](https://docs.cognee.ai/api-reference/agent-connections/unregister-agent-endpoint.md): Deactivate an agent connection by name. The connection is identified by agent\_session\_name plus the authenticated user's id. Returns activeAgents, the number of the caller's own connections still active in this proces...
* [Get Agent Endpoint](https://docs.cognee.ai/api-reference/agent-management/get-agent-endpoint.md): Get one agent owned by the caller. Returns agentId, agentEmail (in the form \ @cognee.agent) and apiKeyLabel, which is null when the agent has no API key. An unknown agent id returns 404; an agent belonging to another...
* [Delete Agent Endpoint](https://docs.cognee.ai/api-reference/agent-management/delete-agent-endpoint.md): Delete an agent and its connections. Removes the agent's connection records and then the agent user itself, and responds with a JSON null body. An unknown agent id returns 404; an agent belonging to another user retur...
* [Get Pipeline Runs](https://docs.cognee.ai/api-reference/activity/get-pipeline-runs.md): Recent pipeline\_runs rows, newest first, with dataset owner info. The table records both pipeline runs and one row per non-pipeline operation (search, recall, remember, forget, delete, prune). Use the **kind** field t...
* [Get Spans](https://docs.cognee.ai/api-reference/activity/get-spans.md): Return the caller's and their own agents' traces from the in-memory buffer. A trace belongs to the users its requests authenticated as (`bind_trace_owner`); one with no owner is returned to nobody.
* [Get Tenant Users](https://docs.cognee.ai/api-reference/activity/get-tenant-users.md): Return users in the caller's tenant as \[\\\{"id", "email", "roles"\\}]. Requires user-management permission in that tenant (tenant owner or an admin role); a denial propagates as 403. A caller outside any tenant (single-...
* [Get Agents](https://docs.cognee.ai/api-reference/activity/get-agents.md): Return the caller and the agents they own (`parent_user_id == caller`). Every query below is scoped to that id set, so nothing about other users — accounts, key counts or activity — is read or returned.
* [Export Dataset Markdown](https://docs.cognee.ai/api-reference/activity/export-dataset-markdown.md): Export a dataset's knowledge graph as a Markdown memory report. ## Path Parameters - **dataset\_id** (UUID): UUID of the dataset (from GET /api/v1/datasets).
* [List Sessions](https://docs.cognee.ai/api-reference/sessions/list-sessions.md): Paginated list of sessions. ## Request Parameters - **range** (Literal): Time window on last\_activity\_at: 24h, 7d, 30d, or all (default: 30d). - **status** (Optional\[str]): Effective-status filter: running, completed,...
* [Get Stats](https://docs.cognee.ai/api-reference/sessions/get-stats.md): Aggregate counters for the dashboard stat cards + status bar. ## Request Parameters - **range** (Literal): Time window on last\_activity\_at: 24h, 7d, 30d, or all (default: 30d). ## Response Returns a JSON object with:...
* [Cost By Model](https://docs.cognee.ai/api-reference/sessions/cost-by-model.md): Cost + token totals grouped by the model that produced them. Aggregates \`session\_model\_usage rows (one per session × model), so a session that used multiple models splits its cost correctly. Filters on session\_records...
* [List Sessions With Agent Info](https://docs.cognee.ai/api-reference/sessions/list-sessions-with-agent-info.md): Session records merged with their agent-connection metadata (CLO-434). Joins \`session\_records to the agent-connections registry on session\_id so the cloud UI can group/filter usage by client (Claude Code, Codex, Slack...
* [Cost By User Agent](https://docs.cognee.ai/api-reference/sessions/cost-by-user-agent.md): Cost + token totals grouped by (user, agent type) — feeds a "who spends the most, with which agent" chart (CLO-434 follow-up). Visibility matches every other endpoint in this router: the caller, their child agents, an...
* [Delete Session Endpoint](https://docs.cognee.ai/api-reference/sessions/delete-session-endpoint.md): Delete one of the caller's sessions — DELETE /api/v1/sessions/\\\{session\_id\\}. Removes the session's Q\&A turns, agent traces, session context and watermarks, its Q\&A vectors, and its dashboard and usage rows. Only the...
* [Get Session Detail](https://docs.cognee.ai/api-reference/sessions/get-session-detail.md): Get one session with its recent Q\&As and trace steps. Returns the session record plus label (first question cut to 120 characters, else the first trace's origin function, else null), msg\_count and tool\_calls (counts o...
* [Remember: ingest data and build the knowledge graph (add + cognify + improve)](https://docs.cognee.ai/api-reference/remember/remember:-ingest-data-and-build-the-knowledge-graph-add-cognify-improve.md): Ingest data and build the knowledge graph in a single call. This endpoint combines the add and cognify steps. Data is ingested first, then automatically processed into a structured knowledge graph. ## Request Paramete...
* [Remember a session entry (QA, trace, feedback) into the session cache](https://docs.cognee.ai/api-reference/remember/remember-a-session-entry-qa-trace-feedback-into-the-session-cache.md): Store a typed memory entry in the session cache. Accepts a discriminated union of \`QAEntry, TraceEntry, FeedbackEntry, or SkillRunEntry and dispatches to the matching remember path. Session-backed entries require sess...
* [List the caller's recent recall history](https://docs.cognee.ai/api-reference/recall/list-the-callers-recent-recall-history.md): Get search/recall history for the authenticated user.
* [Recall: query memory with auto-routed search type and session-first lookup](https://docs.cognee.ai/api-reference/recall/recall:-query-memory-with-auto-routed-search-type-and-session-first-lookup.md): Recall information from the knowledge graph. This is a memory-oriented alias for the search endpoint. All search types and options from v1 are supported. ## Request Parameters Field names are shown camelCased in the s...
* [Improve: enrich and index the graph, optionally bridging sessions into it](https://docs.cognee.ai/api-reference/improve/improve:-enrich-and-index-the-graph-optionally-bridging-sessions-into-it.md): Run the self-improvement loop over a dataset and report what each stage did. The nine stages run in a fixed order; each first *gates* (declines work it cannot do under the current settings, with no LLM calls) and only...
* [Forget data: one item, a dataset, its memory only, or everything](https://docs.cognee.ai/api-reference/forget/forget-data:-one-item-a-dataset-its-memory-only-or-everything.md): Remove data from the knowledge graph. - Set everything: true to delete all user data. - Set dataset or datasetId alone to delete an entire dataset. - Set dataset/datasetId + dataId to delete a single item. - Set datas...
* [Get Channels](https://docs.cognee.ai/api-reference/slack/get-channels.md): List the channels Cognee's commands can be allowed in, flagging the current allowlist. Every public channel, and the private channels the app is in that the person who connected the workspace is in too: a private chan...
* [Set Allowed Channels](https://docs.cognee.ai/api-reference/slack/set-allowed-channels.md): Restrict Cognee's commands and "Remember this" to exactly these channel ids. The allowlist decides where Cognee can be used in Slack, never which channels are synced into memory: that is the channel selection's alone....
* [Get Settings](https://docs.cognee.ai/api-reference/slack/get-settings.md): The connection owner's Slack sync settings.
* [Set Settings](https://docs.cognee.ai/api-reference/slack/set-settings.md): Decide what happens to a selected channel that was deleted in Slack or that the app was removed from. Off (the default), the channel keeps its memory and every sync reports it under `failed_channel_unavailable` until...
* [Sync Progress](https://docs.cognee.ai/api-reference/integrations/sync-progress.md): Report sync progress for a connected integration. Returns latest (the most recent run's progress snapshot, null when there is none), activeRuns (unfinished runs this process can confirm are executing) and unknownActiv...
* [Get Default Sync Policy](https://docs.cognee.ai/api-reference/integrations/get-default-sync-policy.md): The caller's default sync policy, which every connection without its own inherits.
* [Set Default Sync Policy](https://docs.cognee.ai/api-reference/integrations/set-default-sync-policy.md): Create or replace the caller's default sync policy. A pause is kept.
* [Remove Default Sync Policy](https://docs.cognee.ai/api-reference/integrations/remove-default-sync-policy.md): Remove the caller's default: connections without their own stop syncing on schedule.
* [Pause Default Sync Policy](https://docs.cognee.ai/api-reference/integrations/pause-default-sync-policy.md): Pause every connection of the caller, those with their own policy too.
* [Resume Default Sync Policy](https://docs.cognee.ai/api-reference/integrations/resume-default-sync-policy.md): Resume the caller's default; its next slot is the first one after now.
* [Integrations Status](https://docs.cognee.ai/api-reference/integrations/integrations-status.md): Aggregate connection status: every OAuth provider + every known plugin. One call powers the whole integrations page. Every registered provider and every known plugin appears, connected or not, with display fields only...
* [Provision Plugin](https://docs.cognee.ai/api-reference/integrations/provision-plugin.md): Provision a dedicated agent identity for a plugin, and add a key for it. Idempotent get-or-create: the first call creates an agent sub-user for \`(user, plugin\_key); every later call returns the same agent. Every call...
* [List Plugin Keys](https://docs.cognee.ai/api-reference/integrations/list-plugin-keys.md): List the API keys of the caller's agent for a plugin — one per machine. Metadata only (id, name, label, created, last used); the key itself is never returned. Empty when the plugin was never provisioned. An agent call...
* [Revoke Plugin Key](https://docs.cognee.ai/api-reference/integrations/revoke-plugin-key.md): Revoke one key of the caller's agent for a plugin (e.g. a retired machine). Scoped to that plugin's agent of the authenticated user: a key of any other principal is a 404, exactly like an unknown id. Other machines' k...
* [Disconnect Plugin](https://docs.cognee.ai/api-reference/integrations/disconnect-plugin.md): Disconnect a plugin: revoke its API keys, keep its data. The agent user and everything it wrote stay — deleting data on disconnect would be surprising; full removal stays on `DELETE /api/v1/agents/\{agent_id\}`. Re-prov...
* [Authorize](https://docs.cognee.ai/api-reference/integrations/authorize.md): Mint the provider's authorize URL for the requesting user. Also sets the nonce cookie the callback checks. The state alone says which user *started* an install; the cookie is what says the browser finishing it is the...
* [List Connections](https://docs.cognee.ai/api-reference/integrations/list-connections.md): The requesting user's active connections for a provider, newest first. A provider authorized per workspace (Notion, Slack) can hold several. The `provider_account_id of one is what the other routes take as account_id`...
* [Connection Status](https://docs.cognee.ai/api-reference/integrations/connection-status.md): Connection state for the Integrations page. ## Path Parameters - **provider** (str): Key of a registered OAuth provider (see GET /api/v1/integrations/status). ## Query Parameters - **account\_id** (str, optional): The...
* [Disconnect](https://docs.cognee.ai/api-reference/integrations/disconnect.md): Disconnect the account connected by the requesting user. Marks the stored installation revoked by its owner, then best-effort asks the provider to kill the token on its own side via \`integration.revoke\_remote. That ca...
* [Integration Resources](https://docs.cognee.ai/api-reference/integrations/integration-resources.md): List selectable resources for a connected integration. \`/folders and /labels are readable aliases for SDK callers that want provider vocabulary; /resources is the stable generic path. The returned selection is three-s...
* [Set Integration Resources](https://docs.cognee.ai/api-reference/integrations/set-integration-resources.md): Persist a full resource selection for a connected integration. ## Path Parameters - **provider** (str): Key of a registered OAuth provider (see GET /api/v1/integrations/status). ## Query Parameters - **account\_id** (O...
* [Integration Resources](https://docs.cognee.ai/api-reference/integrations/integration-resources.md): List selectable resources for a connected integration. \`/folders and /labels are readable aliases for SDK callers that want provider vocabulary; /resources is the stable generic path. The returned selection is three-s...
* [Set Integration Resources](https://docs.cognee.ai/api-reference/integrations/set-integration-resources.md): Persist a full resource selection for a connected integration. ## Path Parameters - **provider** (str): Key of a registered OAuth provider (see GET /api/v1/integrations/status). ## Query Parameters - **account\_id** (O...
* [Integration Resources](https://docs.cognee.ai/api-reference/integrations/integration-resources.md): List selectable resources for a connected integration. \`/folders and /labels are readable aliases for SDK callers that want provider vocabulary; /resources is the stable generic path. The returned selection is three-s...
* [Set Integration Resources](https://docs.cognee.ai/api-reference/integrations/set-integration-resources.md): Persist a full resource selection for a connected integration. ## Path Parameters - **provider** (str): Key of a registered OAuth provider (see GET /api/v1/integrations/status). ## Query Parameters - **account\_id** (O...
* [Sync Integration](https://docs.cognee.ai/api-reference/integrations/sync-integration.md): Start a provider sync without changing its stored selection. ## Path Parameters - **provider** (str): Key of a registered OAuth provider (see GET /api/v1/integrations/status). ## Query Parameters - **account\_id** (Opt...
* [Get Connection Sync Policy](https://docs.cognee.ai/api-reference/integrations/get-connection-sync-policy.md): The policy the connection syncs by: its own, else its owner's default. `level` says which. No policy at either level is a 404. ## Query Parameters - **account\_id** (str, optional): As for POST /\\\{provider\\}/sync.
* [Set Connection Sync Policy](https://docs.cognee.ai/api-reference/integrations/set-connection-sync-policy.md): Create or replace the connection's own policy, which overrides the default. ## Query Parameters - **account\_id** (str, optional): As for POST /\\\{provider\\}/sync.
* [Remove Connection Sync Policy](https://docs.cognee.ai/api-reference/integrations/remove-connection-sync-policy.md): Remove the connection's own policy; it inherits the owner's default again. ## Query Parameters - **account\_id** (str, optional): As for POST /\\\{provider\\}/sync.
* [Pause Connection Sync Policy](https://docs.cognee.ai/api-reference/integrations/pause-connection-sync-policy.md): Pause this connection only. It needs a policy of its own: a 404 otherwise. ## Query Parameters - **account\_id** (str, optional): As for POST /\\\{provider\\}/sync.
* [Resume Connection Sync Policy](https://docs.cognee.ai/api-reference/integrations/resume-connection-sync-policy.md): Resume this connection; its next slot is the first one after now. ## Query Parameters - **account\_id** (str, optional): As for POST /\\\{provider\\}/sync.
* [Root](https://docs.cognee.ai/api-reference/health/root.md): Root endpoint that returns a welcome message.

## Python API

* [Python API Reference](https://docs.cognee.ai/python-api.md): Complete Python API reference for the cognee package
* [remember()](https://docs.cognee.ai/python-api/remember.md): Store permanent or session memory with the v1.0 ingestion API
* [recall()](https://docs.cognee.ai/python-api/recall.md): Query memory with the v1.0 retrieval API
* [improve()](https://docs.cognee.ai/python-api/improve.md): Enrich an existing graph and bridge session memory with the v1.0 API
* [forget()](https://docs.cognee.ai/python-api/forget.md): Remove data with the unified v1.0 deletion API
* [serve()](https://docs.cognee.ai/python-api/serve.md): Connect the Cognee SDK to Cognee Cloud or a remote Cognee instance
* [push()](https://docs.cognee.ai/python-api/push.md): Upload a local dataset's knowledge graph to Cognee Cloud
* [add()](https://docs.cognee.ai/python-api/add.md): Ingest data into the Cognee knowledge base
* [cognify()](https://docs.cognee.ai/python-api/cognify.md): Transform raw data into a structured knowledge graph
* [search()](https://docs.cognee.ai/python-api/search.md): Reference for search(), which queries the knowledge graph with a chosen SearchType.
* [memify()](https://docs.cognee.ai/python-api/memify.md): Enrich an existing knowledge graph with custom tasks
* [cognee.datasets](https://docs.cognee.ai/python-api/datasets.md): Dataset management: list, create, fetch, and delete datasets
* [conflicts](https://docs.cognee.ai/python-api/conflicts.md): Conflict management: list a dataset's fact conflicts and record which competing fact you accept
* [cognee.users](https://docs.cognee.ai/python-api/users.md): User management: get the default user, look up users, check existence, and create users
* [agents](https://docs.cognee.ai/python-api/agents.md): Agent management: create, list, inspect, and delete agents, and manage their connections
* [update()](https://docs.cognee.ai/python-api/update.md): Update existing data in the knowledge base
* [delete()](https://docs.cognee.ai/python-api/delete.md): Delete data from the knowledge base (deprecated)
* [prune](https://docs.cognee.ai/python-api/prune.md): Methods for deleting stored data and resetting Cognee system state.
* [run\_migrations](https://docs.cognee.ai/python-api/run-migrations.md): Apply pending relational and vector database schema migrations
* [Visualization Payloads](https://docs.cognee.ai/python-api/visualize.md): JSON payload builders behind the HTML visualization, and the HTTP endpoints that expose them
* [config](https://docs.cognee.ai/python-api/config.md): Configure LLM providers, databases, chunking, and more
* [SearchType](https://docs.cognee.ai/python-api/search-type.md): Enum of the search modes you can pass to cognee.search().
* [run\_custom\_pipeline()](https://docs.cognee.ai/python-api/custom-pipeline.md): Run your own sequence of tasks as a Cognee pipeline with run\_custom\_pipeline().
* [Data Models](https://docs.cognee.ai/python-api/data-models.md): Pydantic models and types accepted or returned by the cognee Python API.
* [report()](https://docs.cognee.ai/python-api/report.md): Generate a Graph Insight Report from the knowledge graph
* [validate()](https://docs.cognee.ai/python-api/validate.md): Cross-check a dataset's graph and vector stores for integrity problems


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.