# OpenClaw

Connect OpenClaw to Tensorix.ai and run a privacy-focused AI assistant on WhatsApp, Telegram, Discord, iMessage, and more — powered by open-source models.

***

## What is OpenClaw?

[OpenClaw](https://openclaw.ai) is an open-source, self-hosted AI agent gateway that connects AI models to your favorite messaging platforms. It's the #1 app on [OpenRouter](https://openrouter.ai/apps) by usage. By configuring Tensorix as a custom provider, you can run powerful open-source models like GLM-5.1, MiniMax, and DeepSeek across all your chat channels.

{% hint style="success" %}
**Why OpenClaw + Tensorix?**

* 🔒 **Privacy-first** — Self-hosted gateway + EU-hosted models with zero data retention
* 💰 **Cost-effective** — 50–70% cheaper than Claude
* 📱 **Multi-platform** — WhatsApp, Telegram, Discord, Slack, iMessage, Signal, and more
* 🤖 **Multiple models** — Choose from GLM-5.1, MiniMax, DeepSeek, Kimi, and others
* 🛡️ **Secure** — Pairing system prevents unauthorized access
* 🌐 **Control UI** — Browser dashboard for chat, config, and session management
  {% endhint %}

***

## Prerequisites

* **Node.js** >= 22 ([download here](https://nodejs.org/))
* **macOS, Linux, or Windows** (PowerShell installer available)
* A Tensorix API key ([sign up here](https://app.tensorix.ai/register))

***

## Installation

### Step 1: Install OpenClaw

{% tabs %}
{% tab title="macOS / Linux / WSL2" %}

```bash
curl -fsSL https://openclaw.ai/install.sh | bash
```

{% endtab %}

{% tab title="Windows (PowerShell)" %}

```powershell
iwr -useb https://openclaw.ai/install.ps1 | iex
```

{% endtab %}

{% tab title="npm" %}

```bash
npm install -g openclaw@latest
```

{% endtab %}
{% endtabs %}

Verify installation:

```bash
openclaw --version
```

***

## Configuration

### Step 2: Run the Onboarding Wizard

```bash
openclaw onboard --install-daemon
```

The wizard guides you through auth, gateway settings, and optional channels. Accept the defaults to get started quickly.

### Step 3: Configure Tensorix as a Custom Provider

OpenClaw uses a JSON5 config file at `~/.openclaw/openclaw.json`. Add Tensorix as a custom provider:

```json5
// ~/.openclaw/openclaw.json
{
  models: {
    providers: {
      tensorix: {
        api: "openai-completions",
        baseUrl: "https://api.tensorix.ai/v1",
        apiKey: "${TENSORIX_API_KEY}",
      }
    }
  },
  agents: {
    defaults: {
      model: "tensorix/z-ai/glm-5.1",
      models: {
        "tensorix/z-ai/glm-5.1": { alias: "glm" },
        "tensorix/deepseek/deepseek-chat-v3.1": { alias: "deepseek" },
        "tensorix/deepseek/deepseek-r1-0528": { alias: "r1" },
        "tensorix/minimax/minimax-m2.5": { alias: "minimax" },
        "tensorix/moonshotai/kimi-k2.5": { alias: "kimi" },
      }
    }
  }
}
```

Then set your API key in `~/.openclaw/.env`:

```bash
echo 'TENSORIX_API_KEY=your-tensorix-api-key-here' >> ~/.openclaw/.env
```

{% hint style="warning" %}
**Important:** Replace `your-tensorix-api-key-here` with your actual Tensorix API key from [app.tensorix.ai](https://app.tensorix.ai/dashboard).
{% endhint %}

### Step 4: Restart the Gateway

```bash
openclaw gateway restart
```

### Step 5: Verify Setup

```bash
# Check gateway status
openclaw gateway status

# Open the Control UI in your browser
openclaw dashboard
```

The Control UI opens at `http://127.0.0.1:18789/`. Send a test message to verify the connection.

***

## Recommended Models

OpenClaw works with all Tensorix models. Switch models in chat with `/model <alias>` or update `agents.defaults.model` in config.

| Model                         | Alias      | Best For                       |
| ----------------------------- | ---------- | ------------------------------ |
| `z-ai/glm-5.1` ⭐              | `glm`      | Coding, reasoning, general use |
| `minimax/minimax-m2.5`        | `minimax`  | Reasoning, function calling    |
| `moonshotai/kimi-k2.5`        | `kimi`     | Vision, long context           |
| `minimax/minimax-m2`          | —          | Fast responses, cost-sensitive |
| `deepseek/deepseek-chat-v3.1` | `deepseek` | General chat, balanced         |
| `deepseek/deepseek-r1-0528`   | `r1`       | Complex reasoning tasks        |

***

## Adding Chat Channels

OpenClaw supports WhatsApp, Telegram, Discord, Slack, iMessage, Signal, Google Chat, Mattermost, MS Teams, IRC, and more.

### WhatsApp

```bash
openclaw channels login
```

Scan the QR code in **WhatsApp → Settings → Linked Devices**, then approve the pairing:

```bash
openclaw pairing approve whatsapp WA-XXXXX
```

### Telegram

1. Create a bot via [@BotFather](https://t.me/BotFather) and copy the bot token
2. Add to `~/.openclaw/.env`:

   ```bash
   TELEGRAM_BOT_TOKEN=123456:ABC-DEF1234ghIkl-zyx57W2v1u123ew11
   ```
3. Restart and approve pairing:

   ```bash
   openclaw gateway restart
   openclaw pairing approve telegram TG-XXXXX
   ```

### Discord

1. Create a bot at the [Discord Developer Portal](https://discord.com/developers/applications) and copy the token
2. Add to `~/.openclaw/.env`:

   ```bash
   DISCORD_BOT_TOKEN=your_discord_bot_token_here
   ```
3. Restart the gateway:

   ```bash
   openclaw gateway restart
   ```

{% hint style="info" %}
See the [OpenClaw channels documentation](https://docs.openclaw.ai/channels/telegram) for setup guides for all supported platforms.
{% endhint %}

***

## Multi-Agent Routing

Run multiple agents with different models for different purposes:

```json5
// ~/.openclaw/openclaw.json
{
  agents: {
    list: [
      { id: "coder", model: "tensorix/z-ai/glm-5.1", default: true },
      { id: "thinker", model: "tensorix/deepseek/deepseek-r1-0528" },
    ],
    defaults: {
      // ... provider config from above
    }
  },
  bindings: [
    { match: { channel: "telegram" }, agent: "thinker" },
    { match: { channel: "whatsapp" }, agent: "coder" },
  ]
}
```

***

## Common Commands

```bash
# Gateway
openclaw gateway status           # Check status
openclaw gateway start            # Start gateway
openclaw gateway stop             # Stop gateway
openclaw gateway restart          # Restart gateway
openclaw dashboard                # Open Control UI
openclaw doctor                   # Diagnose issues

# Channels & Pairing
openclaw channels login                       # Connect a channel
openclaw pairing list                         # List pending pairings
openclaw pairing approve <channel> <code>     # Approve pairing

# Configuration
openclaw configure                # Interactive config wizard
openclaw config get <key>         # Read a config value
openclaw config set <key> <val>   # Set a config value
```

***

## Troubleshooting

### Gateway Won't Start

```bash
# Check if the port is in use
lsof -i :18789

# Run diagnostics
openclaw doctor
```

### No Response from Model

1. Verify your Tensorix API key works:

   ```bash
   curl https://api.tensorix.ai/v1/models \
     -H "Authorization: Bearer YOUR_TENSORIX_KEY"
   ```
2. Check your config for typos:

   ```bash
   openclaw config get models.providers.tensorix
   ```
3. Restart the gateway:

   ```bash
   openclaw gateway restart
   ```

### Channel Not Working

```bash
# Check gateway logs
openclaw logs

# Verify channel status
openclaw channels status
```

***

## Cost Optimization

| Use Case         | Recommended Model             | Why                                 |
| ---------------- | ----------------------------- | ----------------------------------- |
| Simple questions | `minimax/minimax-m2`          | Fast and cheap                      |
| Coding tasks     | `z-ai/glm-5.1`                | Best coding performance             |
| Deep reasoning   | `deepseek/deepseek-r1-0528`   | Worth the cost for complex problems |
| General chat     | `deepseek/deepseek-chat-v3.1` | Balanced performance and cost       |
| Vision tasks     | `moonshotai/kimi-k2.5`        | Image understanding, long context   |

Use OpenClaw's pairing system to prevent unauthorized usage that would consume your credits.

***

## Resources

* **OpenClaw Documentation:** [docs.openclaw.ai](https://docs.openclaw.ai/)
* **OpenClaw GitHub:** [github.com/openclaw/openclaw](https://github.com/openclaw/openclaw)
* **Tensorix Models:** [tensorix.ai/models](https://tensorix.ai/models)
* **Tensorix Dashboard:** [app.tensorix.ai](https://app.tensorix.ai/dashboard)

***

## FAQ

**Q: Do I need an Anthropic or OpenAI account?**

No! Tensorix provides all the models you need. You only need a Tensorix API key.

**Q: Can I switch between models on the fly?**

Yes! Use `/model <alias>` in any chat to switch models mid-conversation (e.g., `/model r1` for reasoning tasks).

**Q: Can I switch back to Claude or another provider later?**

Yes. Update the `models.providers` section in `~/.openclaw/openclaw.json` to point to a different provider, or add multiple providers and switch between them.

**Q: Which model should I start with?**

We recommend `z-ai/glm-5.1` for most use cases. It offers excellent coding capabilities, strong reasoning, and good general performance.

***

**Need help?** Contact <support@tensorix.ai> or check the [OpenClaw documentation](https://docs.openclaw.ai/).


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.tensorix.ai/ai-agents-and-chatbots/moltbot.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
