June 29, 2026
This Open-Source Tool Gives AI Agents Real Memory — Running on Ollama
Your AI agent has amnesia. Every session starts from zero — yesterday's context, decisions, and facts, gone. Cognee is an open-source AI memory platform that fixes this by turning your documents into a living knowledge graph — and it runs 100% locally on Ollama, no cloud, no API key.
RAG vs a real knowledge graph
RAG is a filing cabinet: chunk documents, embed them, retrieve the closest chunks. It finds similar text, but it can't connect facts across documents — ask something that requires joining fact A in one file with fact B in another and plain RAG shrugs.
Cognee builds a knowledge graph instead: entities and relationships extracted from your data, linked into a structure the agent can actually traverse. That's the difference between "here are five paragraphs that mention X" and "X works at Y, which acquired Z."
How it works: the ECL pipeline
Cognee's pipeline is Extract → Cognify → Load: pull content from your sources, distill entities and relations into the graph, and serve it back as queryable memory. It maintains two kinds of memory — the semantic graph plus vector embeddings — so you get graph reasoning and similarity search from one store.
The local demo
On my RTX 4060, all local:
- LLM:
llama3.1:8bon Ollama - Embeddings:
nomic-embed-text - Add facts → watch the graph build → visualize it → ask questions that require reasoning across documents
The cross-document answers are the money shot: the graph connects facts no single chunk contains.
Pros and cons
Pros
- Local-first: your data never leaves the machine
- Pluggable: swap LLMs, embedders, and stores freely
- One Postgres can hold everything — no exotic infra
- BEAM and a growing ecosystem around it
Cons
- Graph building costs tokens and time on big corpora — an 8B local model takes a while
- Extraction quality tracks the LLM you give it
- Young project; APIs still moving
Who it's for
Anyone building agents that live longer than one session: support bots that remember customers, research assistants that accumulate a corpus, personal agents that know your notes. If your agent needs memory and your data can't leave the building, this is the strongest local-first option I've tested.
Repo: github.com/topoteretes/cognee · Docs: docs.cognee.ai — full local run in the video.