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

# OpenClaw

> Give an OpenClaw assistant the Ankra CLI and Ankra's Agent Skills, so your team can ask about and work with Ankra clusters from Slack, Discord, Telegram or another chat app.

export const CliVersion = ({since, command, note}) => {
  const latestStableCli = "0.21.2";
  const parse = version => String(version).split(".").map(part => parseInt(part, 10) || 0);
  const requested = parse(since);
  const stable = parse(latestStableCli);
  let isPrerelease = false;
  for (let index = 0; index < 3; index += 1) {
    if (requested[index] > stable[index]) {
      isPrerelease = true;
      break;
    }
    if (requested[index] < stable[index]) {
      break;
    }
  }
  const containerStyle = {
    display: "flex",
    alignItems: "baseline",
    gap: "0.6rem",
    margin: "1rem 0",
    padding: "0.6rem 0.9rem",
    border: "1px solid rgba(128, 128, 128, 0.35)",
    borderRadius: "0.5rem",
    fontSize: "0.9em",
    lineHeight: 1.5
  };
  const pillStyle = {
    flex: "none",
    padding: "0.1rem 0.5rem",
    borderRadius: "999px",
    background: "rgba(128, 128, 128, 0.18)",
    fontFamily: "ui-monospace, SFMono-Regular, Menlo, monospace",
    fontSize: "0.85em",
    fontWeight: 600,
    whiteSpace: "nowrap"
  };
  const keepTogether = {
    whiteSpace: "nowrap"
  };
  return <div style={containerStyle} data-cli-version={since}>
      <span style={pillStyle}>CLI v{since}+</span>
      <span>
        {command ? <span>
            <span style={keepTogether}>
              <code>ankra {command}</code>
            </span>{" "}
            needs
          </span> : <span>The commands on this page need</span>}{" "}
        the ankra CLI <strong style={keepTogether}>v{since} or later</strong>
        {isPrerelease ? <span>
            {" "}
            - a pre-release today, so enable the{" "}
            <a href="/integrations/ankra-cli#beta-pre-release-channel">beta channel</a> before
            upgrading
          </span> : null}
        . Check yours with{" "}
        <span style={keepTogether}>
          <code>ankra --version</code>
        </span>
        ; <a href="/integrations/ankra-cli#upgrading-the-cli">upgrade</a> with{" "}
        <span style={keepTogether}>
          <code>ankra upgrade</code>
        </span>
        .{note ? <span> {note}</span> : null}
      </span>
    </div>;
};

