# OpenClaw × Vivgrid

> Source: https://vivgrid.com/docs/tutorials/clawdbot

How to configure OpenClaw to use advanced LLMs through Vivgrid's unified model gateway

## Configure OpenClaw to Use Vivgrid

By configuring OpenClaw to use Vivgrid as its model provider, you can access advanced LLMs through a single, stable endpoint.
Vivgrid acts as an LLM gateway that manages model selection, upgrades, and routing, so OpenClaw is not tied to a specific model or vendor.


<Steps>
  <Step title ="Step 1: Create a New Agent Project in Vivgrid">
    First, open the [Vivgrid Console](https://console.vivgrid.com), create a new project, and select `OpenClaw Model`:

    ![Create New Project on Vivgrid](/images/openclaw-1.png)
  </Step>
  <Step title ="Step 2: Get your Vivgrid API Key">
    After creating the project, go to `API Endpoint` and copy your API key.

    ![Get Vivgrid API Key](/images/openclaw-2.png)
  </Step>
  <Step title ="Step 3: Configure OpenClaw to Use Vivgrid">
    Next, add Vivgrid as a model provider in your `openclaw.json` configuration file, and set the agent's primary model to `vivgrid/auto`:

    ```json ~/.openclaw/openclaw.json lines icon="rust" highlight={4-15,28-30}
    {
      "models": {
        "providers": {
          "vivgrid": {
            "baseUrl": "https://api.vivgrid.com/v1",
            "apiKey": "viv-openclaw-xxxxxxxxxxxxxxxxxxxx",
            "api": "openai-completions",
            "models": [
              {
                "id": "auto",
                "name": "auto",
                "contextWindow": 128000
              }
            ]
          }
        }
      },
      "agents": {
        "defaults": {
          "maxConcurrent": 4,
          "subagents": {
            "maxConcurrent": 8
          },
          "compaction": {
            "mode": "safeguard"
          },
          "workspace": "/home/cc/clawd",
          "model": {
            "primary": "vivgrid/auto"
          }
        }
      },
      // ... other configurations ...
    }
    ```
  </Step>
  <Step title ="Step 4: Restart the OpenClaw Service">
    After saving the configuration, restart the OpenClaw gateway service to apply the changes:

    ```sh
    openclaw gateway restart
    ```
  </Step>
  <Step title ="Step 5: Change the LLM Model Anytime in the Vivgrid Console">
    You can change the underlying LLM at any time in the Vivgrid Console without modifying OpenClaw's configuration. Simply go to your project's `Settings` tab and select the model you want (for example, `gemini-3-pro-preview` or `DeepSeek-V3.2`).

    ![](/images/vg-dashboard-models.png)
  </Step>
  {/* <Step title="Step 6: Enable Insights for detailed observability for your OpenClaw">
    For better monitoring and debugging, enable `Insights` in the Vivgrid Console. This will provide detailed logs of model interactions, latency, and errors.

    ![](/images/vg-dashboard-insights.png)
  </Step> */}
</Steps>

## Best Practices

Use `vivgrid/auto` as the primary model for OpenClaw agents.

By setting the model to `vivgrid/auto`, OpenClaw connects to Vivgrid's managed routing layer instead of a fixed LLM. This allows you to:

- Upgrade or switch underlying LLMs at any time in the Vivgrid Console
- Avoid changing `openclaw.json` when models evolve
- Eliminate service restarts for model upgrades
- Keep your agent configuration stable and future-proof

This is the recommended setup for production environments.
