← Back to Plugins
Tools

Axonhub Provider

Kalstro By Kalstro 👁 50 views ▲ 0 votes

AxonHub AI Gateway provider plugin for OpenClaw

GitHub

Install

npm install

#

Configuration Example

{
  "plugins": {
    "entries": {
      "axonhub": {
        "enabled": true,
        "baseUrl": "http://localhost:8090"
      }
    }
  },
  "models": {
    "default": "axonhub/<model-id>"
  }
}

README

# OpenClaw AxonHub Provider

[![ClawHub](https://img.shields.io/badge/ClawHub-available-blue)](https://clawhub.ai)
[![npm](https://img.shields.io/npm/v/@axonhub/openclaw-axonhub-provider)](https://www.npmjs.com/package/@axonhub/openclaw-axonhub-provider)
[![License: MIT](https://img.shields.io/badge/License-MIT-green.svg)](LICENSE)

Connect [OpenClaw](https://github.com/openclaw/openclaw) to your [AxonHub](https://github.com/looplj/axonhub) AI gateway.

AxonHub is a self-hosted, OpenAI/Anthropic-compatible API gateway that unifies multiple upstream AI providers (OpenAI, Anthropic, Google Gemini, etc.) behind a single interface. This plugin lets OpenClaw use your AxonHub gateway as a model provider.

## Features

- **Automatic model discovery** — fetches available models from your AxonHub gateway
- **OpenAI-compatible** — uses the standard `openai-completions` transport
- **Configurable base URL** — point to any AxonHub instance (local or remote)
- **API key authentication** — via `AXONHUB_API_KEY` env var or CLI flag
- **Dynamic model resolution** — supports any model ID your gateway exposes

## Installation

### From ClawHub (recommended)

```bash
openclaw plugins install clawhub:@axonhub/openclaw-axonhub-provider
```

### From npm

```bash
openclaw plugins install @axonhub/openclaw-axonhub-provider
```

## Configuration

### Quick setup

```bash
# Set your AxonHub API key
export AXONHUB_API_KEY="your-api-key"

# Onboard with the plugin
openclaw onboard --axonhub-api-key your-api-key
```

### Manual configuration

Add to your `openclaw.json`:

```json
{
  "plugins": {
    "entries": {
      "axonhub": {
        "enabled": true,
        "baseUrl": "http://localhost:8090"
      }
    }
  },
  "models": {
    "default": "axonhub/<model-id>"
  }
}
```

### Environment variables

| Variable | Description |
|----------|-------------|
| `AXONHUB_API_KEY` | Your AxonHub API key |

### Plugin config

| Key | Type | Default | Description |
|-----|------|---------|-------------|
| `baseUrl` | string | `http://localhost:8090` | Your AxonHub gateway URL |

## Usage

After installation and configuration, select an AxonHub-hosted model:

```bash
# Use a specific model from your gateway
openclaw configure --model axonhub/gpt-4o

# Or set it in your openclaw.json
# models.default: "axonhub/<model-id>"
```

The plugin automatically discovers all models available on your AxonHub gateway via the `/v1/models` endpoint, including their capabilities (vision, tool calling, reasoning) and pricing.

## Requirements

- **OpenClaw** >= 2026.4.12
- **AxonHub** gateway running and accessible
- **Node.js** >= 22

## Development

```bash
# Install dependencies
npm install

# Build
npm run build

# Run tests
npm test

# Type check
npm run typecheck

# Watch mode
npm run dev
```

## Publishing

```bash
# Build first
npm run build

# Publish to ClawHub
clawhub package publish your-org/openclaw-axonhub-provider --dry-run
clawhub package publish your-org/openclaw-axonhub-provider

# Or publish to npm
npm publish --access public
```

## License

MIT — see [LICENSE](LICENSE) for details.

## Links

- [AxonHub](https://github.com/looplj/axonhub) — the AI gateway
- [OpenClaw](https://github.com/openclaw/openclaw) — the extensible AI gateway
- [ClawHub](https://clawhub.ai) — plugin registry
- [Report an issue](https://github.com/axonhub/openclaw-axonhub-provider/issues)
tools

Comments

Sign in to leave a comment

Loading comments...