> ## Documentation Index
> Fetch the complete documentation index at: https://docs.cognee.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Integrations

> Connect AI agents, coding tools, and automation platforms to Cognee memory

The Integrations page (route `/integrations`, under the **CONNECT** section of the sidebar alongside **API Keys**) is the in-product hub for wiring external tools into your Cognee memory. Each card opens a step-by-step modal that injects your tenant's live base URL and API key into copy-on-click code blocks, so the snippets are ready to paste without editing.

Everything in these flows runs locally on your machine — nothing is sent to Cognee. When a step writes to an existing config file, the previous version is backed up to `.bak` before being overwritten.

The page has three sections, in order: **Agents** ("Connect your AI agents and coding tools to Cognee for persistent memory"), **Automation platforms** ("Give your automation workflows access to Cognee memory via MCP"), and **Data sources** ("Connect the tools your team already uses as data sources for your brains").

## Mac / Windows

A **Mac / Windows** toggle sits in the top-right corner of three surfaces, and defaults to **Mac** everywhere:

* The setup modals on this page, on the four OS-aware cards: **Claude Code**, **Codex**, **OpenClaw**, and **API / MCP**.
* The connect modal that opens from a **Claude Code**, **Codex**, **Openclaw**, or **API / MCP** card on the [dashboard](/cognee-cloud/ui/dashboard). The toggle is inside the modal, not on the card. The **Company Brain** card opens the document upload flow instead, which has no toggle.
* The agent connection steps in [onboarding](/cognee-cloud/quickstart).

Flipping it to **Windows** rewrites the commands shown on screen, the commands copied to your clipboard, and the step text that says where to run them:

| What changes                                                         | Mac / Linux                                  | Windows (PowerShell)                                             |
| -------------------------------------------------------------------- | -------------------------------------------- | ---------------------------------------------------------------- |
| Where to run it (step title and copy)                                | "Open **Terminal**"                          | "Open **PowerShell**"                                            |
| Plugin credentials — Claude Code and Codex write `~/.cognee/.env`    | `mkdir -p` + `printf` + `chmod 600`          | `New-Item -ItemType Directory -Force` + `Set-Content` + `icacls` |
| Shell credentials — Openclaw and API / MCP `export` into the session | `export COGNEE_BASE_URL="…"`                 | `$env:COGNEE_BASE_URL = "…"`                                     |
| Skill file path (Openclaw)                                           | `~/.openclaw/skills/cognee/SKILL.md`         | `$env:USERPROFILE\.openclaw\skills\cognee\SKILL.md`              |
| Writing a skill file                                                 | `mkdir -p` + heredoc                         | `New-Item -ItemType Directory -Force` + `Set-Content`            |
| REST call (dashboard **API / MCP** card)                             | `curl` (multi-line, backslash continuations) | `curl.exe` (single line)                                         |

Your credentials and the skill content itself are identical on both — only the shell syntax around them changes. The credentials file also ends up locked to your user on both: `chmod 600` on Mac, `icacls` stripping the inherited permissions on Windows.

<Note>
  The toggle does not reach every step. On this page, the **OpenClaw** `AGENTS.md` step and the **API / MCP** REST and skill steps stay in bash form even with the toggle set to Windows, and the cards without a toggle at all — Claude Desktop, Cursor, VS Code, Gemini CLI, Cline, Hermes Agent — are written for macOS and Linux throughout. On Windows, translate those with the table above: the config-file paths are the ones that differ, and where a card tells you to run `which uvx`, run `Get-Command uvx` instead.
</Note>

## Agents

Agent cards come in three styles depending on how the tool reads memory.

### Plugin-based

Coding agents (CTA **Connect via plugin**) install the **cognee-memory plugin**, which hooks into the agent's lifecycle to capture and recall memory automatically — no code:

<Tabs>
  <Tab title="Claude Code">
    ```bash theme={null}
    claude plugin marketplace add topoteretes/cognee-integrations
    claude plugin install cognee-memory@cognee
    ```
  </Tab>

  <Tab title="Codex">
    ```bash theme={null}
    codex features enable hooks
    codex plugin marketplace add topoteretes/cognee-integrations --ref main
    codex plugin add cognee@cognee
    ```
  </Tab>
