## OWL/RDF Ontology Pipeline Integration
Cognee now supports ingesting, processing, and searching OWL/RDF ontology files.
### Usage
1. **Load Ontology**
- Use `OntologyEngine.load_data('path/to/ontology.owl')` to ingest OWL/RDF files.
2. **Semantic Extraction & Embeddings**
- Ontology nodes and edges are extracted and embeddings are generated automatically.
3. **Search**
- All search types (summaries, insights, chunks, code, etc.) are enabled for ontology content and relationships.
4. **Testing & Validation**
- Comprehensive unit and integration tests cover loader, semantic extraction, embedding generation, and search operations.
### Example
```python
from cognee.tasks.graph.infer_data_ontology import OntologyEngine
engine = OntologyEngine()
ontology_data = await engine.load_data('ontology.owl')
# ontology_data['nodes'], ontology_data['edges'], ontology_data['embeddings']
```
Refer to the documentation for advanced configuration and troubleshooting.
cognee - Memory for AI Agents in 5 lines of code
Demo
.
Learn more
·
Join Discord
·
Join r/AIMemory
.
Docs
.
cognee community repo
[](https://GitHub.com/topoteretes/cognee/network/)
[](https://GitHub.com/topoteretes/cognee/stargazers/)
[](https://GitHub.com/topoteretes/cognee/commit/)
[](https://github.com/topoteretes/cognee/tags/)
[](https://pepy.tech/project/cognee)
[](https://github.com/topoteretes/cognee/blob/main/LICENSE)
[](https://github.com/topoteretes/cognee/graphs/contributors)
**🚀 We launched Cogwit beta (Fully-hosted AI Memory): Sign up [here](https://platform.cognee.ai/)! 🚀**
Build dynamic memory for Agents and replace RAG using scalable, modular ECL (Extract, Cognify, Load) pipelines.
More on [use-cases](https://docs.cognee.ai/use-cases) and [evals](https://github.com/topoteretes/cognee/tree/main/evals)
🌐 Available Languages
:
Deutsch |
Español |
français |
日本語 |
한국어 |
Português |
Русский |
中文
## Features
- Interconnect and retrieve your past conversations, documents, images and audio transcriptions
- Replaces RAG systems and reduces 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 , Deepnote 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`](CONTRIBUTING.md) for more information.
## 📦 Installation
You can install Cognee using either **pip**, **poetry**, **uv** or any other python package manager.
Cognee supports Python 3.10 to 3.13
### With pip
```bash
pip install cognee
```
## Local Cognee installation
You can install the local Cognee repo using **uv**, **pip** and **poetry**.
For local pip installation please make sure your pip version is above version 21.3.
### with UV with all optional dependencies
```bash
uv sync --all-extras
```
## 💻 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:
```python
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.
```
## Our paper is out! Read here
## Cognee UI
You can also cognify your files and query using cognee UI.
Try cognee UI by runnning ``` cognee -ui ``` command on your terminal.
## Understand our architecture
## Demos
1. Cogwit Beta demo:
[Cogwit Beta](https://github.com/user-attachments/assets/fa520cd2-2913-4246-a444-902ea5242cb0)
2. Simple GraphRAG demo
[Simple GraphRAG demo](https://github.com/user-attachments/assets/d80b0776-4eb9-4b8e-aa22-3691e2d44b8f)
3. cognee with Ollama
[cognee with local models](https://github.com/user-attachments/assets/8621d3e8-ecb8-4860-afb2-5594f2ee17db)
## 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.
## 💫 Contributors
## Sponsors
Thanks to the following companies for sponsoring the ongoing development of cognee.
- [GitHub's Secure Open Source Fund](https://resources.github.com/github-secure-open-source-fund/)
## Star History
[](https://star-history.com/#topoteretes/cognee&Date)