# Engine: Kimi Code

Moonshot AI's coding agent, **beta**. Harness runs Kimi Code as it is; what differs from Claude Code is listed in the
box **What changes with Kimi Code** (Settings -> Engine -> Kimi Code). See [Engines](engines.md) for what is common to
every engine.

## Sign-in and providers

A key: **OpenRouter**'s, or **Moonshot AI API**'s own (models named `moonshotai/<model>`, at its own prices). Put it in
Settings -> Keys, then choose it in Settings -> Providers. With a **Kimi Code plan**, paste the
plan's API key instead and choose it for **Kimi Code plan** (models named `kimi-code-plan-global/<model>`, kimi.ai
accounts). There is no sign-in button: the key is enough. **Install** in its panel downloads the version Harness
was tested with (it needs Node.js 22.19 or newer on the server); its data stays in Harness's own folder.

## Models

`provider/model`: Moonshot's models of the provider's catalogue are listed (`openrouter/moonshotai/kimi-k2.7-code` by
default), and any other model of the provider can be picked as a favourite. No effort levels.

## What works

Conversation, thinking, tools, files and the Changes view, memory, skills, MCP servers, steer, agents, the Sandbox mode
of a topic, sandboxed agents, the small calls.

## How Harness adapts it

- **Memory**: the folder's CLAUDE.md, its imports and the levels above are given as its instructions. Each session has
  its own Kimi folder, so two sessions never share instructions.
- **Rules**: Kimi Code runs in its "ask nothing" mode, and its rules are not ones Harness relies on, so rules hold
  **inside the Sandbox only** (see [Engines](engines.md)): there, Harness's sandbox goes around the whole of Kimi Code.
  Outside it, a session runs with full access and a note says so once per session.
- **MCP servers**: those of Settings -> MCP and Harness's own are given to it at the start of each message.
- **Its own scheduled tasks are off**: a run of Kimi Code lasts one message. Use Harness's scheduled jobs.

## Limits

- **No cost**: Kimi Code does not say what a turn cost nor the tokens of each call. The cost shows as unknown, a
  budget (an agent's daily limit, a job's budget) is refused with the reason, and the usage shown is the size of the
  conversation.
- Refused with the reason, never run on another engine: plan mode, the Ask me mode and an agent's approvals, Add to
  task, side questions, an agent's own rules. Pictures attached to a message are given as file paths. It cannot ask
  you questions in the middle of a turn.

## From a terminal

```
maxxing engines install kimi
maxxing engines provider openrouter OPENROUTER_API_KEY
maxxing engines use kimi
maxxing engines model kimi openrouter/moonshotai/kimi-k2.7-code
```