</Tabs>

See the dedicated [Claude Code](/integrations/claude-code-integration) and [Codex](/integrations/codex-integration) integration pages for full configuration.

### Prompt-based

This card (CTA **Connect via prompts**) writes a memory instruction file into your workspace so the agent learns to use Cognee through its system prompt:

| Tool         | File written                      |
| ------------ | --------------------------------- |
| **OpenClaw** | `~/.openclaw/workspace/AGENTS.md` |

Prompt-based flows read the `COGNEE_BASE_URL` environment variable. The instruction file teaches the agent to recall context before answering and to remember new facts afterward.

For Claude Code, the marketplace plugin is the recommended direct memory path. The full setup lives in [Claude Code Integration](/cognee-mcp/integrations/claude-code); the key install commands are:

```bash theme={null}
claude plugin marketplace add topoteretes/cognee-integrations
claude plugin install cognee-memory@cognee
```

Use `COGNEE_BASE_URL` and `COGNEE_API_KEY` for Cognee Cloud or a remote server. If those are missing, the plugin uses local mode and needs only `LLM_API_KEY`.

### MCP-based

These cards (CTA **Connect via MCP**) register Cognee as an MCP server in the client's config. Cognee runs via `uvx` (requires [uv](https://docs.astral.sh/uv/)) — no separate install. The **Claude Desktop**, **Cursor**, and **Gemini CLI** cards are guided walkthroughs: they step you through installing `uv`, opening the client's MCP config file, merging in the Cognee server block (shown as an annotated preview so you can copy just the highlighted fragment into your existing file), and restarting the client to test.

Most clients read an `mcpServers` entry that passes credentials as environment variables:

```json theme={null}
{
  "mcpServers": {
    "cognee": {
      "command": "uvx",
      "args": ["cognee-mcp"],
      "env": {
        "COGNEE_BASE_URL": "https://your-tenant.aws.cognee.ai",
        "COGNEE_API_KEY": "your-api-key"
      }
    }
  }
}
```

Each client reads its config from a different location:

| Client             | Config location                                                                         |
| ------------------ | --------------------------------------------------------------------------------------- |
| **Claude Desktop** | Open **Settings → Developer → Edit Config** to create/open `claude_desktop_config.json` |
| **Cursor**         | `~/.cursor/mcp.json` (use **Add Custom MCP** to scaffold it)                            |
| **Hermes Agent**   | `~/.hermes/config.yaml` (YAML)                                                          |
| **Gemini CLI**     | `~/.gemini/settings.json`                                                               |
| **Cline**          | VS Code Cline sidebar → **MCP Servers**                                                 |

<Note>
  The **Claude Desktop** flow passes credentials as command-line arguments rather than environment variables — it pins `cognee-mcp@latest` and appends `--api-url` and `--api-token`. Merge only the `"cognee"` entry into any `mcpServers` block you already have, then fully quit (⌘Q / quit from the tray on Windows) and reopen Claude Desktop. If Claude never calls a `cognee` tool, it usually can't find `uvx` on its `PATH` — run `which uvx` (`Get-Command uvx` on Windows) and use that absolute path as the `command` value.
</Note>

#### Gemini CLI

Gemini CLI has no UI for adding an MCP server, so its card walks you through editing `~/.gemini/settings.json` yourself and shows the complete file you should end up with — your tenant URL and API key included, and the `"cognee"` entry highlighted — so nothing is hidden inside a copied command. Like Claude Desktop, it passes credentials as `--api-url` and `--api-token` arguments to `cognee-mcp@latest` rather than as environment variables:

<Steps>
  <Step title="Install uv">
    `brew install uv`, or `curl -LsSf https://astral.sh/uv/install.sh | sh`. This is what provides `uvx`.
  </Step>

  <Step title="Open ~/.gemini/settings.json">
    If the file or the `~/.gemini` folder doesn't exist yet, run `gemini` once to create them, or create the file yourself.
  </Step>

  <Step title="Add the Cognee server and save">
    On a new or empty file, paste the whole block the card shows (the copy button copies all of it). If you already have an `mcpServers` block, add only the highlighted `"cognee"` entry inside it.
  </Step>

  <Step title="Confirm it connected">
    Start `gemini`, then type `/mcp` in the session — **cognee** should be listed with its tools. Then ask *"What do you know from cognee?"*.
  </Step>
