Skills2026年4月1日·1 分钟阅读

Cognee — Memory Engine for AI Agents

Cognee adds persistent structured memory to any AI agent in 6 lines of code. 14.8K+ stars. Knowledge graphs, vector stores, LLM integration. Apache 2.0.

TO
TokRepo精选 · Community
快速使用

先拿来用,再决定要不要深挖

这里应该同时让用户和 Agent 知道第一步该复制什么、安装什么、落到哪里。

```bash pip install cognee ``` ```python import cognee # Add knowledge await cognee.add("The quarterly revenue was $4.2M, up 23% YoY.") await cognee.add("Customer churn decreased to 2.1% in Q3.") # Process into knowledge graph await cognee.cognify() # Query with natural language results = await cognee.search("What was the revenue growth?") # Returns structured, sourced answers from your knowledge base ```
介绍
Cognee is an open-source memory and knowledge management engine designed specifically for AI agents. While most AI tools forget everything between sessions, Cognee gives your agents persistent, structured memory that grows over time. How it works: 1. **Add** any data — text, documents, URLs, databases 2. **Cognify** — Cognee processes it into a knowledge graph with entity extraction, relationship mapping, and vector embeddings 3. **Search** — Query with natural language, get structured answers with source attribution Key features: - **Knowledge graphs**: Automatically extracts entities and relationships from unstructured text - **Vector + graph hybrid**: Combines vector similarity search with graph traversal for deeper understanding - **Multiple data sources**: Text, PDFs, URLs, databases, APIs - **LLM-agnostic**: Works with OpenAI, Anthropic, local models - **Incremental learning**: Add new knowledge without reprocessing everything - **Source tracking**: Every answer traces back to its source documents
## FAQ **Q: How is this different from a vector database?** A: Vector DBs do similarity search on chunks. Cognee builds a knowledge graph — it understands entities, relationships, and can reason across multiple documents. Think "structured memory" vs "fuzzy search." **Q: Can I use it with Claude Code?** A: Yes. Use Cognee as a Python library in your agent's tools. Add project docs to Cognee, then query them during coding sessions for context-aware assistance. **Q: What about privacy?** A: Cognee runs locally by default. Your data stays on your machine. You can use local LLMs (Ollama) for fully offline operation. **Q: Does it support real-time updates?** A: Yes. Call `cognee.add()` and `cognee.cognify()` incrementally — new knowledge is integrated without reprocessing the entire graph. ## Works With - Claude Code, Cursor, Codex (via Python tool integration) - Any LLM: OpenAI, Anthropic, Ollama, local models - Vector stores: Qdrant, Weaviate, PGVector - Graph stores: Neo4j, NetworkX - Python 3.9+
🙏

来源与感谢

- GitHub: https://github.com/topoteretes/cognee (14.8K+ stars) - License: Apache 2.0 - Docs: https://docs.cognee.ai - Maintainer: Topoteretes

讨论

登录后参与讨论。
还没有评论,来写第一条吧。

相关资产