topoteretes / cognee
git clone https://github.com/topoteretes/cognee.git
v1.6.5 · 6d ago
Cognee is the open-source AI memory platform for agents. Give your AI agents persistent long-term memory with small models for free
+39
stars, 24h · #991
+~215
stars, 7 days · #1,046
+~920
stars, 30 days · #910
33k
★ total · +1% this week
3.4k
forks · 1.0k open issues
Star history (as recorded here)
LanguagePython
LicenseApache-2.0
Created2023-08-16 (3y ago)
Last pushtoday
Watchers107
OwnerOrganization
GitHub topics
agent-memoryagent-skillsaiai-agentsai-memorycognitive-architecturecognitive-memorycontext-engineeringcontributions-welcomegood-first-issuegood-first-prgraph-databasegraph-raghelp-wantedknowledgeknowledge-graphmemory-managementopen-sourcevector-database
Links
- GitHub: github.com/topoteretes/cognee
- Homepage: https://www.cognee.ai
- Releases · Issues · Hacker News mentions
README excerpt
Cognee - The Free Open-Source AI Memory Platform for Agents Demo . Docs . Learn More · Join Discord · Join r/AIMemory . Community Plugins & Add-ons Cognee is a free open-source AI memory platform that gives AI agents persistent long-term memory across sessions. Turn documents, code, and conversations into a self-hosted knowledge graph your agents can search and reuse. Runs locally for free — no API key required. We rely on free small models that use your CPU. 🌐 This README is also available in: Deutsch | Español | Français | 日本語 | 한국어 | Português | Русский | 中文 📄 Read the research paper: Optimizing the Interface Between Knowledge Graphs and LLMs for Complex Reasoning — Markovic et al., 2025 ## When to use Cognee - **Build a Company Brain.** Bring documentation, conversations, tickets, code, and agent work into shared memory. Help your team and agents connect a decision to the discussion and implementation behind it. Explore Company Brain. - **Give agents memory across runs.** Retain project context, past decisions, fixes, and learned rules. Distill useful session lessons into durable knowledge that another session can retrieve. Connect your agent. - **Ground agents in your domain.** Structure memory around the entities and relationships your application needs, with custom data models and ontologies. Explore ontologies. ## Choose your starting point | I want to… | Start here | | --- | --- | | Build memory without an LLM | Local Python quickstart | | Explore a prebuilt graph without downloading models | Bundled demo | | Generate answers with a local or hosted LLM | Optional LLM setup | | Give an existing agent memory | Plugins and MCP | | Run Cognee on my infrastructure | Deployment options | | Use a managed service | Cognee Cloud | ## Quickstart Requires **Python 3.10–3.14**. **1. Install Cognee** with **pip**, **uv**, or your preferred Python package manager. The `gliner` extra brings the local extraction model used when no LLM key is configured: [code] ### Run locally without an LLM **2. Build and query memory.** With no LLM key configured, Cognee extracts the graph with the local GLiNER model and embeds with a local embedding model; both download on first use. Save this as `quickstart.py` and run `python quickstart.py` if you are feeling old school, or tell your LLM to do it: [code] The same workflow is available from the CLI: [code] Text ingestion, retrieval, and session storage work without an LLM. LLM-dependent improvement stages skip automatically. Generated answers and media processing that requires a vision or transcription model need additional LLM configuration. The bundled GLiNER extractor is a demo of Cognee's small-model pipeline. For a production-ready version with higher accuracy and broader label coverage, reach out to us. ### Optional: Configure the LLM **3. Add an LLM** to get generated answers instead of retrieved passages: [code] Alternatively, create a `.env` file using our template.