OpenClaw + AIClient-2-API 部署指南
本目录包含用于配置 OpenClaw 使用 AIClient-2-API (Kiro) 的部署脚本和配置文件。
📁 文件说明
deploy_openclaw_with_aiclient.ps1- 自动部署脚本(Windows PowerShell)openclaw-config-example.json- OpenClaw 配置示例install.ps1- OpenClaw 官方安装脚本(参考)README.md- 本文档
🚀 快速开始
前置条件
-
AIClient-2-API 已安装并运行
- 服务地址:
http://127.0.0.1:4000 - API Key: 在
AIClient-2-API/configs/config.json中配置
- 服务地址:
-
Kiro IDE 已登录
- 确保 Kiro 认证 token 存在:
~/.aws/sso/cache/kiro-auth-token.json
- 确保 Kiro 认证 token 存在:
一键部署
在 PowerShell 中运行:
cd AIClient-2-API/deploy-clawdbot
.\deploy_openclaw_with_aiclient.ps1
部署选项
脚本提供以下选项:
- 完整安装(推荐) - 自动安装 OpenClaw 并配置 AIClient-2-API
- 仅安装 OpenClaw - 只安装 OpenClaw,不配置
- 仅配置 AIClient-2-API - 为已安装的 OpenClaw 添加配置
- 检查安装状态 - 查看当前安装和配置状态
- 清理配置 - 删除 OpenClaw 配置(会备份)
⚙️ 配置说明
自动配置
脚本会自动创建配置文件:~/.openclaw/openclaw.json
配置内容包括:
- Provider:
aiclient-kiro - Base URL:
http://127.0.0.1:4000/v1 - API Key: 你在安装时输入的 key(默认
hotyi) - Model:
claude-sonnet-4-5
手动配置
如果需要手动配置,可以参考 openclaw-config-example.json:
{
"agents": {
"defaults": {
"model": {
"primary": "aiclient-kiro/claude-sonnet-4-5"
},
"models": {
"aiclient-kiro/claude-sonnet-4-5": {
"alias": "Claude Sonnet 4.5 (Kiro)"
}
}
}
},
"models": {
"mode": "merge",
"providers": {
"aiclient-kiro": {
"baseUrl": "http://127.0.0.1:4000/v1",
"apiKey": "hotyi",
"api": "openai-completions",
"models": [
{
"id": "claude-sonnet-4-5",
"name": "Claude Sonnet 4.5 via Kiro",
"reasoning": false,
"input": ["text", "image"],
"cost": {
"input": 0,
"output": 0,
"cacheRead": 0,
"cacheWrite": 0
},
"contextWindow": 200000,
"maxTokens": 8192
}
]
}
}
}
}