本文へ移動
cccskills
無料GitHub で公開

cognee-docker

Use when the user wants to run cognee with Docker or docker compose — trying it out from the prebuilt image, starting the API server in a container, or bringing up the full stack (UI, MCP, Postgres, Neo4j) with compose profiles.

インストール方法を見る

含まれるファイル(1)

  • SKILL.md3.5 KB

SKILL.md(原文)

インストールする前に、エージェントに与えられる指示の中身を確認できます。

Start cognee from the Docker image

Fastest path: prebuilt image, one file

For a local try-out, do NOT clone or build anything. Follow docs/minimal-docker-compose.md: save this as docker-compose.yml in an empty directory:

services:
  cognee:
    image: cognee/cognee:main
    ports:
      - "8000:8000"
    environment:
      LLM_API_KEY: ${LLM_API_KEY:?set LLM_API_KEY to your OpenAI API key}
      # Single-user try-out: no auth, shared local databases.
      ENABLE_BACKEND_ACCESS_CONTROL: "false"

Then:

export LLM_API_KEY="sk-..."   # OpenAI key (default LLM + embedding provider)
docker compose up
curl http://localhost:8000/health

Interactive API reference: http://localhost:8000/docs. First requests:

echo "Cognee turns documents into AI memory." > note.txt
# remember = ingest + build the graph in one call (multipart form)
curl -X POST http://localhost:8000/api/v1/remember -F "data=@note.txt" -F "datasetName=main_dataset"
# recall = query it (JSON)
curl -X POST http://localhost:8000/api/v1/recall -H "Content-Type: application/json" \
  -d '{"query": "What does Cognee do?", "datasets": ["main_dataset"]}'

/api/v1/recall takes the question as query. Omit search_type (or pass null) and the query is auto-routed by the same rule-based router the SDK recall() uses, with HYBRID_COMPLETION as the fallback; pass a value such as "search_type": "GRAPH_COMPLETION" to pin a strategy. The rule table is in docs/recall-vs-search.md.

Request DTOs accept both snake_case and camelCase for every field (alias_generator=to_camel + populate_by_name in cognee/api/DTO.py), so search_type and searchType are equally valid.

The legacy /api/v1/add + /api/v1/cognify + /api/v1/search endpoints still exist and are what remember/recall call underneath; use them only when you need a single stage on its own. /api/v1/improve and /api/v1/forget complete the memory API.

Data lives inside the container by default. To persist it, set DATA_ROOT_DIRECTORY=/cognee-data/data and SYSTEM_ROOT_DIRECTORY=/cognee-data/system and mount a named volume at /cognee-data (full example in docs/minimal-docker-compose.md).

Full stack from the repo

The repository's docker-compose.yml builds from source and adds opt-in profiles. From the repo root (needs a .env with at least LLM_API_KEY; copy .env.template):

docker compose up                                  # API server only, port 8000
docker compose --profile ui up                     # + frontend on port 3000
docker compose --profile mcp up                    # + MCP server on port 8001
docker compose --profile postgres --profile neo4j up   # + databases

Postgres profile: pgvector/pg17, user/password/db cognee/cognee/cognee_db on 5432. Neo4j profile: neo4j/pleaseletmein on 7474/7687. When cognee runs in a container and the database on the host, use DB_HOST=host.docker.internal.

Gotchas

  • With ENABLE_BACKEND_ACCESS_CONTROL unset (defaults to true), every API call requires authentication — the single-user try-out sets it to false.
  • The image defaults to OpenAI for both LLM and embeddings; configuring only one of them leaves the other on OpenAI, so keep a valid OpenAI key or configure both (see the cognee-integrations skill).

レビュー

まだレビューはありません。使ってみた感想をお寄せください。

同じリポジトリのスキル

概要と使いどころ

Use when the user wants to drive cognee from the terminal with cognee-cli — remember/recall/forget/improve memory commands, managing datasets and config, or database migrations.

日本語の概要は準備中です。原文の説明を表示しています。

topoteretes/cognee3.2万2026年10月10日 更新

Use when the user needs something that ships outside cognee core — community database adapters (Qdrant, Milvus, Weaviate, Redis, Pinecone, FalkorDB, Memgraph, DuckDB, NetworkX, …), data-source connectors (Slack, Gmail, Notion, Confluence, Google Drive), custom tasks/pipelines/retrievers (Exa, ScrapeGraph, codify), Keywords AI observability — or wants to contribute a package to the cognee-community repo.

日本語の概要は準備中です。原文の説明を表示しています。

topoteretes/cognee3.2万2026年10月10日 更新

Use when defining the shape of cognee's knowledge graph with graph_model= — writing DataPoint node classes, choosing identity and index fields so nodes merge and are searchable, declaring typed Edge fields and FromIdentity references, building a model from a JSON schema, or debugging duplicated nodes, missing edges, or InvalidReferenceTypeError.

日本語の概要は準備中です。原文の説明を表示しています。

topoteretes/cognee3.2万2026年10月10日 更新

Use when building your own cognee processing — writing custom tasks, chaining them into a pipeline with run_custom_pipeline or the lightweight run_pipeline (from cognee.pipelines import run_pipeline), storing custom DataPoints with add_data_points, running custom extraction/enrichment over the existing graph with memify, checking pipeline run status, or debugging how data flows between tasks (batch_size, data_per_batch, ctx, Drop, enriches).

日本語の概要は準備中です。原文の説明を表示しています。

topoteretes/cognee3.2万2026年10月10日 更新

Use when removing data from cognee memory with forget() in the SDK, HTTP API, or CLI — finding which dataset and document hold the content to delete (listing datasets and data items, reading raw content), choosing between deleting one document, a whole dataset, or only the graph/vector memory, and doing it safely.

日本語の概要は準備中です。原文の説明を表示しています。

topoteretes/cognee3.2万2026年10月10日 更新

Use when working with cognee's session memory or improve() — storing conversation turns, agent traces and feedback with session_id, bridging sessions into the permanent graph, reading an ImproveResult, understanding why an improve stage was skipped, already_completed or lock_held, or tuning the IMPROVE_* settings.

日本語の概要は準備中です。原文の説明を表示しています。

topoteretes/cognee3.2万2026年10月10日 更新

topoteretes のスキルをすべて見る

このスキルの問題を報告する