Install and run cognee
Install
Requires Python 3.10–3.14. Prefer uv:
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):
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:
`…