topoteretes/cognee-integrations
No description
Cognee Integrations is a monorepo of Cognee-owned packages that add persistent memory to agent frameworks, using a knowledge graph and session cache. It also includes chat and editor integrations that connect to a running Cognee server, plus a Claude Code plugin that captures and recalls memory across sessions.
- Integrations are available for frameworks including Strands, CrewAI, and LangGraph.
- Chat and editor tools connect to Cognee over its HTTP API.
- The Claude Code plugin captures and recalls memory automatically.
full readme from github
Cognee Integrations - AI Memory for Your Agent Framework
Demo . Docs . Learn More · Join Discord · Join r/AIMemory . Core Repo
Cognee Integrations
Monorepo for all Cognee-owned integration packages. Each integration gives an agent framework (Strands, CrewAI, LangGraph, Google ADK, …) a persistent memory layer backed by cognee: a permanent knowledge graph plus a fast session cache.
Available Integrations
Install these from their public registries — you do not need to clone this monorepo to use them.
| Framework | Package | Install |
|---|---|---|
| Strands | cognee-integration-strands |
pip install cognee-integration-strands |
| CrewAI | cognee-integration-crewai |
pip install cognee-integration-crewai |
| LangGraph | cognee-integration-langgraph |
pip install cognee-integration-langgraph |
| Google ADK | cognee-integration-google-adk |
pip install cognee-integration-google-adk |
| Claude Agent SDK | cognee-integration-claude |
pip install cognee-integration-claude |
| Hermes Agent | cognee-integration-hermes-agent |
pip install cognee-integration-hermes-agent |
| OpenClaw | @cognee/cognee-openclaw |
npm install @cognee/cognee-openclaw or install from clawhub.ai |
| n8n | n8n-nodes-cognee |
install via n8n community nodes |
| Dify (Cloud) | cognee |
install from the Dify marketplace |
| Dify (self-hosted) | cognee-sdk |
install from the Dify marketplace |
Each integration has its own README.md under integrations/<name>/ with the full tool
reference and runnable examples. The table above is generated from
integrations/inventory.yml — see it for ownership,
versions, and compatible cognee ranges.
Chat bots & editor
Memory apps and editor tooling that talk to a running cognee server
(COGNEE_BASE_URL) over its HTTP API — no in-process cognee. Each lives under
integrations/<name>/ with a runnable example and its own README.md.
| Integration | Package | What it does |
|---|---|---|
| Chat-memory core | cognee-integration-chat-memory |
the shared ChatMemoryAdapter every cognee chat bot builds on |
| Telegram | cognee-integration-telegram |
each chat is a memory; /ask with cited message links |
| Slack | cognee-integration-slack |
per-channel memory; @cognee / /recall cited answers |
| Web chat widget | cognee-integration-web-widget |
one-script-tag embeddable widget + "ask our docs" |
| Second brain | cognee-integration-second-brain |
cross-transport personal memory (Telegram + web), /link identity merge |
| VS Code | cognee-vscode |
remember/recall + "ask my project memory" with source-file citations |
Community integrations
Maintained by the community in their own repos — tracked here in
integrations/inventory.yml so they're easy to find.
| Integration | Package | Install |
|---|---|---|
| Pi coding agent | @kerryhatcher/pi-cognee |
pi install npm:@kerryhatcher/pi-cognee |
Claude Code Quickstart
The Claude Code integration is a plugin — it gives Claude Code persistent memory across sessions with no code to write. It auto-captures your prompts, tool traces, and responses, and auto-recalls relevant context on every prompt.
Requirements: any Python 3.9+ as python3 on PATH runs the hooks (they are
stdlib-only HTTP clients; macOS's Xcode Command Line Tools Python is enough). Local mode
additionally needs a Python 3.10–3.14 installed somewhere on the machine: the plugin
builds its own virtualenv for the Cognee server from an interpreter it finds (via
uv if you already have it, else the stdlib venv) and
installs the exact pinned cognee release into it. It never downloads installers or
interpreters; with no 3.10+ Python available it says so at session start. The SDK
packages in the table above import cognee in-process and need Python 3.10+ (3.12+ for
Dify, 3.13+ for the Claude Agent SDK); see
integrations/CONFIGURATION.md.
1. Install the Claude Code plugin
Run these slash commands directly in the Claude Code chat:
/plugin marketplace add topoteretes/cognee-integrations
/plugin install cognee-memory@cognee
2. Configure your LLM key
In local mode (the default), the plugin bootstraps a local Cognee API on
http://localhost:8011. Cognee extracts knowledge with an LLM, so set LLM_API_KEY
once in ~/.cognee/.env (shared by the Claude Code and Codex plugins) — one
paste, no editor needed:
mkdir -p ~/.cognee
cat >> ~/.cognee/.env <<'EOF'
LLM_API_KEY="sk-..."
EOF
chmod 600 ~/.cognee/.env
A plain export in the launching shell also works and overrides the file. Re-pasting
the block with a new value is safe — the last value wins.
To target Cognee Cloud or a remote server instead, set COGNEE_BASE_URL and
COGNEE_API_KEY there. The file may hold both modes' variables at once — cloud
wins by default, and export COGNEE_BACKEND=local (or =cloud) flips a single
terminal without touching the file; see
Which mode wins, and how to switch.
On startup you should see a "Cognee Memory Connected" message.
3. Use Claude Code as usual
Memory is captured and recalled automatically — no extra steps. You can also invoke the skills explicitly:
/cognee-memory:cognee-remember # store something now
/cognee-memory:cognee-search # query memory
/cognee-memory:cognee-sync # persist the session into the graph
For full configuration (datasets, sessions, sync watchers, cloud mode), see
integrations/claude-code/README.md.
Using an agent framework instead? The Python SDK integrations (Strands, CrewAI, LangGraph, Google ADK, Claude Agent SDK) follow a
pip install→ setLLM_API_KEY→ attachcognee_tools()pattern. See each integration's README underintegrations/<name>/for a runnable example.
Two memory tiers
Built on cognee v1.0, the integrations share the same two tiers:
- Permanent knowledge graph — durable memory that survives across sessions.
- Session cache — a cheap per-session cache (no graph extraction up front) that is
promoted into the permanent graph on sync (
/cognee-memory:cognee-sync, orcognee.improve(session_ids=[...])in the SDK integrations).
Using the Python Integrations
Every Python integration installs from PyPI and follows the same shape: install →
set LLM_API_KEY → build the cognee tools → pass them to your agent. The only thing
that differs per framework is the import line and how you construct the agent.
pip install cognee-integration-strands # or -crewai, -langgraph, -google-adk, -claude
export LLM_API_KEY="sk-..." # cognee extracts knowledge with an LLM
The tools come in two styles depending on the integration's version:
| Framework | Package | Build the tools with | Tools |
|---|---|---|---|
| Strands | cognee-integration-strands |
cognee_tools(session_id=None) |
remember, recall |
| Claude Agent SDK | cognee-integration-claude |
cognee_tools(session_id=None) |
remember, recall |
| CrewAI | cognee-integration-crewai |
from … import add_tool, search_tool |
add_tool, search_tool |
| Google ADK | cognee-integration-google-adk |
from … import add_tool, search_tool |
add_tool, search_tool |
| LangGraph | cognee-integration-langgraph |
get_sessionized_cognee_tools(user_id) |
add_tool, search_tool |
cognee_tools() style (cognee v1.0 — Strands, Claude Agent SDK). Writes go to the
permanent graph; pass session_id=... to use the session cache instead:
from cognee_integration_strands import cognee_tools
from strands import Agent
from strands.models.openai import OpenAIModel
agent = Agent(model=OpenAIModel(...), tools=cognee_tools())
agent("Remember that we signed a contract with Meditech Solutions for £1.2M.")
print(agent("What is the value of the Meditech Solutions contract?"))
add_tool / search_tool style (CrewAI, Google ADK, LangGraph). Here you also ingest
source documents yourself with cognee.add(...) + cognee.cognify() before searching:
import cognee
from cognee_integration_crewai import add_tool, search_tool # CrewAI / Google ADK
from crewai import Agent
await cognee.add("Meditech Solutions — healthcare industry, contract worth £1.2M.")
await cognee.cognify() # build the knowledge graph
agent = Agent(role="Analyst", goal="…", backstory="…", tools=[add_tool, search_tool])
print(agent.kickoff("Which contracts are in the healthcare industry?"))
LangGraph is the same style but builds its tools per user:
add_tool, search_tool = get_sessionized_cognee_tools("user-1").
Each integration's README.md under integrations/<name>/ has a complete runnable
example (examples/) and the full tool reference.
Structure
Each integration lives under integrations/<name>/ and is an independently publishable package.
integrations/
openclaw/ -> @openclaw/memory-cognee (npm)
claude-code/ -> Cognee plugin for Claude Code
codex/ -> Cognee plugin marketplace for Codex
antigravity/ -> Cognee plugin for Antigravity
cursor/ -> Cognee plugin for Cursor (hooks + skills)
Adding a New Integration
Python integrations
(Template coming soon. For now, follow the TypeScript pattern below and adapt for Python with pyproject.toml.)
TypeScript/Node integrations (e.g., OpenClaw plugins)
- Create
integrations/<name>/withpackage.json, entry file, and plugin manifest - Follow the target platform's plugin conventions
- Add an entry to
integrations/inventory.yml
CI auto-detects new integrations by language (Python via pyproject.toml, TypeScript via package.json) — no workflow edits needed.
Development
Each integration is developed independently with its own toolchain:
# Python integrations
cd integrations/<name>
uv sync --dev
uv run pytest tests/ -v
uv run ruff check .
# TypeScript integrations
cd integrations/<name>
npm install
npx tsc --noEmit
Version Pinning Policy
Python integrations must pin the cognee dependency with a bounded range (e.g., cognee>=0.5.1,<0.6.0). This is enforced by CI via scripts/check_version_pins.py. TypeScript integrations that talk to Cognee via HTTP API are exempt from package pinning but should document compatible Cognee server versions.
When a new cognee version is released:
- Update the bounds in affected integrations
- Run tests to verify compatibility
- Bump the integration version
- Publish the updated package
Publishing
Each integration is published independently via tag-per-package:
# TypeScript: publishes to npm
git tag openclaw-v2026.2.4 && git push --tags
# Python (when added): publishes to PyPI
# git tag <name>-v<version> && git push --tags
The publish.yml workflow parses the tag, runs tests, and publishes to the appropriate registry.
CI
- Lint: Ruff on every PR across all Python integrations
- Tests: Auto-detects changed integrations and runs the right test suite (pytest for Python, tsc for TypeScript)
- Pin check: Validates bounded
cogneedependencies in Python integrations - Publish: Tag-triggered per-package publishing to PyPI or npm
Inventory
integrations/inventory.yml tracks all known integrations with ownership, migration status, package names, and version info. Update it when adding or migrating integrations.