← Back to Skills Marketplace
luoshixi

Kiro Cli Openclaw Bridge

by L · GitHub ↗ · v1.0.4 · MIT-0
cross-platform ⚠ suspicious
42
Downloads
0
Stars
0
Active Installs
5
Versions
Install in OpenClaw
/install kiro-cli-openclaw-bridge
Description
通过本地 ACP-to-OpenAI Bridge 将 OpenClaw(或任何 OpenAI 兼容客户端)连接到 kiro-cli 的 ACP 后端,支持流式响应和工具调用。
README (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
Usage Guidance
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.
Capability Analysis
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.
Capability Tags
cryptorequires-sensitive-credentials
Capability Assessment
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.
How to Use
  1. Make sure OpenClaw is installed (local or Docker)
  2. Run the install command in chat: /install kiro-cli-openclaw-bridge
  3. After installation, invoke the skill by name or use /kiro-cli-openclaw-bridge
  4. Provide required inputs per the skill's parameter spec and get structured output
Version History
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.
Metadata
Slug kiro-cli-openclaw-bridge
Version 1.0.4
License MIT-0
All-time Installs 0
Active Installs 0
Total Versions 5
Frequently Asked Questions

What is Kiro Cli Openclaw Bridge?

通过本地 ACP-to-OpenAI Bridge 将 OpenClaw(或任何 OpenAI 兼容客户端)连接到 kiro-cli 的 ACP 后端,支持流式响应和工具调用。 It is an AI Agent Skill for Claude Code / OpenClaw, with 42 downloads so far.

How do I install Kiro Cli Openclaw Bridge?

Run "/install kiro-cli-openclaw-bridge" in the OpenClaw or Claude Code chat to install it in one step — no extra setup required.

Is Kiro Cli Openclaw Bridge free?

Yes, Kiro Cli Openclaw Bridge is completely free, licensed under MIT-0. You can download, install and use it at no cost.

Which platforms does Kiro Cli Openclaw Bridge support?

Kiro Cli Openclaw Bridge is cross-platform and runs anywhere OpenClaw / Claude Code is available (cross-platform).

Who created Kiro Cli Openclaw Bridge?

It is built and maintained by L (@luoshixi); the current version is v1.0.4.

💬 Comments