API & 開発者ガイド

カスタムスキル、REST API インテグレーション、ウェブフックで ClawBox を拡張しましょう。強力な自動化を構築し、外部サービスと接続できます。

クイックスタート

Terminal
# Connect to your ClawBox via SSH
# Default credentials: user "clawbox", password "clawbox"
ssh clawbox@clawbox.local

# Check API status
curl http://clawbox.local:8080/api/status

# Send a message
curl -X POST http://clawbox.local:8080/api/chat \
  -H "Content-Type: application/json" \
  -d '{"message": "Hello, ClawBox!"}'

REST API

ClawBox はプログラムによる制御のためのローカル REST API を公開しています。

GET/api/status

ClawBox の現在のステータスを確認します。

:

curl http://clawbox.local:8080/api/status
POST/api/chat

メッセージを送信してAI応答を受け取ります。

:

curl -X POST -H "Content-Type: application/json" -d {"message": "Hello"} http://clawbox.local:8080/api/chat
GET/api/skills

インストール済みのすべてのスキルとそのステータスを一覧表示します。

:

curl http://clawbox.local:8080/api/skills
PUT/api/config

ClawBox の設定を更新します。

:

curl -X PUT -H "Content-Type: application/json" -d {"voice": true} http://clawbox.local:8080/api/config

カスタムスキルの構築

スキルは ClawBox の機能を拡張する Python モジュールです。トリガーへの応答、API の呼び出し、外部サービスとの連携が可能です。

スキルの構造

my-skill/
├── manifest.json      # Skill metadata
├── handler.py         # Main skill logic
├── requirements.txt   # Python dependencies
└── README.md          # Documentation

manifest.json

{
  "name": "weather-skill",
  "version": "1.0.0",
  "description": "Get weather information",
  "triggers": ["weather", "forecast", "temperature"],
  "author": "Your Name",
  "permissions": ["network"]
}

handler.py

from openclaw import Skill, Response

class WeatherSkill(Skill):
    def handle(self, message: str, context: dict) -> Response:
        # Parse location from message
        location = self.extract_location(message)

        # Fetch weather data
        weather = self.get_weather(location)

        return Response(
            text=f"Weather in {location}: {weather['temp']}°C",
            data=weather
        )

スキルのインストール

Terminal
# Install a skill from GitHub
openclaw skill install github.com/user/weather-skill

# Install from local directory
openclaw skill install ./my-skill

# List installed skills
openclaw skill list

# Remove a skill
openclaw skill remove weather-skill

ウェブフック

ClawBox でイベントが発生したときにリアルタイム通知を受け取ります。

利用可能なイベント

🔔message.received
🔔message.sent
🔔skill.triggered
🔔system.status

認証

API リクエストにはベアラートークンによる認証が必要です。CLI を使用してトークンを生成してください。

# Generate API token
openclaw token generate --name "my-app"

# Use token in requests
curl -H "Authorization: Bearer YOUR_TOKEN" \
  http://clawbox.local:8080/api/chat

開発者リソース

Don't have ClawBox yet?

Order yours and start using all these features — setup takes 5 minutes.

Order ClawBox — €549