Kimi Code is Moonshot AI’s open-source coding agent: the Kimi Code CLI reads and edits code, runs shell commands and plans its own steps – an AI harness for developers in the terminal, in a local web UI, and in editors that support the Agent Client Protocol. The project is licensed under MIT and works with Kimi models as well as with other providers. As of 20 September 2026.
What is Kimi Code?
Kimi Code comes from Moonshot AI, the company behind the Kimi models. The official MoonshotAI/kimi-code repository was created in May 2026, with first releases shipping that same month according to the changelog. It replaces the earlier, Python-based Kimi CLI (MoonshotAI/kimi-cli, since October 2025, Apache-2.0): per that project’s README, Kimi CLI is evolving into Kimi Code CLI, migrating configuration and sessions automatically on install. Kimi Code CLI itself is licensed under MIT.
The CLI ships as a single binary, installed via curl -fsSL https://code.kimi.com/kimi-code/install.sh | bash (macOS, Linux) or a PowerShell script on Windows; no Node.js is required. On Windows, the CLI needs Git for Windows because Git Bash serves as its shell. It starts with kimi, and /login offers Kimi Code OAuth or an API key from the Moonshot AI Open Platform. kimi web launches a local web UI, and kimi acp connects the CLI to Zed, JetBrains IDEs and other ACP-capable editors.
Kimi Code as an AI harness
At its core is an agentic loop with tiered autonomy. In the default “Always Ask” mode, only read operations run automatically; every file change and command needs individual confirmation. /yolo switches to “Ask When Needed”, and /auto to the unattended “Never Ask” mode. Shift-Tab switches the CLI into plan mode, where the agent first presents a plan for approval. A shell mode with a ! prompt runs your own commands and feeds their output into the context.
Kimi Code reads project instructions from AGENTS.md — in the project, under .kimi-code/AGENTS.md, or globally under ~/.kimi-code/AGENTS.md. MCP servers are configured in ~/.kimi-code/mcp.json or, per project, in .kimi-code/mcp.json. For subtasks, the built-in coder, explore and plan subagents run in isolated contexts; custom agents are defined as Markdown files. Skills (SKILL.md), a plugin marketplace, and lifecycle hooks in the [[hooks]] section of config.toml extend the harness, documented as deliberately fail-open rather than a sole safety barrier. For automation, kimi -p runs non-interactively, optionally with --output-format stream-json; a separate Kimi Agent SDK exposes the same runtime for Go, Node.js and Python.
Models and model access
By default, Kimi Code uses Kimi models from Moonshot AI, accessed via the managed Kimi Code service or the Moonshot AI Open Platform. The documentation also lists the provider types anthropic, openai, openai_responses, google-genai and vertexai, each described in config.toml under [providers.<name>] with a type and base_url; openai is explicitly meant for OpenAI-compatible third-party providers and gateways. Without touching the configuration, KIMI_MODEL_NAME, KIMI_MODEL_API_KEY and KIMI_MODEL_BASE_URL create a temporary provider.
This makes it possible to run Kimi Code through innFactory’s AI Gateway: register the OpenAI-compatible proxy as an openai-type provider with its own base_url, and gain budgets, per-team and per-agent cost centres, Microsoft Entra ID authentication, and logging. According to the documentation, KIMI_CODE_CUSTOM_HEADERS can attach additional HTTP headers to every request, for example when a gateway routes by header.
Enterprise use: data protection and governance
The chosen model access is decisive. With the managed Kimi service, prompts and source code go to Moonshot AI’s platform, headquartered in China; the CLI documentation makes no statements on EU data residency, fixed retention periods, or central admin controls, so the vendor’s privacy terms apply. Organisations that want to avoid this can configure a different provider or their own gateway instead.
Anonymous telemetry can be disabled with KIMI_DISABLE_TELEMETRY=1; standard proxy environment variables cover all outbound traffic. The documentation does not describe an execution sandbox, so the security model relies on approvals. In every case, source code and prompts go to the chosen model provider, and this data flow should be mapped in advance in an organisation’s records of processing activities.
Orchestrating Kimi Code with herdr
The terminal orchestrator herdr lists Kimi Code CLI among its supported agents, reading state from lifecycle hooks when installed and otherwise from a screen manifest; the integration covers state and session, so several Kimi Code sessions can be monitored alongside other coding agents from one terminal.
Where it fits: developer harness and enterprise harness
Kimi Code is a harness for developers: one repository, one terminal or editor, one person approving changes. For everyone else in the organisation, CompanyGPT is the matching harness — tools via MCP servers, integrations and n8n, context via companyRAG, roles from Entra ID or Keycloak, and audit logs, run in a customer’s own Azure environment or, sovereignly, on STACKIT. The AI Gateway forms the shared cost and governance layer for both. See our overview of all AI harnesses for other coding agents and orchestrators. We help organisations adopt Kimi Code and comparable harnesses with the right model access, clear approval rules, and centralised cost control.
