Skip to content

Kimi Code CLI support in RaiSE

This guide describes the supported, project-scoped Kimi Code CLI path for RaiSE. It is intentionally based on RaiSE's existing agent contracts: project instructions, .agents/skills/, and generated .kimi-code/mcp.json. It does not install a user-global plugin or modify Kimi source code.

Support matrix

Component Verified value Evidence
RaiSE CLI 3.1.0rc5 or later uv run rai --version
Kimi Code CLI 0.23.0 $HOME/.kimi-code/bin/kimi --version
Development branch release/3.1.0 .raise/manifest.yaml
Native instructions AGENTS.md S163310.2 E2E proof
Native skills .agents/skills/ S163310.2 E2E proof
Project MCP .kimi-code/mcp.json S163310.3 E2E proof

The runtime versions above are the versions used for the contribution evidence; verify them again before reproducing.

Quick start

From a RaiSE Commons checkout:

export RAISE_COMMONS_ROOT="$PWD"
export KIMI_BIN="$HOME/.kimi-code/bin/kimi"

uv run rai --version
"$KIMI_BIN" --version
uv run rai init --path /tmp/rai-kimi-check --agent kimi --force

The generated project contains:

  • AGENTS.md for project instructions.
  • .agents/skills/ for the RaiSE skill tree.
  • .kimi-code/mcp.json for project-scoped MCP configuration.

The generated MCP entry is portable and contains no credential:

{
  "mcpServers": {
    "rai-workspace": {
      "command": "rai-mcp-pipeline",
      "args": ["--project", "."]
    }
  }
}

Native read verification

Run Kimi from the generated project, not from the RaiSE Commons checkout:

cd /tmp/rai-kimi-check
PATH="$RAISE_COMMONS_ROOT/.venv/bin:$PATH" \
  "$KIMI_BIN" --output-format text \
  -p 'Read AGENTS.md and .agents/skills/rai-session-start/SKILL.md. Return the exact relative paths and confirm that no file was modified. Do not inspect or modify anything else.'

Expected response includes the two relative paths and a no-write confirmation.

Real RaiSE MCP verification

From the same generated project:

PATH="$RAISE_COMMONS_ROOT/.venv/bin:$PATH" \
  "$KIMI_BIN" --output-format stream-json \
  -p 'Use the configured rai-workspace MCP server. Invoke exactly one read-only raise_graph_query call with query "Kimi MCP integration" and limit 1. Report the tool name, connection status and result. Do not modify files.'

Success means Kimi emits mcp__rai-workspace__raise_graph_query, the tool result has status: ok, and the generated project remains unchanged by the prompt. Graph content is environment-dependent; the contract being tested is server startup, dispatch and a valid result.

Troubleshooting

The MCP server is not found

Ensure the RaiSE worktree environment is first on PATH:

PATH="$RAISE_COMMONS_ROOT/.venv/bin:$PATH" command -v rai-mcp-pipeline

Use the generated project .kimi-code/mcp.json; do not copy a machine-specific absolute MCP path into the repository.

Kimi prompt mode rejects --auto or --yolo

Kimi Code CLI 0.23.0 does not combine prompt mode with those flags. The evidence uses a non-interactive -p prompt without either option.

RaiSE uses the wrong executable

Run all contribution commands through the checkout-owned environment:

uv run rai --version
uv run pytest ...

Do not infer support from a globally installed rai version.

A global Kimi MCP file appears

Stop and inspect the command that created it. RaiSE support is project-scoped; rai init --agent kimi should write .kimi-code/mcp.json inside the generated project and should not write $HOME/.kimi-code/mcp.json.

The package-wide gate stalls

The Kimi contribution has focused agent/MCP checks and a real MCP read proof. On this macOS/Python 3.13 environment, the unscoped raise-cli package gate can stall in the embedding-backed workload (hf_xet) without producing a completion result. Do not label that run green; record the exact environment, keep focused gates separate, and use the story evidence for maintainer review.

Contribution scope

Kimi support does not require a fork or changes to Kimi. The contribution targets RaiSE Commons release/3.1.0 and consists of RaiSE agent integration, generated project configuration, lifecycle parity repairs, portable verification fixes, tests and evidence. The exact story/commit map and merge-request checklist are in work/epics/etmp-163310ea-kimi-code-cli-support/stories/s163310.5-contribution.md.

Official Kimi references