# cognee Make data processing for LLMs easy
Open-source framework for creating knowledge graphs and data models for LLMs.
[//]: # () [//]: # ( Share cognee Repository) [//]: # (
) [//]: # ()
[//]: # ( )
[//]: # ( )
[//]: # ( )
[//]: # ( )
[//]: # (
)
[//]: # ( )
[//]: # ( )
[//]: # (
)
[//]: # ( )
[//]: # ( )
[//]: # (
)
[//]: # ( )
[//]: # ( )
[//]: # (
)
[//]: # ( )
[//]: # ( )
[//]: # (
)
[//]: # ( )
[//]: # (
Try it yourself on Whatsapp with one of our partners by typing `/save {content you want to save}` followed by `/query {knowledge you saved previously}`
## 📦 Installation With pip: ```bash pip install cognee ``` With poetry: ```bash poetry add cognee ``` ## 💻 Usage Check out our demo notebook [here](cognee%20-%20Get%20Started.ipynb) - Set OpenAI API Key as an environment variable ``` import os # Setting an environment variable os.environ['OPENAI_API_KEY'] = '' ``` - Add a new piece of information to storage ``` import cognee cognee.add(absolute_data_path, dataset_name) ``` - Use LLMs and cognee to create graphs ``` cognee.cognify(dataset_name) ``` - Render the graph after adding your Graphistry credentials to .env ``` graph_url = await render_graph(graph, graph_type = "networkx") print(graph_url) ``` - Query the graph for a piece of information ``` query_params = { SearchType.SIMILARITY: {'query': 'your search query here'} } cognee.search(graph, query_params) ``` ## Demo [
](https://www.youtube.com/watch?v=yjParvJVgPI "Learn about cognee: 55")
## Architecture
### How Cognee Enhances Your Contextual Memory
Our framework for the OpenAI, Graph (Neo4j) and Vector (Weaviate) databases introduces three key enhancements:
- Query Classifiers: Navigate information graph using Pydantic OpenAI classifiers.
- Document Topology: Structure and store documents in public and private domains.
- Personalized Context: Provide a context object to the LLM for a better response.
