跳转到主要内容
本指南分为两部分:
  1. 将 AIsa 配置为 OpenClaw 的 LLM provider。
  2. 在 OpenClaw 中粘贴一段 prompt,让它连接 AIsa resource capabilities。

1. 将 AIsa 用作 LLM provider

如果你希望完全控制 OpenClaw 的模型配置——自定义模型列表、fallback chains、存储在系统 keychain 中的 auth profiles,或按 channel 路由——可以直接编辑 openclaw.json

Step 1: 获取 AIsa API key

1

登录 dashboard

3

创建新 key

给它一个类似 openclaw-local 的标签。立即复制该值(以 sk-aisa- 开头)——它只会显示一次。

Step 2: 设置 API key

把 key 添加到 ~/.openclaw/openclaw.json,或在 shell 中导出:
export AISA_API_KEY="YOUR_AISA_API_KEY"
建议使用环境变量,不要把 key 硬编码进 openclaw.json。请参阅 Authentication 了解轮换和存储最佳实践。

Step 3: 配置 AIsa provider

把下面的配置块添加到 ~/.openclaw/openclaw.json
{
  "env": {
    "AISA_API_KEY": "YOUR_AISA_API_KEY"
  },
  "models": {
    "mode": "merge",
    "providers": {
      "aisa": {
        "baseUrl": "https://api.aisa.one/v1",
        "apiKey": "${AISA_API_KEY}",
        "api": "openai-completions",
        "models": [
          { "id": "gpt-5-mini", "name": "GPT-5 Mini" },
          { "id": "kimi-k2.5", "name": "Kimi K2.5" },
          { "id": "claude-opus-4-8", "name": "Claude Opus 4.8" },
          { "id": "gemini-3.5-flash", "name": "Gemini 3.5 Flash" },
          { "id": "deepseek-v4-flash", "name": "DeepSeek V4 Flash" },
          { "id": "qwen3.7-max", "name": "Qwen3.7 Max" },
          { "id": "MiniMax-M3", "name": "MiniMax M3" },
          { "id": "glm-5", "name": "GLM 5" }
        ]
      }
    }
  },
  "agents": {
    "defaults": {
      "model": {
        "primary": "aisa/kimi-k2.5"
      },
      "models": {
        "aisa/kimi-k2.5": {}
      }
    }
  }
}
OpenClaw 现在会识别 aisa provider。引用任意模型时使用 aisa/<model-id> 格式。

Step 4: 重启 OpenClaw

openclaw gateway restart
你的 agents 现在会通过 AIsa 路由。

2. 连接 AIsa resource capabilities

当 OpenClaw 已经把 AIsa 用作 LLM provider 后,启动一个 OpenClaw session 并粘贴这段 prompt:
Read https://aisa.one/docs/agent-quickstart.md and help me safely connect, configure, and use AIsa's APIs, Skills, and LLMs in this agent environment.
OpenClaw 会获取 AIsa 面向 agent 的说明,并引导你完成 AIsa capabilities 的剩余设置。 之后,OpenClaw 就可以同时使用 AIsa 模型和 AIsa resource capabilities。 可以试试:
Use AIsa capabilities to search the web and summarize the latest information about OpenClaw.

视频 walkthrough

LLM model 格式

始终使用 aisa/<model-id>,例如 aisa/kimi-k2.5aisa/gpt-5aisa/claude-opus-4-8。你可以把任何支持的模型加入 provider config 的 models array;完整列表见 model catalog

高级配置

Fallback chains

如果 primary model 失败(上游 outage、rate limit),OpenClaw 可以自动使用 fallback model 重试:
{
  "agents": {
    "defaults": {
      "model": {
        "primary": "aisa/kimi-k2.5",
        "fallbacks": ["aisa/gpt-5-mini"]
      },
      "models": {
        "aisa/kimi-k2.5": {},
        "aisa/gpt-5-mini": {}
      }
    }
  }
}

Auth profiles(keychain storage)

把 API key 存入系统 keychain,避免写进 openclaw.json
1

声明 auth profile

{
  "auth": {
    "profiles": {
      "aisa:default": {
        "provider": "aisa",
        "mode": "api_key"
      }
    }
  }
}
2

通过 OpenClaw CLI 保存 key

openclaw auth set aisa:default --key "$AISA_API_KEY"
3

在 provider config 中引用 profile

"providers": {
  "aisa": {
    "apiKey": "auth:aisa:default",
    "baseUrl": "https://api.aisa.one/v1",
    "api": "openai-completions"
  }
}

Per-channel models

在每个 messaging platform 上使用不同模型:
{
  "telegram": {
    "agents": {
      "defaults": {
        "model": { "primary": "aisa/kimi-k2.5" }
      }
    }
  },
  "discord": {
    "agents": {
      "defaults": {
        "model": { "primary": "aisa/claude-opus-4-8" }
      }
    }
  }
}

监控用量

AIsa dashboard 中追踪支出和每次请求的详细信息。可参阅 Usage Logs 了解可查看的内容。

Troubleshooting

修复:
  1. 确认已设置 AISA_API_KEYecho $AISA_API_KEY
  2. 确认 openclaw.json 引用的是 ${AISA_API_KEY}(而不是字面量字符串)。
  3. 重启 OpenClaw,让它重新读取 env。
  4. 最后才考虑临时硬编码 key 来验证其他配置是否正常;验证后再改回 env。
修复:
  1. dashboard 中确认 key 有效。
  2. 确保 baseUrl 完全是 https://api.aisa.one/v1(不要有 trailing slash 问题)。
  3. 查看 Authentication 了解轮换建议。
修复:
  1. 对照 catalog 仔细检查 model ID。
  2. 确认模型已经列在 models.providers.aisa.models 中。
  3. 使用 aisa/<model-id> 形式引用它。
修复: 把这段 prompt 粘贴到 OpenClaw session 中:
Read https://aisa.one/docs/agent-quickstart.md and help me safely connect, configure, and use AIsa's APIs, Skills, and LLMs in this agent environment.

相关页面

Authentication

API key 生命周期、存储和最佳实践。

Model Catalog

当前模型 ID、上下文窗口、endpoint、能力和计费说明。

OpenClaw docs

OpenClaw 官方文档。