Skip to main content

Build

Cognee Install

CogneeOfficialCertified

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.

  • New
  • v1.0.4
  • Reviewed Aug 18
  • No reviews yet

Capabilities

  • Configure

    The only required setting is an LLM API key

  • First run

    As of cognee 1.x the memory API — remember, recall, forget, improve —

  • Verify / troubleshoot

Getting started

Full instructions

Example command

Install

uv venv && source .venv/bin/activate

Instructions: SKILL.mdv1.0.4

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.

Session memory is the other half of the API — remember(..., session_id="chat_1")
writes to a fast session cache rather than running add+cognify inline, and
recall(..., session_id="chat_1") reads it back (session hits short-circuit the
graph search). With the default self_improvement=True it still bridges that
data into the permanent graph in the background; improve(dataset=..., session_ids=[...]) does the same explicitly. Session memory runs on the
session cache, which is on by default (CACHING=true); setting
CACHING=false disables it entirely and makes remember(session_id=...)
raise.

Start with examples/advanced_guides/remember_recall_improve_example.py, which walks
through permanent memory, session memory, and the sync between them.

The add() / cognify() / search() primitives still exist and
are what remember/recall/improve call underneath — reach for them when you
need to drive a stage in isolation (e.g. custom pipeline tasks), not for
ordinary ingestion. cognee.delete is formally deprecated (since 0.3.9);
forget() is the v1 replacement, unifying the old delete/empty_dataset
paths behind one call. When to use recall() versus the low-level search()
is covered in docs/recall-vs-search.md.

Verify / troubleshoot

  • cognee-cli remember "hello" && cognee-cli recall "hello" exercises the same
    flow from the shell.
  • To wipe local state during experiments: cognee-cli forget --all (or
    await cognee.forget(everything=True)).
  • Reads slow or spending tokens on every query → set AUTO_FEEDBACK=false
    (keep CACHING=true); by default cognee makes one structured-output LLM
    call per answered query to self-tune its memory.
  • Structured LLM output errors usually mean the model/provider needs an
    explicit instructor mode: LLM_INSTRUCTOR_MODE="json_schema_mode".

Explore more skills

Browse all
This skill doesn’t include stateful context yet, instructions only. Learn about stateful skills.

Security

Loading security scan...

Reviews (0)

More from Cognee

View source →
self-hosted-companionChat with a companion that knows your notes folder (a journal, an Obsidian vault, any .md or .txt files) and every earlier chat, using cognee memory with local databases. Use when someone wants to ask questions about their own notes, or to…0 installsgoogle-workspace-memoryRemember a user's Google Calendar, Gmail and Drive in one cognee memory and answer questions across them, by default preparing their client meetings of the coming week (which orders are late or at risk, why, and what to say). Use when…0 installscompany-brain-follow-up-agentTurn your latest Granola call into next steps (owner, team, due date, and the Linear issue that already tracks each one) and post them to Slack, using cognee memory of your calls, Linear issues and Gmail inbox. Use when someone asks for…0 installsdocstring-criticReview a docstring-author patch in the Cognee pilot. Independently verify truthfulness and promotional tone, preserve supported positive framing, and write the claim ledger. Pass 2; corrects claims without expanding coverage.0 installscognee-permissionsUse when working with cognee's users, permissions, and multi-tenancy — creating users, tenants and roles, sharing datasets (read/write/delete/share grants), acting as a specific user in the SDK or authenticating over HTTP (login, API…0 installsdocstring-authorWrite or improve Python docstrings on the ten files in pilot_files.md, making supported Cognee benefits and connections between capabilities explicit. Pass 1 of the docstring pilot; a separate critic verifies the patch and writes the claim…0 installs

Frequently asked questions about cognee-install

What does the cognee-install skill do?

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. It's a reusable SKILL.md instruction set that loads into your AI coding assistant on demand, no prompt engineering, no copy-pasting every session.

How do I install the cognee-install skill?

Run `npx @skills-hub-ai/cli install cognee-install` from your terminal. The CLI writes the SKILL.md to the correct location for your AI tool (e.g. ~/.claude/skills/cognee-install/ for Claude Code or ~/.cursor/skills/ for Cursor with --target cursor) and adds it to your project's .skills.json lockfile.

Which AI tools does cognee-install work with?

cognee-install runs in Claude Code. It follows the open Agent Skills standard (SKILL.md), so the same skill works in every supported tool without modification.

Is the cognee-install skill free?

Yes. Every skill on skills-hub.ai is free and open-source. There are no premium tiers, paywalls, or usage limits. You only pay for whatever AI assistant you're already using.

How do I use cognee-install after installing it?

In Claude Code, type `/cognee-install` (or whatever slash command the skill registers) and the AI follows the skill's instructions immediately. You can also reference it by name in natural language, your AI loads the skill into context when relevant.

Can I share the cognee-install skill with my team?

Yes. Commit your project's .skills.json lockfile and teammates run `npx @skills-hub-ai/cli install` (no args) to install every skill at the exact version you pinned. Organization-scoped installs work via skills-hub.ai organizations.

Badge for your README

Show that this skill is on Skills Hub. The badge links back to this page and shows the live install count.

Install on Skills Hub badge preview
Markdown
[![Install on Skills Hub](https://skills-hub.ai/api/badges/skill/cognee-install)](https://skills-hub.ai/skills/cognee-install)
HTML
<a href="https://skills-hub.ai/skills/cognee-install"><img src="https://skills-hub.ai/api/badges/skill/cognee-install" alt="Install on Skills Hub"></a>

More options in the badge docs.