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

# OpenClaw

> Connect OpenClaw to ByteRover V4 with the setup script, context engine, authentication, and onboarding prompt.

Use the OpenClaw V4 setup script to install the ByteRover skill and configure ByteRover as the OpenClaw context engine.

<img src="https://mintcdn.com/byterover-d775e347/P61ogOq6zTX8Li0g/v4/assets/byterover_x_openclaw.avif?fit=max&auto=format&n=P61ogOq6zTX8Li0g&q=85&s=8a41faf1b0075e3f7f6d12e48ca08ba9" alt="ByteRover and OpenClaw integration" width="760" data-path="v4/assets/byterover_x_openclaw.avif" />

## Setup

<Steps>
  <Step title="Optional step 0: Remove old V3 CLI, connectors, and integrations">
    If this machine still has the old V3 CLI, connectors, OpenClaw integration, or Hermes memory provider installed, remove them before setting up the V4 skill:

    ```bash theme={null}
    curl -fsSL https://www.byterover.dev/uninstall-v3.sh | sh
    ```

    This removes old V3 command-line tools and connectors. It also removes the old OpenClaw integration and Hermes memory provider when they are detected. It does not migrate V3 memory data.
  </Step>

  <Step title="Install the ByteRover skill and context engine">
    Run the OpenClaw V4 setup script:

    Requires Node.js 20 or newer. Node.js includes npm and npx.

    ```bash theme={null}
    curl -fsSL https://byterover.dev/openclaw-setup-v4.sh | sh
    ```

    This installs the published ByteRover skill and configures the latest ByteRover OpenClaw context engine.
  </Step>

  <Step title="Restart OpenClaw">
    Fully quit and reopen OpenClaw so it can load the installed ByteRover skill and context engine.
  </Step>

  <Step title="Authenticate with ByteRover">
    Prompt OpenClaw:

    ```text theme={null}
    Authenticate with ByteRover.
    ```

    Open the URL OpenClaw prints, approve the request in your browser, then return to OpenClaw and type:

    ```text theme={null}
    approved
    ```
  </Step>

  <Step title="Start ByteRover onboarding">
    Prompt OpenClaw:

    ```text theme={null}
    onboard with ByteRover
    ```
  </Step>
</Steps>

## Authentication URL flow

OpenClaw may ask you to finish account linking in the browser.

<img src="https://mintcdn.com/byterover-d775e347/LoTQLBo6l41QVxCz/images/v4/autonomous-agent-auth-url.svg?fit=max&auto=format&n=LoTQLBo6l41QVxCz&q=85&s=2c0eee4da76ee03b149e12cd14d00309" alt="Agent ByteRover authentication URL flow" width="760" data-path="images/v4/autonomous-agent-auth-url.svg" />

Follow the URL flow exactly as OpenClaw prints it before you start onboarding:

1. Tell OpenClaw to start the authentication flow.
2. Open the URL that OpenClaw prints in your browser.
3. Confirm the browser page before the code expires.
4. Return to OpenClaw and type:

```text theme={null}
approved
```

<Note>
  Use the URL and code printed by your OpenClaw session. Do not copy values from the example image.
</Note>

## If OpenClaw needs a space

During onboarding, OpenClaw may tell you that ByteRover is not configured for the current workspace.

When that happens:

1. Open ByteRover Desktop.
2. Create or select the space for this project.
3. Return to OpenClaw.
4. Prompt OpenClaw again:

```text theme={null}
onboard with ByteRover
```

OpenClaw checks the current project again and continues setup.

## Verify

After onboarding, ask OpenClaw to check ByteRover before starting work:

```text theme={null}
query ByteRover for this project
```

OpenClaw should use ByteRover automatically after setup: query before non-trivial work and record useful knowledge when the work is complete.

## Cleanup: uninstall the context engine

If you want OpenClaw to stop using the ByteRover context engine, run the same setup script with the uninstall flag:

```bash theme={null}
curl -fsSL https://byterover.dev/openclaw-setup-v4.sh | sh -s -- --uninstall-context-engine
```

This resets OpenClaw to its legacy context engine and removes the ByteRover OpenClaw plugin. It does not delete your ByteRover spaces or saved memory.

## Next steps

<CardGroup cols={3}>
  <Card title="Query" icon="terminal" href="/v4/skill/query">
    Learn in depth how the agent retrieves project memory.
  </Card>

  <Card title="Record" icon="save" href="/v4/skill/record">
    Learn in depth how the agent saves durable knowledge.
  </Card>

  <Card title="Space" icon="folder-tree" href="/v4/desktop/space">
    Manage where this project's memory lives.
  </Card>
</CardGroup>