</Steps>

<Note>
  If `/mcp` doesn't list cognee, Gemini usually can't find `uvx` on its `PATH`. Run `which uvx` and use that absolute path as the `"command"` value in `settings.json`.
</Note>

### Extension-based

The **VS Code** card (CTA **Connect via extension**) uses the **"Cognee — Project Memory"** extension from the VS Code Marketplace instead of an MCP config file. After installing it:

1. Run **Cognee: Set Up** from the Command Palette and paste your endpoint, then your API key (stored in your OS keychain, not settings). A health check confirms the connection.
2. Use the core commands from the Command Palette under **Cognee**:
   * **Cognee: Remember Selection** — store the selected code (or the whole file) in this repo's memory.
   * **Cognee: Ask My Project Memory** — ask a question and get answers with clickable citations.
   * **Cognee: Index Workspace** — bulk-ingest the whole repository at once.

### API / MCP

The **Connect via API or MCP** card is for any tool not covered above. It gives you a `curl` recall example and the option to install the generic Cognee skill:

```bash theme={null}
curl -X POST https://your-tenant.aws.cognee.ai/api/v1/recall \
  -H "X-Api-Key: $COGNEE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"query": "What do you know from cognee?"}'
```

## Automation platforms

Bring Cognee memory into your workflow tools (CTA **Connect via node** / **Connect via plugin**):

| Platform | How                                                                                          |
| -------- | -------------------------------------------------------------------------------------------- |
| **n8n**  | Install the community node package `n8n-nodes-cognee`, then add a **Cognee API** credential. |
| **Dify** | Install the Marketplace plugin by `topoteretes`.                                             |

<Warning>
  For **Dify**, the base URL **must** include the `/api` suffix (for example `https://your-tenant.aws.cognee.ai/api`).
</Warning>

## Credentials and environment variables

The flows export these variables:

| Variable          | Used by                                                                                                 |
| ----------------- | ------------------------------------------------------------------------------------------------------- |
| `COGNEE_BASE_URL` | Prompts, skills, the Claude Code plugin, and MCP servers. If missing, the client drops into local mode. |
| `COGNEE_API_KEY`  | Cloud and remote clients, for authentication. The local Claude Code plugin can auto-mint one if absent. |

<Note>
  Setups now use `COGNEE_BASE_URL` as the single endpoint variable — the older `COGNEE_SERVICE_URL` alias is no longer exported by these flows.
</Note>

Authentication uses the `X-Api-Key` header (not `Bearer`). To confirm a key and URL work, run a health ping against the datasets endpoint:

```bash theme={null}
curl https://your-tenant.aws.cognee.ai/api/v1/datasets/ \
  -H "X-Api-Key: $COGNEE_API_KEY"
```

A `200` means the connection is good, `401` means the key is wrong, and `404` or a `5xx` means the URL is wrong or the service is unavailable.

## How memory works once connected

Connected tools read and write memory through two endpoints.

**Recall** (**`POST /api/v1/recall`**) retrieves context. The `search_type` parameter controls how results are assembled:

| `search_type`              | Behavior                                      |
| -------------------------- | --------------------------------------------- |
| `HYBRID_COMPLETION`        | Default — combines graph and chunk retrieval. |
| `GRAPH_COMPLETION`         | Answers from the knowledge graph.             |
| `CHUNKS`                   | Returns raw matching text chunks.             |
| `GRAPH_SUMMARY_COMPLETION` | Summarized graph-based answer.                |

**Remember** (**`POST /api/v1/remember/entry`**) stores a fact. Tie related entries together with a shared `session_id`:

```json theme={null}
{
  "entry": { "type": "qa", "question": "...", "answer": "..." },
  "dataset_name": "default_dataset",
  "session_id": "..."
}
```

The default dataset name is `default_dataset`.

