Why Use This Integration
- Persistent Memory: Knowledge survives agent restarts and session boundaries
- Advanced Retrieval: Natural language queries backed by graph + vector search
- Sessionized tools: Built in session data organization in memory
- Native SDK Tools: Works directly with OpenAI’s
function_toolpattern - Async-First: Built for high-performance applications with proper concurrency handling
Installation
Quick Start
Configure your environment variables:Cross-Session Persistence
Memory persists across different agent instances:Custom Session Management
Control session isolation with custom session IDs:Sessionized tools scope data to their session ID. Use non-sessionized
add_tool and search_tool to access data across all sessions.How It Works
- Add Tool: Stores data in cognee’s knowledge graph with embeddings
- Search Tool: Retrieves relevant information via cognee’s recall pipeline
- Auto-Processing: cognee extracts entities, relationships, and context automatically
- Session Scoping: Sessionized tools filter by session; non-sessionized tools access everything
Use Cases
Knowledge Accumulation
Knowledge Accumulation
Pre-load documents into cognee before creating agents:
Context-Aware Assistance
Context-Aware Assistance
Maintain user context across work sessions:
Multi-Tenant Applications
Multi-Tenant Applications
Isolate data per user or organization:
Multi-Agent Workflows
Multi-Agent Workflows
Share knowledge between specialized agents:
Agent Handoffs
Agent Handoffs
Route requests to specialized agents with shared memory:
GitHub Repository
View source code and examples
Example Notebook
Step-by-step tutorial with demos