--- id: cognee version: "1.4.2" license: Apache-2.0 license_treatment: permissive maintenance: active --- # cognee — Cognee - is a library for enriching LLM context with a semantic layer for better understanding and reasoning. License: permissive · Maintenance: active · Downloads: 195.2K/mo ## What it is and what it does Cognee is an open-source AI memory platform that ingests data in any format and builds a self-hosted knowledge graph to give AI agents persistent long-term memory across sessions. It combines vector embeddings, graph reasoning, and cognitive-science-grounded ontology generation so documents are searchable by meaning and connected by relationships that evolve over time. The platform exposes four core operations—remember (store in graph), recall (query with auto-routing), forget (delete), and improve (refine)—plus a CLI and Docker deployment option. It integrates with LLM providers via LiteLLM and supports multimodal ingestion, session-scoped memory caching, and cross-agent knowledge sharing. The package is designed for building company knowledge bases, enabling agents with domain expertise, and supporting reliable, trustworthy agent deployments with user/tenant isolation and audit trails. It runs locally by default but can be deployed as a containerized API server. The 44 runtime dependencies include FastAPI for the server, LanceDB for vector storage, Pydantic for configuration, and instructor for LLM-guided parsing; the dependency footprint is substantial but reflects a full-stack knowledge infrastructure rather than a lightweight library. Use it for: - Build a persistent knowledge base for a multi-turn chatbot or agent that recalls context across separate conversations. - Ingest company documents (PDFs, emails, wikis) into a unified graph and let agents query domain knowledge with semantic search. - Integrate Cognee memory into Claude Code or other AI coding assistants to preserve coding context and decisions across sessions. - Deploy a self-hosted knowledge graph API for multiple agents or tenants with isolated memory and audit trails. - Prototype agentic workflows that learn from feedback and improve reasoning by connecting new insights to existing knowledge. ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. Cognee builds a self-hosted knowledge graph from ingested data, giving AI agents persistent long-term memory across sessions with vector search, graph reasoning, and ontology grounding. Yes. Cognee is actively maintained (30023 stars, last commit 2026-08-14), has low install friction, carries no known vulnerabilities, and offers a permissive Apache-2.0 license. It solves a real problem—persistent, searchable memory for AI agents—with a mature feature set (graph + vector search, multimodal ingestion, session memory, CLI, Docker support). The 44 dependencies are substantial but justified by the full-stack nature of the platform. Install if you need agent memory infrastructure; skip if you only need lightweight semantic search or simple vector storage. ## Install pip install cognee uv add cognee poetry add cognee ## Installing cognee Before you install: Low friction install with a pure-Python wheel. Active maintenance (last commit 2026-08-14) and strong community signal (30023 stars). Requires Python 3.10–3.14 and 44 runtime dependencies including FastAPI, LanceDB, LiteLLM, and OpenAI; no compiled dependencies block installation. License in practice: Apache-2.0 permissive license allows commercial use, modification, and distribution with minimal restrictions—suitable for proprietary projects and commercial deployments. Quickstart: import cognee import asyncio async def main(): await cognee.remember("Cognee turns documents into AI memory.") results = await cognee.recall("What does Cognee do?") for result in results: print(result) asyncio.run(main()) Requires Python 3.10–3.14 and LLM_API_KEY environment variable (e.g., OpenAI API key) to function; Docker optional but recommended for the CLI UI. Verify before relying: - Whether the 44 runtime dependencies can be selectively installed or if all are required for basic usage. - Performance characteristics and scalability limits for knowledge graph size and query latency. - Whether session memory and permanent graph storage can use different backends (e.g., local cache vs. remote database). - Exact ontology generation mechanism and how it evolves as knowledge changes. ## Package facts - License: Apache-2.0 (permissive) - Python support: supports_current - Install friction: low - Maintenance: active - Downloads: 195.2K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags ai agent memory system, knowledge graph builder, semantic search and retrieval, llm context enrichment, persistent agent memory, vector and graph database, document ingestion pipeline, knowledge-graph, agent-memory, rag [View on SkillFed](https://skillfed.io/packages/cognee) · [View on PyPI](https://pypi.org/project/cognee/)