A powerful integration between LangGraph and Cognee providing intelligent knowledge management and retrieval capabilities for AI agents
Project description
Cognee-Integration-LangGraph
A powerful integration between Cognee and LangGraph that provides intelligent knowledge management and retrieval capabilities for AI agents.
Overview
cognee-integration-langgraph combines Cognee's advanced knowledge storage and retrieval system with LangGraph's workflow orchestration capabilities. This integration allows you to build AI agents that can efficiently store, search, and retrieve information from a persistent knowledge base.
Features
- Smart Knowledge Storage: Add and persist information using Cognee's advanced indexing
- Semantic Search: Retrieve relevant information using natural language queries
- Session Management: Support for user-specific data isolation
- LangGraph Integration: Seamless integration with LangGraph's agent framework
- Async Support: Built with async/await for high-performance applications
Installation
# Using uv
uv add cognee-integration-langgraph
# Using pip
pip install cognee-integration-langgraph
Available Tools
get_sessionized_cognee_tools(session_id: str = None)
Returns sessionized cognee tools for isolated data management.
Returns: (add_tool, search_tool) - A tuple of tools for storing and searching data
Individual Tools
add_tool: Store information in the knowledge basesearch_tool: Search and retrieve previously stored information
Session Management
cognee-integration-langgraph supports user-specific sessions to isolate data between different users or contexts:
from cognee_integration_langgraph import get_sessionized_cognee_tools
user1_tools = get_sessionized_cognee_tools("user-123")
user2_tools = get_sessionized_cognee_tools("user-456")
Configuration
Copy the .env.template file to .env and fill out the required API keys:
cp .env.template .env
Then edit the .env file and set both keys using your OpenAI API key:
OPENAI_API_KEY=your-openai-api-key-here
LLM_API_KEY=your-openai-api-key-here
Examples
Check out the examples/ directory for more comprehensive usage examples:
examples/example.py: Complete workflow with contract managementexamples/guide.ipynb: Jupyter notebook tutorial with step-by-step guidance
Requirements
- Python 3.12+
- OpenAI API key
- Dependencies automatically managed via pyproject.toml
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file cognee_integration_langgraph-0.1.1.tar.gz.
File metadata
- Download URL: cognee_integration_langgraph-0.1.1.tar.gz
- Upload date:
- Size: 4.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f0faa72780619ec3d06273721f0dcf19c85ea374a2bb12e578f9870950fc75d4
|
|
| MD5 |
0c3cfdd0ba8d450e64783d7b1b92513c
|
|
| BLAKE2b-256 |
35408c93b3b7f1d4183884dab78b4b920c5f6f55ff785b4668a15c405cb910e2
|
File details
Details for the file cognee_integration_langgraph-0.1.1-py3-none-any.whl.
File metadata
- Download URL: cognee_integration_langgraph-0.1.1-py3-none-any.whl
- Upload date:
- Size: 5.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1713851e7b681a34e4b9d364344e573ef65b328da2aa56e616498947bc5c7f4b
|
|
| MD5 |
55483c5a16c6eb4a8997923f551297f1
|
|
| BLAKE2b-256 |
19bca1d7c550168c303977a2933a69a5fa054d662c1237ac3ba199ad24b36b8b
|