Cognee: Knowledge-Graph Memory Over Your Documents
Ingest your documents into a vector index plus a knowledge graph, so an agent can search by meaning and by relationships.
Run this workflow
CI-verified, 2/2 fixtures passing.
Build this with your agent
One copy-paste hands Claude Code, Codex, or Cursor the full recipe, steps included, nothing to fetch.
Intended Use
Sitting on a pile of documents with real relationships between them: Cognee builds both a vector index and a knowledge graph. CI installs the package and verifies the four-verb API surface (remember, recall, forget, improve) is present. Building the graph and recalling both run an LLM (set LLM_API_KEY), so they're fenced.
Not for
- Keyless end-to-end use, the graph build (cognify) runs on an LLM
- Expecting CI to verify graph quality, that's the model's work
The Stack
Tested Against
cognee@latestpython@3.12Side effects & data flow
- Network
- PyPI, install only (model calls only in the fenced step)
- Writes
- ./.venv/, local vector + graph store
- Credentials
- LLM_API_KEY, for the fenced ingest/recall steps only
Prerequisites
- Python 3.10+
- pip
- LLM_API_KEY for the ingest/recall steps
Steps
- 1
Install and verify the four-verb API surface
pip install cognee, then confirm the public API the docs promise: remember, recall, forget, and improve all exist and the async API resolves. CI runs exactly this, no key.
python3 -m venv .venv .venv/bin/pip install -q cognee .venv/bin/python - <<'EOF' import inspect import cognee verbs = ["remember", "recall", "forget", "improve"] missing = [v for v in verbs if not hasattr(cognee, v)] assert not missing, f"cognee is missing documented verbs: {missing}" assert all(callable(getattr(cognee, v)) for v in verbs) print("cognee API OK: remember, recall, forget, improve all present") EOF - 2
Ingest and recall (the model step, not checked by CI)
Set LLM_API_KEY, then await cognee.remember(...) to build the graph and cognee.recall(...) to query it. The graph build runs on an LLM, so CI never claims it.
Eval, 2 fixtures
Last passed: verified todayfour-verbscontainstimeout 900s · max $0Expected:
cognee API OK: remember, recall, forget, improve all presentclean-exitexit_codetimeout 900s · max $0Expected:
0
Results
Four-verb API: remember, recall, forget, improve.
Did this work for you?
Our CI checks the setup runs. You tell us if the whole thing worked. Tell us straight.
Liked this workflow?
Get new verified workflows in WebAfterAI, three issues a week (Tue, Thu, Sat).