Skip to main content
Connect Dify to cognee’s AI memory engine with a marketplace tool plugin. Add data, build a knowledge graph with cognify, and run semantic search directly from your Dify apps and workflows — no code required. There are two plugins depending on where your Cognee runs:
PluginBackendAuth
Cognee (cognee)Cognee Cloud (hosted)API key
Cognee (Self-Hosted) (cognee-sdk)Your own Cognee OSS serverEmail + password

Cognee (Cloud)

Targets the hosted Cognee Cloud API.

Setup

  1. Get your Base URL and API key from the Cognee Cloud dashboard.
  2. Install the Cognee plugin from the Dify Marketplace.
  3. Configure the plugin credentials:
FieldValue
base_urlhttps://tenant-xxx.aws.cognee.ai/api
api_keyYour Cognee API key

Tools

ToolDescription
Create DatasetCreate a new dataset (or return an existing one with the same name)
Add DataIngest text content into a dataset
Add FileUpload files (PDF, DOCX, TXT, …) into a dataset
CognifyProcess dataset(s) into a searchable knowledge graph
SearchQuery the knowledge graph (14 search strategies, top_k, only_context, …)
Get DatasetsList all datasets for the authenticated user
Get Dataset DataList all data items in a dataset
Delete DatasetPermanently delete a dataset and its data
Delete DataDelete a specific data item from a dataset

Cognee (Self-Hosted)

Targets a local or self-hosted Cognee OSS server. Tested with Cognee v0.5.5.

Run a Cognee server

services:
  cognee:
    image: cognee/cognee:0.5.5
    container_name: cognee-local
    ports:
      - "8000:8000"
    environment:
      - HOST=0.0.0.0
      - ENVIRONMENT=local
    volumes:
      - .env:/app/.env
Provide your LLM_API_KEY (via .env for Docker) and start the server, then verify it:
curl http://localhost:8000/health   # should return HTTP 200

Setup

In the Dify plugins page, find Cognee (Self-Hosted) and configure:
FieldValue
base_urlhttp://localhost:8000
user_emaildefault_user@example.com
user_passworddefault_password
The plugin validates the configuration with a health check and login.
The plugin runs on your host (not inside Docker), so use localhost. If you run the plugin inside Docker too, use host.docker.internal. Change the default credentials before production use.

Tools

ToolDescription
Add DataAdd text data to a dataset
CognifyBuild memory from one or more datasets
SearchSearch the knowledge graph for relevant information
Update DataReplace an existing data item and re-integrate it into memory
Delete DatasetDelete a dataset and all its data
Delete DataDelete a specific data item
The self-hosted plugin authenticates with email + password (not an API key), adds an Update Data tool, and does not include the cloud-only Add File / Create Dataset tools.

Typical Workflow

Both plugins follow the same pattern inside a Dify app or workflow:
  1. Add Data (or Add File) to ingest content into a dataset
  2. Cognify to build the knowledge graph
  3. Search before LLM calls to pull relevant context from memory
  4. Delete Dataset / Delete Data to clean up

Cloud plugin source

View the Cognee Cloud Dify plugin

Self-hosted plugin source

View the self-hosted Dify plugin