Your team already talks in Slack, Discord or Telegram, and you want to ask "which clusters have failing pods?" there rather than opening the portal. [OpenClaw](https://docs.openclaw.ai) is an open-source gateway you host yourself that connects chat apps to an AI agent. Ankra does not ship or run OpenClaw. What Ankra provides is what the agent needs to work with Ankra: the `ankra` CLI and Ankra's [Agent Skills](/integrations/agent-skills), installed where OpenClaw looks for skills.

The agent runs `ankra` commands on the machine where the OpenClaw gateway runs, with the token you give that machine. It can do exactly what that token's role allows, for anyone who can message it.

<Note>
  **Looking for Hermes?** An earlier version of this page used that name for this integration. Nous Research's Hermes Agent is a separate open-source agent, available in the add-on catalogue as **Hermes Agent**.
</Note>

## Prerequisites

* OpenClaw installed and running, with at least one chat channel connected. Follow the [OpenClaw documentation](https://docs.openclaw.ai) for both.
* The [Ankra CLI](/integrations/ankra-cli#installation), v0.13.0 or later, installed on the machine that runs the OpenClaw gateway and on its `PATH`.
* A [service token](/guides/service-tokens) for the assistant. Pick its role for what the assistant should be allowed to do: `viewer` gives read-only access plus ask-mode AI, and Ankra refuses anything that would change a cluster. See [Roles & Access](/guides/roles-and-access).

## Connect OpenClaw to Ankra

<CliVersion since="0.13.0" />

<Steps>
  <Step title="Give the gateway the token">
    Add the token to OpenClaw's global environment file, `~/.openclaw/.env`, on the gateway machine:

    ```bash theme={null}
    ANKRA_API_TOKEN=<your-service-token>
    ```

    The CLI reads `ANKRA_API_TOKEN` when there is no saved login. See [OpenClaw's environment variables](https://docs.openclaw.ai/help/environment) for the other places OpenClaw reads variables from, and their order.
  </Step>

  <Step title="Check the CLI works with that token">
    On the gateway machine, run a read with the same token:

    ```bash theme={null}
    ANKRA_API_TOKEN=<your-service-token> ankra cluster list
    ```

    You should see the organisation's clusters. If you see someone else's view, or a different organisation, a saved `ankra login` on this machine is taking precedence - see [Troubleshooting](#troubleshooting).
  </Step>

  <Step title="Install the Ankra skills for OpenClaw">
    ```bash theme={null}
    ankra skills install --client openclaw
    ```

    This copies the Ankra skills into `~/.openclaw/skills`, one folder per skill, where OpenClaw discovers them itself. The skills ship inside the CLI binary, so they match the CLI version you installed. `ankra skills list` shows what is installed.
  </Step>

  <Step title="Restart OpenClaw">
    Restart the gateway so it loads the new skills.
  </Step>
</Steps>

## Verify

From a chat channel connected to OpenClaw, ask something that needs Ankra, for example:

```text theme={null}
Use ankra-platform-principles. Which of our Ankra clusters are online?
```

The agent should run `ankra` commands on the gateway machine and answer from their output.

## Add a skill for one cluster (optional)

`ankra openclaw skill` writes a skill that names one cluster - its name, ID and portal link - and tells the agent to route changes to that cluster through Ankra rather than running them locally. It writes `~/.openclaw/skills/ankra-<cluster>/SKILL.md`, the folder layout OpenClaw loads skills from:

<CliVersion since="0.21.0" command="openclaw skill" />

```bash theme={null}
ankra openclaw skill --cluster my-cluster
```

Restart OpenClaw after writing it. `--output <path>` writes the file somewhere else. A cluster whose skill would take the name of a bundled Ankra skill (a cluster named `cli` would become `ankra-cli`) is refused; use `--output` for it. If an earlier CLI left a `~/.openclaw/skills/ankra-<cluster>.md` file, delete it: OpenClaw never loaded it.

## Update and remove

The skills are versioned with the CLI. After upgrading the CLI, reinstall them:

```bash theme={null}
ankra upgrade
ankra skills install --client openclaw --force
```

To remove them:

```bash theme={null}
ankra skills uninstall --client openclaw
```

To cut the assistant off from Ankra completely, revoke its token under **Organisation** → **Service tokens**.

## Troubleshooting

| Symptom | What to check |
| - | - |
| The agent says it has no `ankra` command | The CLI is not on the `PATH` of the process running the gateway. Install it system-wide, or start the gateway from a shell where `ankra --version` works. |
| Commands fail with `not logged in` | `ANKRA_API_TOKEN` did not reach the gateway. Check `~/.openclaw/.env` and restart the gateway. |
| Commands act as a person, not the service account | A saved login from `ankra login` takes precedence over `ANKRA_API_TOKEN`. On the gateway machine, run `ankra logout --local-only` to clear it without revoking the token. |
| The agent never uses the Ankra skills | OpenClaw was not restarted after the install, or the skills went to another client. Run `ankra skills clients` and check that `openclaw` shows `[installed]`. |
| A request to change something is refused | The token's role does not allow it. That is expected with `viewer`. Give the service account a broader role only if the assistant should make changes. |

## Related

* [Agent Skills](/integrations/agent-skills) - the skills, the other supported assistants, and what an install writes
* [Service Tokens](/guides/service-tokens) - organisation-owned tokens and how to rotate them
* [`ankra openclaw` reference](/reference/cli/openclaw) and [`ankra skills` reference](/reference/cli/skills) - every flag


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.