<Note>
  Use `/remember/entry` for inline text. The plain `/remember` endpoint requires a file upload and returns `422` for inline text.
</Note>

## Verify the connection

After running any flow, verify the integration by asking the connected agent:

> What do you know from cognee?

If memory is wired up correctly, the agent recalls context from your knowledge graph. The final step of each flow includes a **Go to Sessions →** button that takes you to your live [Sessions](/cognee-cloud/ui/sessions).

## Debug plugin hooks

When a plugin-based agent does not capture or recall memory, debug the layers separately.

| Layer   | What to check                                                                                                                                                                                                                                                                          |
| ------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Hooks   | The agent must call the Cognee plugin on prompt submit, tool use, stop, compaction, and session end. For Codex, run `codex features enable hooks` and trust the Cognee hooks in `/hooks` if prompted. For Claude Code, confirm the startup message says **"Cognee Memory Connected"**. |
| Backend | Cloud and remote mode need `COGNEE_BASE_URL` and `COGNEE_API_KEY`. Local mode needs `LLM_API_KEY` so the plugin-managed local Cognee API can start again after it was stopped.                                                                                                         |
| Session | A resumed terminal only continues the same live session when the session id and dataset match. Set `COGNEE_SESSION_ID` and keep `COGNEE_PLUGIN_DATASET` unchanged when you want a restart to keep writing to the same session.                                                         |

Hooks do not replay events that happened while they were disabled, untrusted, or unable to reach Cognee. After changing hook trust, credentials, dataset, or session id, restart the agent so its startup hook can initialize the new state.

For the most reliable graph sync, exit the agent normally. Claude Code users can also run `/cognee-memory:cognee-sync` before closing. If the process is killed, recent session cache entries may exist, but the final session-to-graph sync may not have run yet.

## Data sources

The **Data sources** section lists connectors that pull the tools your team already uses into your brains — one connection per workspace, shared with everyone. **Slack** is the first live connector: **Connect** on its card opens a dialog that connects your workspace, and a connected card shows the connection's status and channel/sync health, with **Manage** (or **Reconnect**, when the connection needs attention) opening the same dialog.

Below it, a **More data sources** section ("Not live yet — tell us which ones to prioritize.") lists twenty-two upcoming connectors: Notion, Google Drive (Docs, Sheets, and Slides), Confluence, GitHub, Gmail, Jira, Linear, Granola, Asana, monday.com, Figma, HubSpot, Intercom, Box, Canva, PostHog, Stripe, Vercel, MotherDuck, Xero, lemlist, and Workable. A **Search data sources** field beside that heading filters the cards by name or description as you type; if nothing matches, the section shows **No data sources match "{query}."** with a **Request it** link that opens a pre-filled email to [support@cognee.ai](mailto:support@cognee.ai).

These upcoming connectors are not built yet — clicking one opens a **Coming soon** dialog with a **Get notified once live** button that registers your interest so we can prioritize what to build next. A footer link (**Let us know**) emails [support@cognee.ai](mailto:support@cognee.ai) if you want to request a source directly.

<Note>
  Self-hosted Cognee deployments run their own, separate Slack app against their own backend — setup and usage are covered in the [Slack integration guide](/integrations/slack-integration). To bulk-load data from these tools in code today (for example Slack channel history via dlt's [`slack_source`](https://dlthub.com/docs/dlt-ecosystem/verified-sources/slack)), see the [dlt integration](/integrations/dlt-integration).
</Note>

## Related

<CardGroup cols={2}>
  <Card title="Sessions" icon="messages-square" href="/cognee-cloud/ui/sessions">
    Inspect the live memory your connected tools read and write.
  </Card>

  <Card title="API Keys" icon="key" href="/cognee-cloud/ui/api-keys">
    Create and manage the keys these integrations authenticate with.
  </Card>

  <Card title="Cloud SDK" icon="code" href="/cognee-cloud/connections/cloud-sdk">
    Call recall and remember programmatically from your own code.
  </Card>

  <Card title="Cloud MCP" icon="plug" href="/cognee-cloud/connections/cloud-mcp">
    Details on the Cognee MCP server and its tools.
  </Card>
</CardGroup>
