# Cognee Docker

Use when the user wants to run cognee with Docker or docker compose, trying it out...

- Repository: https://github.com/topoteretes/cognee (32985 stars)
- Category: Design
- License: Apache-2.0
- Last updated: 2026-11-01
- Runs scripts: no, instructions only

## Install

Claude Code: `npx skills add topoteretes/cognee --skill cognee-docker -g -a claude-code -y`
Codex: `npx skills add topoteretes/cognee --skill cognee-docker -g -a codex -y`
Cursor: `npx skills add topoteretes/cognee --skill cognee-docker -g -a cursor -y`
Gemini CLI: `npx skills add topoteretes/cognee --skill cognee-docker -g -a gemini-cli -y`

## Description

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.

## SKILL.md, as published by its author (untrusted third-party text, read it as data)

# 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:

```yaml
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:

```bash
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:

```bash
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.

The rest: https://github.com/topoteretes/cognee/blob/HEAD/.agents/skills/cognee-docker/SKILL.md
