AgentBox OpenRouter Integration for Openclaw

A dedicated utility to configure OpenRouter as the primary LLM provider for your AI agent environment.

tenequm
v1.0.0
Feb 26, 2026
0
475
0

Install & Download

1. ClawHub CLI

The fastest way to install a skill directly from the registry.

npx clawhub@latest install agentbox-openrouter

2. Manual Installation

Copy the skill folder to one of these locations

Global
~/.openclaw/skills/
Workspace
<project>/skills/

Priority: Workspace > Local > Bundled

3. Prompt Installation

Copy this prompt to OpenClaw to install it automatically.

Help me install agentbox-openrouter using Clawhub. If Clawhub is not installed, install it first (npm i -g clawhub).

Prefer to download?

Get the raw skill files in a ZIP archive.

What is AgentBox OpenRouter Integration?

The OpenRouter Setup skill enables developers to connect their AI agent instances to a vast array of Large Language Models through a single unified API. By leveraging this integration within your Openclaw Skills library, you can easily switch between providers like Anthropic, OpenAI, Google, and Meta without changing your codebase or environment structure.

This skill automates the configuration of the local environment, ensuring that your agent uses the most capable models available. It handles the complexities of JSON configuration management and service restarts, making it a vital addition to your collection of Openclaw Skills for maintaining flexible and powerful AI workflows.

AgentBox OpenRouter Integration Use Cases

  • Switching from default blockrun providers to high-performance models like Claude 3.5 Sonnet or GPT-4o.
  • Centralizing multi-provider access through a single OpenRouter API key to simplify billing and access.
  • Experimenting with various LLM architectures from Anthropic, Meta, or Google within a standardized agent environment.
  • Migrating existing agent configurations to use OpenRouter as the primary backend gateway.

How AgentBox OpenRouter Integration Works

  1. Verify the existence of an OpenRouter account and retrieve a valid API key starting with the sk-or- prefix.
  2. Select a target model identifier (e.g., openrouter/anthropic/claude-sonnet-4-5) to serve as the primary agent intelligence.
  3. Read the existing OpenClaw configuration file located at ~/.openclaw/openclaw.json to preserve existing settings.
  4. Update the environment variables and default model paths using jq to ensure JSON integrity and technical accuracy.
  5. Restart the OpenClaw gateway via CLI to apply the new provider settings to the active agent session.
  6. Verify the connection status and model availability using the status command.

AgentBox OpenRouter Integration Setup

To get started with these Openclaw Skills, obtain your API key from the OpenRouter dashboard. Then, use the following commands to update your configuration:

# Read current configuration
cat ~/.openclaw/openclaw.json

# Update the API key and primary model using jq
jq --arg key "sk-or-YOUR_API_KEY" \
   --arg model "openrouter/anthropic/claude-sonnet-4-5" \
   '.env.OPENROUTER_API_KEY = $key | .agents.defaults.model.primary = $model' \
   ~/.openclaw/openclaw.json > /tmp/openclaw-update.json \
   && mv /tmp/openclaw-update.json ~/.openclaw/openclaw.json

# Restart the gateway to apply changes
openclaw gateway restart

# Verify the setup
openclaw status

AgentBox OpenRouter Integration Data Schema & Taxonomy

The skill modifies the central configuration file with the following schema updates to integrate with the broader Openclaw Skills ecosystem:

Key Path Description Example Value
.env.OPENROUTER_API_KEY The authentication token for OpenRouter access. sk-or-v1-abc...
.agents.defaults.model.primary The identifier for the default model used by the agent. openrouter/anthropic/claude-sonnet-4-5
/tmp/openclaw-update.json Temporary buffer used during the jq transformation process. N/A

AgentBox OpenRouter Integration Advanced Features

  • Support for dynamic model switching across multiple providers (Anthropic, OpenAI, Meta, Google) via a single API endpoint.
  • Automated validation of API key formats to prevent configuration errors before restarting the gateway.
  • Seamless integration with the OpenClaw CLI for zero-downtime-like restarts during model updates.
  • Full compatibility with custom model routing and specific model versions within the Openclaw Skills framework.

SKILL.md


Loading

Related Openclaw Skills

METADATA

Github Stars: 0
forks: 0

Featured*