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

# OpenClaw

> Register Cognee Cloud as OpenClaw's memory provider with multi-scope recall.

Give your [OpenClaw](https://github.com/openclaw/openclaw) agents Cognee-backed memory sourced from your Cognee Cloud tenant. The plugin indexes your Markdown memory files, recalls relevant context before each run, and searches across sessions with natural language — with optional multi-scope routing (company / user / agent).

## 1. Install the plugin

```bash theme={null}
openclaw plugins install @cognee/cognee-openclaw@2026.6.11
```

Or install locally for development:

```bash theme={null}
cd integrations/openclaw
npm install && npm run build
openclaw plugins install --link .
```

## 2. Run setup

```bash theme={null}
openclaw cognee setup              # Cognee only (replaces built-in memory)
openclaw cognee setup --hybrid     # keep built-in memory enabled in config
```

## 3. Connect to Cognee Cloud

Cognee Cloud tenants serve the same `/api/v1/*` API as a self-hosted server, so connecting is just the default config pointed at your tenant URL with an API key. Edit `~/.openclaw/openclaw.json`:

```json theme={null}
{
  "plugins": {
    "entries": {
      "cognee-openclaw": {
        "enabled": true,
        "hooks": {
          "allowPromptInjection": true
        },
        "config": {
          "baseUrl": "https://your-tenant.aws.cognee.ai",
          "apiKey": "${COGNEE_API_KEY}",
          "datasetName": "my-project"
        }
      }
    }
  }
}
```

`COGNEE_API_KEY` is **mandatory** for a cloud tenant — remote servers expose no login route, so there's nothing to auto-mint. Set it in the environment the **gateway process** starts from (a daemonized gateway doesn't see `export`s from your current shell), using a key from the [API Keys](/cognee-cloud/ui/api-keys) page:

```bash theme={null}
export COGNEE_API_KEY="<your-api-key>"
```

<Warning>
  `hooks.allowPromptInjection: true` is required. Without it, OpenClaw blocks the plugin from reading the prompt in the `before_prompt_build` hook and recall is silently skipped. This key was named `allowConversationAccess` before OpenClaw 2026.4.2; the old key is silently rejected. Restart the gateway after changing it: `openclaw gateway stop && openclaw gateway start`.
</Warning>

<Info>
  Do **not** set `mode: "cloud"` — leave it at the default. That mode targets a legacy path scheme that current tenants don't serve (it will 404). All operations — file sync, updates, recall, session capture, and improve — work against Cloud through the standard `/api/v1/*` paths.
</Info>

## 4. Verify

```bash theme={null}
openclaw cognee health     # verify Cognee API connectivity
openclaw cognee status     # files indexed, dataset info, per-scope breakdown
```

A healthy status shows the dataset ID, indexed file count, and a recent last-sync timestamp.

## Multi-scope memory

Enable multi-scope mode by setting any scope-specific dataset name; memory files are routed to the right dataset by path:

| Scope       | Purpose                                     | Example files                  |
| ----------- | ------------------------------------------- | ------------------------------ |
| **Company** | Shared knowledge across all users/agents    | `memory/company/policies.md`   |
| **User**    | Per-user preferences, feedback, corrections | `memory/user/preferences.md`   |
| **Agent**   | Per-agent learned behaviors, tool outputs   | `memory/tools.md`, `MEMORY.md` |

See the full integration guide for the complete config, search types, and CLI reference.

***

<CardGroup cols={2}>
  <Card title="Full integration guide" icon="book" href="/integrations/openclaw-integration">
    Multi-scope config, search types, and troubleshooting
  </Card>

  <Card title="OpenClaw Docs" icon="book" href="https://docs.openclaw.ai/concepts/memory">
    Learn about OpenClaw's memory system
  </Card>
</CardGroup>
