Skip to main content
Give your CrewAI agents a shared, persistent knowledge base powered by cognee. Agents store information with add_tool and retrieve it via natural language with search_tool — memory that survives across crews and runs.

Why Use This Integration

  • Shared crew memory: Multiple agents read and write the same knowledge graph
  • Semantic recall: Retrieve information using natural language queries
  • Session isolation: Multi-tenant support with per-user/session data separation
  • Drop-in tools: Add add_tool and search_tool to any CrewAI agent

Installation

Requires Python 3.10+. Pins cognee>=0.4.0, crewai>=1.5.0, and crewai-tools>=1.5.0.

Quick Start

Set your LLM key, then attach the tools to a CrewAI agent:

Tools

add_tool queues writes and runs cognee.cognify() after each batch, so data is indexed before searches. Async operations have a default 120-second timeout.

Session Management

Use get_sessionized_cognee_tools(session_id) to isolate data per user or session:
If you omit session_id, a UUID-based session ID is generated automatically. Session isolation is implemented by injecting the session ID into the node_set of add_tool.

How It Works

  1. Add Tool: Stores data in cognee’s knowledge graph with embeddings, then cognifies it
  2. Search Tool: Retrieves relevant information via cognee.search()
  3. Auto-Processing: cognee extracts entities, relationships, and context automatically
  4. Background loop: cognee’s async API runs on a dedicated background event loop with safe concurrent writes

GitHub Repository

View source code and examples

Examples

Runnable example scripts