Using in Other Agents
Kimi Code CLI and the desktop app include a built-in local server for the Kimi Agent Protocol, or KAP. Other AI agents, such as Claude Code, Codex, and Cursor, can interact with your local Kimi Code to hand off sessions in either direction, organize session history across workspaces, or assemble an Agent Team for multi-round plan discussions.
Choosing an integration method
Choose a protocol based on whether you need a one-shot run, editor integration, or cross-agent collaboration.
| What you want to do | Protocol and usage | Characteristics |
|---|---|---|
| Run one-shot tasks such as benchmarks or fire-and-collect prompts | kimi -p — see Print mode | Executes a single unattended prompt and exits when finished. |
| Embed Kimi Code into an IDE or custom client | ACP via kimi acp — see Kimi Code ACP | Connects to ACP-capable editors such as Zed and JetBrains, bound to the host window with editor-delegated file and terminal operations. |
| Collaborate across agents or manage sessions | Kimi Agent Protocol, described in this guide | Connects to your local Kimi Code for bidirectional session handoff, cross-workspace session cleanup, and Agent-to-Agent discussions. |
Prerequisites
Before starting, check the installed versions and your sign-in state:
- Version requirements: Kimi Code CLI >= v2.7.0 and Kimi Code Desktop >= v1.4.0.
- Signed in or model configured: Run
kimi loginor configure a model provider beforehand. See Getting Started.
Install the use-kimi-code Skill
Install the use-kimi-code Skill when you want another agent to use the prepared handoff and session-management workflows.
Install with the CLI
npx skills add https://code.kimi.com/kimi-code/skills/use-kimi-code.md -gAsk your agent to install it
Give your agent the following instruction:
Read
https://code.kimi.com/kimi-code/skills/use-kimi-code.mdand save it as a localuse-kimi-codeSkill.
Usage scenarios
After installation, tell your agent what you want to do in plain language.
Session handoff
To hand your current work to Kimi Code, write:
Organize our current goal, modified files, and next steps into a HandOff brief, hand it off to a new session in my local Kimi Code to continue, and give me the Session ID.
To pick up an existing session from Kimi Code, write:
Read the session about
[topic or session ID]in my local Kimi Code, understand its current progress and blockers, and wait for my next instructions.
Organize local session history
Review recent sessions across workspaces, replace vague titles, and batch-archive completed sessions:
Organize my local Kimi Code session history across workspaces: rename vague titles with clear ones, archive completed sessions, and summarize the work still in progress.
Assemble an Agent Team to discuss a plan
A minimal example — combine and adapt freely for your workflow:
Use the
use-kimi-codeskill to discuss this plan with Kimi K3.1 Pro for up to 5 rounds, then bring me the conclusion.
Related docs
For one-shot runs or editor integration, see:
- Print mode: one-shot runs, structured JSONL output, and exit codes.
- Using in IDEs: connect Zed and JetBrains IDEs via
kimi acp.