<!-- .github/pull_request_template.md --> ## Description As discussed with @hande-k and Lazar, I've created a short demo to illustrate how to get the pagerank rankings from the knowledge graph given the nx engine. This is a POC, and a first of step towards solving #643 . Please let me know what you think, and how to proceed from here. :) ## DCO Affirmation I affirm that all code in every commit of this pull request conforms to the terms of the Topoteretes Developer Certificate of Origin. --------- Co-authored-by: Boris <boris@topoteretes.com> Co-authored-by: Hande <159312713+hande-k@users.noreply.github.com> Co-authored-by: Vasilije <8619304+Vasilije1990@users.noreply.github.com> |
||
|---|---|---|
| .data | ||
| .dlt | ||
| .github | ||
| alembic | ||
| assets | ||
| bin | ||
| cognee | ||
| cognee-frontend | ||
| cognee-mcp | ||
| community | ||
| deployment | ||
| evals | ||
| examples | ||
| helm | ||
| licenses | ||
| logs | ||
| notebooks | ||
| profiling | ||
| tools | ||
| .dockerignore | ||
| .env.template | ||
| .gitignore | ||
| .pre-commit-config.yaml | ||
| .pylintrc | ||
| .python-version | ||
| alembic.ini | ||
| CODE_OF_CONDUCT.md | ||
| cognee-gui.py | ||
| CONTRIBUTING.md | ||
| DCO.md | ||
| docker-compose.yml | ||
| Dockerfile | ||
| Dockerfile_modal | ||
| entrypoint.sh | ||
| LICENSE | ||
| modal_deployment.py | ||
| mypy.ini | ||
| NOTICE.md | ||
| poetry.lock | ||
| pyproject.toml | ||
| README.md | ||
| uv.lock | ||
cognee - Memory for AI Agents in 5 lines of code
Demo . Learn more · Join Discord
Build dynamic Agent memory using scalable, modular ECL (Extract, Cognify, Load) pipelines.
🌐 Available Languages : 🇵🇹 Português · 🇨🇳 [中文]
Features
- Interconnect and retrieve your past conversations, documents, images and audio transcriptions
- Reduce hallucinations, developer effort, and cost.
- Load data to graph and vector databases using only Pydantic
- Manipulate your data while ingesting from 30+ data sources
Get Started
Get started quickly with a Google Colab notebook or starter repo
Contributing
Your contributions are at the core of making this a true open source project. Any contributions you make are greatly appreciated. See CONTRIBUTING.md for more information.
📦 Installation
You can install Cognee using either pip, poetry, uv or any other python package manager.
With pip
pip install cognee
💻 Basic Usage
Setup
import os
os.environ["LLM_API_KEY"] = "YOUR OPENAI_API_KEY"
You can also set the variables by creating .env file, using our template. To use different LLM providers, for more info check out our documentation
Simple example
This script will run the default pipeline:
import cognee
import asyncio
async def main():
# Add text to cognee
await cognee.add("Natural language processing (NLP) is an interdisciplinary subfield of computer science and information retrieval.")
# Generate the knowledge graph
await cognee.cognify()
# Query the knowledge graph
results = await cognee.search("Tell me about NLP")
# Display the results
for result in results:
print(result)
if __name__ == '__main__':
asyncio.run(main())
Example output:
Natural Language Processing (NLP) is a cross-disciplinary and interdisciplinary field that involves computer science and information retrieval. It focuses on the interaction between computers and human language, enabling machines to understand and process natural language.
cognee UI
You can also cognify your files and query using cognee UI.

Try cognee UI out locally here.
Understand our architecture
Demos
- What is AI memory:
- Simple GraphRAG demo
- cognee with Ollama
Code of Conduct
We are committed to making open source an enjoyable and respectful experience for our community. See CODE_OF_CONDUCT for more information.