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

# OpenClaw

> Use OpenClaw agents as OpenAI-compatible models in EnConvo

## Overview

OpenClaw is a self-hosted AI agent platform for running assistants across chat, messaging channels, tools, skills, and automations.

OpenClaw can expose its agents through an OpenAI-compatible Gateway. After you enable the Gateway, EnConvo can use an OpenClaw agent like any other AI model, including inside chat, EnConvo agents, and model-powered features.

OpenClaw's Gateway exposes OpenAI-compatible endpoints such as `/v1/models`, `/v1/chat/completions`, and `/v1/responses`. EnConvo's OpenClaw provider uses the Chat Completions API (`/v1/chat/completions`).

<Note>
  EnConvo does not use the OpenClaw Responses API for this provider. Configure OpenClaw through its OpenAI-compatible Chat Completions Gateway.
</Note>

<Tip>
  New to OpenClaw? Start with the [OpenClaw Getting Started guide](https://docs.openclaw.ai/start/getting-started), then return here to connect it to EnConvo.
</Tip>

<Tip>
  See the [OpenClaw Gateway docs](https://docs.openclaw.ai/gateway#openai-compatible-endpoints) for the full Gateway endpoint reference.
</Tip>

## What You Need

* OpenClaw installed on the machine that will run the Gateway
* The OpenClaw Gateway running on a reachable host and port
* The Chat Completions Gateway endpoint enabled
* The Gateway token from `~/.openclaw/openclaw.json`
* EnConvo with the OpenClaw AI model provider enabled

## Automatic Setup in EnConvo

Open EnConvo **Settings** -> **AI Model** -> **OpenClaw**. The setup card can start, stop, and configure the local OpenClaw Gateway for you.

Use **Auto Setup** when OpenClaw is installed on the same Mac as EnConvo. EnConvo will:

<Steps>
  <Step title="Find OpenClaw">
    Check that the `openclaw` CLI exists on this Mac.
  </Step>

  <Step title="Enable Chat Completions">
    Run `openclaw config set gateway.http.endpoints.chatCompletions.enabled true`.
  </Step>

  <Step title="Prepare the Gateway token">
    Read `gateway.auth.token` from `~/.openclaw/openclaw.json`, or create one if it is missing.
  </Step>

  <Step title="Start the Gateway">
    Start or restart the OpenClaw Gateway service.
  </Step>

  <Step title="Verify the API">
    Probe the Gateway with `/health` and `/v1/models`.
  </Step>

  <Step title="Save credentials">
    Save the base URL and Gateway token into EnConvo's OpenClaw credentials.
  </Step>
</Steps>

The setup card shows a runtime badge such as **Running** or **Stopped**. While the card is visible, EnConvo refreshes this status periodically and stops refreshing when the card is no longer visible.

## Enable OpenClaw Gateway

You can ask OpenClaw to prepare the Gateway details for you:

```text theme={null}
enable openai-compatible api and give me the token and baseurl
```

Use the returned base URL and token in EnConvo's OpenClaw credential settings.

<Steps>
  <Step title="Enable Chat Completions">
    Enable the OpenAI-compatible chat completions endpoint once:

    ```bash theme={null}
    openclaw config set gateway.http.endpoints.chatCompletions.enabled true
    ```
  </Step>

  <Step title="Choose the bind mode">
    For local-only access, keep the default loopback bind. For another device on your LAN to reach the Gateway, bind to LAN:

    ```bash theme={null}
    openclaw config set gateway.bind lan
    ```
  </Step>

  <Step title="Restart the Gateway">
    Apply the configuration change:

    ```bash theme={null}
    openclaw gateway restart
    ```
  </Step>

  <Step title="Check Gateway status">
    Confirm the Gateway is running:

    ```bash theme={null}
    openclaw gateway status
    ```
  </Step>
</Steps>

## Configure OpenClaw in EnConvo

Open EnConvo **Settings** -> **AI Model** -> **OpenClaw**, then configure the credential provider.

<img src="https://mintcdn.com/thegreatlionheartpteltd/VEvqoAwJIOhoBmim/img/openclaw-settings.png?fit=max&auto=format&n=VEvqoAwJIOhoBmim&q=85&s=5bdcb4e3bf578e39002cb9afcff76d79" alt="OpenClaw credential settings in EnConvo" width="1800" height="1231" data-path="img/openclaw-settings.png" />

| Setting               | Value                                                 |
| --------------------- | ----------------------------------------------------- |
| **OpenClaw Base URL** | `http://<gateway-host>:<port>/v1`                     |
| **Gateway Token**     | `gateway.auth.token` from `~/.openclaw/openclaw.json` |

EnConvo uses the Chat Completions API for OpenClaw automatically.

<Warning>
  Use the base URL ending in `/v1`, not the full `/v1/chat/completions` endpoint. For example, if your endpoint is `http://192.168.1.18:18789/v1/chat/completions`, enter `http://192.168.1.18:18789/v1`.
</Warning>

To read the Gateway token from the default OpenClaw config file:

```bash theme={null}
jq -r '.gateway.auth.token' ~/.openclaw/openclaw.json
```

EnConvo sends this value as:

```http theme={null}
Authorization: Bearer <gateway-token>
```

Click **Validate** after entering the base URL and token.

## API Behavior and Attachments

EnConvo sends OpenClaw requests through OpenAI-compatible Chat Completions:

```http theme={null}
POST /v1/chat/completions
```

Use `openclaw:main` or another model name advertised by your OpenClaw agent list.

<Warning>
  Image attachments are not sent to OpenClaw by EnConvo. Treat the OpenClaw provider as a text/chat provider in EnConvo. For image workflows, use a vision-capable model provider or run OCR/image analysis before sending text to OpenClaw.
</Warning>

## Use OpenClaw as an AI Model

Once configured, OpenClaw appears in the model selector. Choose **OpenClaw** and select the agent-backed model, such as `openclaw:main`.

<img src="https://mintcdn.com/thegreatlionheartpteltd/VEvqoAwJIOhoBmim/img/openclaw-chat-model.png?fit=max&auto=format&n=VEvqoAwJIOhoBmim&q=85&s=0925f546fc2e55cd7a0725a826f5e43b" alt="OpenClaw selected as the chat model" width="1800" height="1172" data-path="img/openclaw-chat-model.png" />

Use this mode when you want an EnConvo conversation, command, or feature to run through an OpenClaw agent while keeping the normal EnConvo interface.

<Steps>
  <Step title="Open the model picker">
    In chat or another model-powered EnConvo feature, click the current model name.
  </Step>

  <Step title="Choose OpenClaw">
    Select **OpenClaw** in the provider list.

    <img src="https://mintcdn.com/thegreatlionheartpteltd/VEvqoAwJIOhoBmim/img/openclaw-model-selector.png?fit=max&auto=format&n=VEvqoAwJIOhoBmim&q=85&s=e3295bbd3b336d2849a0ba5a9cea3ff3" alt="OpenClaw in the model selector" width="1800" height="1209" data-path="img/openclaw-model-selector.png" />
  </Step>

  <Step title="Select an OpenClaw agent model">
    Choose `openclaw:main` or another OpenClaw agent from the model list.
  </Step>

  <Step title="Run the feature normally">
    Ask your question or run the EnConvo feature. The selected OpenClaw agent handles the model call behind the scenes.
  </Step>
</Steps>

<Note>
  EnConvo loads OpenClaw models from `openclaw agents list`. If the OpenClaw CLI is not available locally, EnConvo falls back to `openclaw:main`.
</Note>

## Create an EnConvo Agent for OpenClaw

You can also create an EnConvo agent that coordinates an OpenClaw agent. This is useful when you want an EnConvo-facing workflow, tool set, or prompt around a specific OpenClaw agent.

<Steps>
  <Step title="Open Create Agent">
    Open SmartBar and search for **Create Agent**.

    <img src="https://mintcdn.com/thegreatlionheartpteltd/VEvqoAwJIOhoBmim/img/openclaw-create-agent-command.png?fit=max&auto=format&n=VEvqoAwJIOhoBmim&q=85&s=a5b1fbd3e5dffc5d4ed53d494bcf5e30" alt="Create Agent command in EnConvo" width="1800" height="1157" data-path="img/openclaw-create-agent-command.png" />
  </Step>

  <Step title="Name the agent">
    Create a clear title, such as `OpenClaw Main`.

    <img src="https://mintcdn.com/thegreatlionheartpteltd/VEvqoAwJIOhoBmim/img/openclaw-agent-form.png?fit=max&auto=format&n=VEvqoAwJIOhoBmim&q=85&s=6629a295fbfbc459cefc92976e1908ac" alt="Create New Agent form for OpenClaw" width="1800" height="1186" data-path="img/openclaw-agent-form.png" />
  </Step>

  <Step title="Write coordinator instructions">
    Give the EnConvo agent instructions that explain how it should work with OpenClaw.

    ```markdown theme={null}
    You coordinate the OpenClaw Main agent for the user.

    Use OpenClaw for agentic work, automation, and tasks that should run through the user's OpenClaw setup.
    Summarize what OpenClaw did, surface any blockers, and ask before destructive or irreversible actions.
    ```
  </Step>

  <Step title="Choose the OpenClaw model">
    In the agent's model settings, select **OpenClaw** and choose `openclaw:main`.
  </Step>

  <Step title="Save and use the agent">
    Start a conversation with the new EnConvo agent. It will use the selected OpenClaw agent model while retaining the EnConvo agent interface and tools you configured.
  </Step>
</Steps>

## Troubleshooting

<AccordionGroup>
  <Accordion title="OpenClaw does not appear in the model picker">
    Make sure the OpenClaw provider is enabled in **Settings** -> **AI Model**. If the model list is empty, verify that `openclaw agents list` works locally or use the default `openclaw:main`.
  </Accordion>

  <Accordion title="Validation fails with unauthorized">
    Recheck the Gateway token. EnConvo expects the value from `gateway.auth.token` and sends it as a Bearer token.
  </Accordion>

  <Accordion title="Connection fails">
    Confirm the Gateway is running with `openclaw gateway status`. If EnConvo is on another device, set `gateway.bind` to `lan`, restart the Gateway, and use the host's LAN IP in the base URL.
  </Accordion>

  <Accordion title="Start succeeds but EnConvo briefly says it needs attention">
    OpenClaw can report that the LaunchAgent restarted before the HTTP Gateway is ready. Wait a few seconds and check the setup card's runtime badge again. You can also verify directly with `openclaw gateway status` and `curl http://127.0.0.1:18789/health`.
  </Accordion>

  <Accordion title="The Gateway is running but `/v1/models` fails">
    Make sure EnConvo is using the same token as `gateway.auth.token` in `~/.openclaw/openclaw.json`. The setup status can still detect a running Gateway through `/health`, but model validation requires the bearer token.
  </Accordion>

  <Accordion title="Image attachments are ignored">
    The OpenClaw provider in EnConvo is currently text-only. EnConvo will not send image attachments to OpenClaw; choose a vision-capable provider for direct image input.
  </Accordion>

  <Accordion title="Wrong base URL">
    Enter `http://<gateway-host>:<port>/v1`. Do not include `/chat/completions` in the EnConvo base URL field.
  </Accordion>
</AccordionGroup>
