> ## 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").

## 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** and **Cursor** 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` and use that absolute path as the `command` value.
</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 — more than twenty cards including Slack, 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.

Each card has a **Connect** button. These connectors are not built yet — clicking **Connect** 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 what to prioritize**) emails [support@cognee.ai](mailto:support@cognee.ai) if you want to request a source directly.

## 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>
