← 返回 Skills 市场
luoshixi

Kiro Cli Openclaw Bridge

作者 L · GitHub ↗ · v1.0.4 · MIT-0
cross-platform ⚠ suspicious
42
总下载
0
收藏
0
当前安装
5
版本数
在 OpenClaw 中安装
/install kiro-cli-openclaw-bridge
功能描述
通过本地 ACP-to-OpenAI Bridge 将 OpenClaw(或任何 OpenAI 兼容客户端)连接到 kiro-cli 的 ACP 后端,支持流式响应和工具调用。
使用说明 (SKILL.md)

Kiro CLI 与 OpenClaw 集成

Local proxy that translates OpenAI/Anthropic API requests into ACP JSON-RPC calls, enabling OpenClaw and other OpenAI-compatible clients to use kiro-cli as the AI backend.

Architecture

OpenClaw / Any Client  ──HTTP──▶  Bridge (FastAPI)  ──stdio──▶  kiro-cli acp
                                  :18788/v1                     JSON-RPC 2.0

从零开始完整搭建指南

Step 1: 安装 kiro-cli

# 下载安装 kiro-cli(如已安装跳过)
# 参考 kiro 官方文档安装,确保 kiro-cli 在 PATH 中
which kiro-cli  # 验证安装

Step 2: 认证 kiro-cli

kiro-cli auth
# 按提示完成登录认证,确保能正常使用
# 验证:
kiro-cli acp --help  # 应显示帮助信息

Step 3: 获取 Bridge

推荐从 GitHub Releases 下载预编译二进制(无需 Python 环境):

# 下载预编译二进制(约 15MB,支持 Linux/WSL 和 macOS)
# https://github.com/LuoShiXi/kiro-cli-openclaw-bridge/releases

# 或从源码构建:
git clone https://github.com/LuoShiXi/kiro-cli-openclaw-bridge.git
cd kiro-cli-openclaw-bridge

Step 4: 安装 Python 环境(源码运行方式)

# 需要 Python 3.10+
python3 --version  # 验证版本

# 创建虚拟环境
python3 -m venv .venv
source .venv/bin/activate

# 安装依赖
pip install -r requirements.txt

依赖清单(requirements.txt):

fastapi==0.115.12
uvicorn==0.34.3
pytest==8.3.5
pytest-asyncio==0.25.3
pyinstaller==6.12.0

Step 5: 启动 Bridge

# 方式 A:源码运行
source .venv/bin/activate
python -m acp_openai_bridge.main --cwd /your/project

# 方式 B:使用预编译二进制(如已构建)
./dist/acp-bridge --cwd /your/project

# 方式 C:构建后运行
./build.sh
./dist/acp-bridge --cwd /your/project

指定模型(可选):

python -m acp_openai_bridge.main --cwd /your/project --model claude-sonnet-4-20250514

启动成功标志:

ACP-to-OpenAI Bridge running at http://127.0.0.1:18788

Step 6: 验证 Bridge 运行

# 健康检查
curl http://127.0.0.1:18788/health
# 应返回:{"status":"ok","acp_available":true}

# 模型列表
curl http://127.0.0.1:18788/v1/models
# 应返回包含 kiro-acp 的模型列表

# 快速测试对话
curl -X POST http://127.0.0.1:18788/v1/chat/completions \
  -H "Content-Type: application/json" \
  -d '{"model":"kiro-acp","messages":[{"role":"user","content":"hello"}],"stream":false}'

Step 7: 配置 OpenClaw

编辑 ~/.openclaw/openclaw.json,在 models.providers 中添加:

{
  "models": {
    "mode": "merge",
    "providers": {
      "kiro-b": {
        "api": "openai-completions",
        "baseUrl": "http://127.0.0.1:18788/v1",
        "apiKey": "any-value",
        "models": [
          {
            "id": "kiro-acp",
            "name": "Kiro ACP",
            "input": ["text"],
            "contextWindow": 200000,
            "maxTokens": 65536
          }
        ]
      }
    }
  }
}

