# Cognee Install

Use when the user wants to install cognee and run their first remember → recall flow...

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

## Install

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

## Description

Use when the user wants to install cognee and run their first remember → recall flow with the Python SDK, fresh setup, virtual env, extras selection, or a minimal working example.

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

# Install and run cognee

## Install

Requires Python 3.10, 3.14. Prefer uv:

```bash
uv venv && source .venv/bin/activate
uv pip install cognee            # from PyPI
# or, working inside this repo:
uv pip install -e .
```

Add extras only when needed, examples: `cognee[postgres]`, `cognee[neo4j]`,
`cognee[docling]` (office/HTML document parsing, slim), `cognee[docs]`
(unstructured), `cognee[anthropic]`, `cognee[ollama]`, `cognee[aws]`. The full
list is in `pyproject.toml` under `[project.optional-dependencies]`.

## Configure

The only required setting is an LLM API key. Create `.env` in the working
directory (or export the variable):

```bash
LLM_API_KEY="your_openai_api_key"
```

Defaults need no services: SQLite (relational), LanceDB (vector), and Ladybug
(graph), all stored locally. OpenAI is the default LLM and embedding provider, if you configure a different LLM but not embeddings (or vice versa), the other
silently stays on OpenAI. For other providers and databases use the
cognee-integrations skill.

## First run

As of cognee 1.x the memory API, `remember`, `recall`, `forget`, `improve`, is the primary surface. All SDK functions are async. Minimal end-to-end script:

```python
import asyncio
import cognee


async def main():
    await cognee.remember("Cognee turns documents into AI memory.")
    results = await cognee.recall("What does cognee do?")
    print(results)


asyncio.run(main())
```

`remember()` is the whole ingestion path in one call, it runs `add()` +
`cognify()`, then `improve()` to index the graph (`self_improvement=True` by
default). It accepts text, file paths, URLs, and binary streams, with an
optional `dataset_name="my_project"`; pass `datasets=["my_project"]` to
`recall()` to stay inside one dataset.

`recall()` auto-routes the query to a search strategy by default. Pass
`query_type=SearchType.CHUNKS` (etc.) to pin one, or `auto_route=False` to
fall back to `GRAPH_COMPLETION`.

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