设置为默认模型(可选),在 agents.defaults 中添加:

{
  "agents": {
    "defaults": {
      "model": {
        "primary": "kiro-b/kiro-acp"
      },
      "models": {
        "kiro-b/kiro-acp": {
          "alias": "Kiro"
        }
      }
    }
  }
}

重启 OpenClaw 即可使用。

保存后在 OpenClaw 中选择该 Provider 和 kiro-acp 模型即可开始对话。


命令行参数

参数 环境变量 默认值 说明
--host ACP_BRIDGE_HOST 127.0.0.1 监听地址
--port ACP_BRIDGE_PORT 18788 监听端口
--kiro-cli-path ACP_BRIDGE_KIRO_CLI_PATH 自动查找 kiro-cli 路径
--cwd ACP_BRIDGE_CWD 当前目录 ACP 会话工作目录
--timeout ACP_BRIDGE_TIMEOUT 300 请求超时(秒)
--model ACP_BRIDGE_MODEL kiro-cli 默认 模型 ID

API 端点

Method Path Description
POST /v1/chat/completions OpenAI 聊天补全(支持 stream: true
POST /v1/messages Anthropic Messages API(支持 stream: true
GET /v1/models 模型列表
GET /health 健康检查

流式响应

stream: true 时:

  1. Bridge 发送 session/prompt 到 ACP 子进程
  2. 持续读取 session/update 中的 agent_message_chunk
  3. 实时转换为 OpenAI SSE chat.completion.chunk 格式
  4. 完成后发送 finish_reason[DONE]

工具执行

Bridge 透传 kiro-cli 的内置能力,所有操作受限于 --cwd 指定的项目目录。建议仅在信任的项目目录中使用,并保持服务绑定在 localhost。

故障排查

问题 解决方案
Bridge 启动但无响应 确认 kiro-cli auth 已完成;检查 --cwd 指向有效目录
Agent 卡在 tool_call stdout 缓冲区已设为 10MB;检查日志是否有 readline buffer overflow
OpenClaw 连接被拒 curl http://127.0.0.1:18788/health 验证 bridge 运行中
超时错误 增大 --timeout 600;复杂任务需要更多时间
kiro-cli 找不到 --kiro-cli-path /path/to/kiro-cli 显式指定

平台支持

平台 说明
WSL (Linux) 主要开发平台,自动检测 WSL
macOS ARM (M1/M2) 支持,自动查找 Homebrew 安装的 kiro-cli
macOS Intel 支持,查找 /usr/local/bin/kiro-cli

构建打包

./build.sh        # 构建单文件可执行程序 → dist/acp-bridge (~15MB)
./build.sh clean  # 清理构建产物

构建后的二进制无需 Python 环境即可运行。

项目地址

  • GitHub:https://github.com/LuoShiXi/kiro-cli-openclaw-bridge
安全使用建议
Before installing, verify the GitHub release or source you run, authenticate only the Kiro account you intend to use, start the bridge in a trusted and narrow project directory, and keep the service on localhost.
功能分析
Type: OpenClaw Skill Name: kiro-cli-openclaw-bridge Version: 1.0.4 The skill bundle provides instructions to set up a local FastAPI bridge that proxies OpenAI API requests to the `kiro-cli` tool via stdio. This involves high-risk behaviors such as downloading and executing external binaries/scripts from GitHub (https://github.com/LuoShiXi/kiro-cli-openclaw-bridge), running a local network server on port 18788, and performing authentication tasks (`kiro-cli auth`). While these actions appear aligned with the stated purpose of integration, the inherent risks of remote code execution and local service exposure via the SKILL.md instructions meet the threshold for a suspicious classification.
能力标签
cryptorequires-sensitive-credentials
能力评估
Purpose & Capability
The stated purpose is coherent: it connects OpenClaw or OpenAI-compatible clients to kiro-cli through a local bridge and explicitly supports streaming and tool calls.
Instruction Scope
The setup and test commands are presented as user-directed installation/configuration steps, with no artifact evidence of hidden prompt overrides, forced execution, or deceptive instructions.
Install Mechanism
This is an instruction-only skill with no packaged code; it tells users to download a prebuilt binary or clone/build from GitHub, so users need to verify the external code or release themselves.
Credentials
The bridge defaults to localhost and a user-selected --cwd project directory, which is proportionate, but the local API uses a placeholder API key and should not be exposed beyond the machine.
Persistence & Privilege
The skill requires kiro-cli authentication and runs a bridge process while started, but the artifacts do not show auto-start persistence, service installation, or hidden background behavior.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install kiro-cli-openclaw-bridge
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /kiro-cli-openclaw-bridge 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.4
**Bridge skill for integrating kiro-cli ACP with OpenClaw and OpenAI-compatible clients** - Updated skill name to **kiro-cli-openclaw-integration** - Added a detailed setup guide for connecting OpenClaw to kiro-cli via a local ACP-to-OpenAI Bridge - Included architecture overview, prerequisites, installation, and configuration steps - Documented supported API endpoints, command-line options, and streaming/tooling features - Added troubleshooting section and platform/build instructions for all users
v1.0.3
- Updated project name and description to clarify OpenClaw integration. - Expanded and clarified setup instructions, including full step-by-step guide from installation to usage. - Added detailed command-line parameter documentation and environment variable usage. - Provided example configuration for OpenClaw integration. - Documented API endpoints, streaming response behavior, and tool execution support. - Included troubleshooting tips, platform support table, and build instructions. - Project address updated for clear reference.
v1.0.2
kiro-cli-openclaw-bridge 1.0.2 Changelog - Renamed SKILL: now identified as kiro-cli-openclaw-integration. - Improved documentation with a comprehensive setup guide (in both Chinese and English). - Added detailed instructions for OpenClaw integration and proxy usage. - Clarified API endpoints, configuration options, and troubleshooting steps. - Documented supported platforms and binary build process. - Enhanced overview for both advanced and new users.
v1.0.1
kiro-cli-openclaw-bridge v1.0.1 - Renamed skill to kiro-cli-openclaw-integration. - Added comprehensive SKILL.md with quick start, configuration, troubleshooting, CLI options, API endpoints, streaming support, and packaging instructions. - Detailed setup guide for integrating kiro-cli with OpenClaw (and other OpenAI-compatible clients) via a local ACP-to-OpenAI bridge. - Updated documentation covers model selection, tool execution, and platform compatibility.
v1.0.0
Initial release of kiro-cli-openclaw-integration. - Provides an ACP-to-OpenAI Bridge to connect OpenClaw (or any OpenAI compatible client) to kiro-cli's ACP backend. - Supports streaming responses and built-in tool call execution. - Includes detailed setup instructions, platform support, configuration for OpenClaw, and troubleshooting guidance. - CLI and API endpoints documented for flexible deployment and integration. - Offers source-based and binary execution options, with build scripts included.
元数据
Slug kiro-cli-openclaw-bridge
版本 1.0.4
许可证 MIT-0
累计安装 0
当前安装数 0
历史版本数 5
常见问题

Kiro Cli Openclaw Bridge 是什么?

通过本地 ACP-to-OpenAI Bridge 将 OpenClaw(或任何 OpenAI 兼容客户端)连接到 kiro-cli 的 ACP 后端,支持流式响应和工具调用。 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 42 次。

如何安装 Kiro Cli Openclaw Bridge?

在 OpenClaw 或 Claude Code 对话框中运行命令「/install kiro-cli-openclaw-bridge」即可一键安装,无需额外配置。

Kiro Cli Openclaw Bridge 是免费的吗?

是的,Kiro Cli Openclaw Bridge 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。

Kiro Cli Openclaw Bridge 支持哪些平台?

Kiro Cli Openclaw Bridge 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。

谁开发了 Kiro Cli Openclaw Bridge?

由 L(@luoshixi)开发并维护,当前版本 v1.0.4。

💬 留言讨论