跳到正文Skip to content
Agent J Beta
菜单Menu
中文EN
登录Sign in

搜索文档和页面Search docs and pages

文档Docs

用 Kimi 会员(Kimi Code)Use a Kimi membership (Kimi Code)

用月之暗面的 Kimi 会员(Plus 或更高档)驱动 Agent J:香港和海外首推,大陆也能用;key 贴进手机密钥卡,用 OpenCode 或 Kimi 自家的 Kimi Code,默认 Kimi K3 能看截图。Run Agent J on a Moonshot AI Kimi membership (Plus or higher): our first choice in Hong Kong and abroad, fine in mainland China too; paste the key into the phone key card, use OpenCode or Kimi's own Kimi Code; the default Kimi K3 reads screenshots.

Kimi 是月之暗面出的产品。如果你买了 Kimi 会员(Plus 或更高档),里面自带编程额度,叫 Kimi Code。这个可以直接接进 Agent J。

还没决定用哪家?先看按你用的模型选。安装、配对手机这些每家都一样的事,看安装和手机上怎么用。

适合谁

  • 人在香港或海外,Claude Code 和 Codex 用不了:首推 Kimi。国内三家套餐里,只有 Kimi 的海外路线 Agent J 内置支持。
  • 人在大陆,已经是 Kimi 会员:直接用。
  • 人在大陆,还没买过:首推火山方舟,Kimi 也能用。

开通与套餐

  1. 打开 Kimi 官网 https://www.kimi.com/ 。kimi.com 是月之暗面的主站,大陆也用它;海外站是 https://www.kimi.ai/ 。
  2. 订阅 Plus 或更高档。Go 档没有编程额度,买了也接不上。

价格以官方购买页为准:kimi.com 会员价格、kimi.ai 会员价格。2026-10-16 我们从海外访问这两页,价格一样,都按美元收费;从大陆访问 kimi.com 是人民币价格。编程额度从 Plus 档起,具体价格以页面为准。

电脑上的 Agent 运行 agentj agent route 时,也会给出一个购买链接。那是 Agent J 官方的邀请链接,链接后面会紧跟一句说明,见装好 AI 命令行工具。

拿 key

  1. 打开 Kimi Code 控制台:kimi.com 会员用 https://www.kimi.com/code/console ,kimi.ai 会员用 https://www.kimi.ai/code/console 。
  2. 新建一把 key。它只显示一次,先别复制给任何人,等手机上弹出密钥卡再贴。

用 Kimi Code 时也可以不要 key,直接登录,见下面的能用的 AI 编程工具。

把 key 交给 Agent J

跟电脑上的 Agent 说一句:帮我接上 Kimi 会员。它会这样做:

  1. 运行下面这条。在 Claude Code 和 Codex 用不了的电脑上,它会打印 Kimi 的密钥卡命令和后面几步。
agentj agent route
  1. 运行那条密钥卡命令。手机上会弹出密钥卡,名称是 KIMI_API_KEY,你只把 key 贴进卡里。贴完 Agent J 马上用 Kimi 的只读接口核对一次。
  2. 重启后台服务,看现在能切到哪些工具,再切到 Kimi K3:
agentj service restart
agentj agent switch --scan
agentj agent switch opencode --model kimi-code-plan-cn/k3

在 kimi.ai 买的会员,模型改写成 kimi-code-plan-global/k3。

密钥卡怎么用,见手机上录入密钥。

能用的 AI 编程工具

两个都能用,同一个会员:

  • OpenCode(默认):上面那几步就是。OpenCode 自带 Kimi 接入,不用另外写设置。没装 OpenCode 的,见装好 AI 命令行工具。
  • Kimi Code(月之暗面自家的 kimi,MIT 开源):要 2.2.0 或更新。安装:
curl -fsSL https://code.kimi.com/kimi-code/install.sh | bash

登录二选一:在你自己的终端里运行 kimi login --region mainland-cn(kimi.com 的会员)或 kimi login --region global(kimi.ai 的会员),按提示在登录了 Kimi 的设备上确认;或者用上面那张 KIMI_API_KEY 密钥卡。然后切过去:

agentj agent switch kimi

kimi.ai 的会员加 --region global:

agentj agent switch kimi --region global

Kimi Code 只支持独立会话。每次权限请求都会发到手机上,你点同意只管这一次。更多见换成 Kimi Code。

模型与看图

用途OpenCode 里的模型能看截图
主力kimi-code-plan-cn/k3能(实测)
快,轻任务kimi-code-plan-cn/kimi-for-coding能(实测)
K3 的 256k 上下文版,省额度kimi-code-plan-cn/k3-256k官方写支持

kimi.ai 会员把前缀 kimi-code-plan-cn/ 换成 kimi-code-plan-global/。实测指 2026-10-16 我们在电脑上发一张软件截图,让模型读出弹窗标题、错误码、按钮上的字和表格里的金额,OpenCode 和 Kimi Code 都全部读对。Kimi 官方说 K3 的 1M 上下文要 Pro 及以上。

常见坑

  • 用着用着报 401:多半不是 key 坏了,是额度用完了。Kimi 按 5 小时和每月两层算额度,具体次数官方不公开,而且和 Kimi App 共用。等额度恢复,或升级套餐。
  • 买了 Go 档接不上:Go 没有编程额度,要 Plus 或更高。
  • kimi.com 还是 kimi.ai:按你在哪个站买的选。2026-10-16 实测,kimi.com 买的会员 key 在国内和海外两个接口都能用;kimi.ai 买的 key 我们还没测过。
  • 定时任务、客服 bot:会员额度只给你在编程工具里交互用,Agent J 不会把这把 key 交给它们。

切回原来的工具

随时跟 Agent 说“切回 Claude Code”(或 Codex),它会先检查、能用才切。也可以自己在电脑上运行:

agentj agent switch claude

想原样换回上一次切走前的那个:

agentj agent switch --undo

切换的细节见换 AI 编程工具。

技术细节:地址和名字
  • OpenCode 里的服务商名:kimi.com 的会员是 kimi-code-plan-cn,kimi.ai 的会员是 kimi-code-plan-global。
  • 编程接口:国内 https://api.kimi.com/coding/v1,海外 https://api.kimi.ai/coding/v1。密钥卡就用这里的模型列表接口做只读核对。
  • key 的环境变量名:KIMI_API_KEY。用 Kimi Code 时,只有 Kimi 自己没登录,Agent J 才在内存里把这把 key 交给它,不写进 Kimi 的设置文件。

Kimi is made by Moonshot AI. A Kimi membership at Plus or higher includes coding quota, called Kimi Code, and Agent J can run on it.

Not sure which vendor to pick? Start at Choose by your model. Installing and pairing your phone are the same for every vendor: see Install and Using it on your phone.

Who it is for

  • Hong Kong or abroad, Claude Code and Codex not available: our first recommendation. Of the three Chinese plans, Kimi is the only one whose overseas route Agent J supports out of the box.
  • Mainland China and already a Kimi member: use it.
  • Mainland China and nothing bought yet: we recommend Volcano Ark first; Kimi works too.

Sign up and pick a plan

  1. Open https://www.kimi.com/ . kimi.com is Moonshot's main site and is also used in mainland China; the overseas site is https://www.kimi.ai/ .
  2. Subscribe to Plus or higher. Go has no coding quota and cannot be connected.

The official pages are authoritative for prices: kimi.com membership pricing, kimi.ai membership pricing. Opened from outside the mainland on 2026-10-16, both pages showed the same prices in US dollars; opened from mainland China, kimi.com shows prices in yuan. Coding usage starts with the Plus plan; the page has the current prices.

When the Agent on your computer runs agentj agent route, it also prints a link to subscribe. That is Agent J's official invite link, and a sentence explaining it always follows the link; see Set up AI command-line tools.

Get the key

  1. Open the Kimi Code console: https://www.kimi.com/code/console for a kimi.com membership, https://www.kimi.ai/code/console for a kimi.ai membership.
  2. Create a key. It is shown once. Do not copy it to anyone yet: wait for the key card on your phone and paste it there.

With Kimi Code you can also sign in instead of using a key; see AI coding tools below.

Hand the key to Agent J

Tell the Agent on your computer: connect my Kimi membership. It will:

  1. Run the line below. On a computer where Claude Code and Codex are not available, it prints Kimi's key card command and the next steps.
agentj agent route
  1. Run that key card command. A key card named KIMI_API_KEY opens on your phone; paste the key there and nowhere else. Agent J checks it right away against Kimi's read-only endpoint.
  2. Restart the background service, see which tools it can switch to, then switch to Kimi K3:
agentj service restart
agentj agent switch --scan
agentj agent switch opencode --model kimi-code-plan-cn/k3

For a membership bought on kimi.ai, write the model as kimi-code-plan-global/k3.

How the key card works: Admin rights and API keys, from your phone.

AI coding tools

Both work on the same membership:

  • OpenCode (the default): the steps above. OpenCode already knows Kimi; there is nothing else to configure. OpenCode not installed yet? See Set up AI command-line tools.
  • Kimi Code (Moonshot's own kimi, MIT open source): version 2.2.0 or newer. Install:
curl -fsSL https://code.kimi.com/kimi-code/install.sh | bash

Sign in either way: in your own terminal run kimi login --region mainland-cn (kimi.com membership) or kimi login --region global (kimi.ai membership) and confirm on a device signed in to Kimi; or use the KIMI_API_KEY key card above. Then switch:

agentj agent switch kimi

For a kimi.ai membership add --region global:

agentj agent switch kimi --region global

Kimi Code runs in independent sessions only. Every permission request goes to your phone, and an approval counts for that one request only. More: Switch to Kimi Code.

Models and screenshots

UseModel in OpenCodeReads screenshots
Main modelkimi-code-plan-cn/k3Yes (tested)
Fast, light taskskimi-code-plan-cn/kimi-for-codingYes (tested)
K3 with a 256k context, uses less quotakimi-code-plan-cn/k3-256kKimi says yes

For a kimi.ai membership, replace the prefix kimi-code-plan-cn/ with kimi-code-plan-global/. Tested means: on 2026-10-16 we sent a software screenshot and asked for the dialog title, the error code, the button text and an amount in a table; in OpenCode and in Kimi Code it got all of them right. Kimi says K3's 1M context needs Pro or higher.

Common problems

  • 401 after a while: usually not a broken key but used-up quota. Kimi counts quota per 5 hours and per month, does not publish the numbers, and shares it with the Kimi app. Wait for it to refill, or upgrade.
  • Bought Go and it does not connect: Go has no coding quota; you need Plus or higher.
  • kimi.com or kimi.ai: choose the site you bought on. In our 2026-10-16 test a kimi.com membership key worked on both the China and the overseas endpoint; a key bought on kimi.ai has not been tested.
  • Scheduled tasks, support bots: membership quota is for you, working interactively in a coding tool; Agent J never hands this key to them.

Switch back

Tell the Agent at any time: switch back to Claude Code (or Codex). It checks first and switches only if that works. Or run it on the computer yourself:

agentj agent switch claude

To go straight back to the tool you used before the last switch:

agentj agent switch --undo

Details: Switch AI coding tool.

Technical details: addresses and names
  • OpenCode provider: kimi-code-plan-cn for a kimi.com membership, kimi-code-plan-global for a kimi.ai membership.
  • Coding endpoints: China https://api.kimi.com/coding/v1, overseas https://api.kimi.ai/coding/v1. The key card's read-only check uses their model list.
  • Key variable: KIMI_API_KEY. With Kimi Code, Agent J hands this key over in memory only, and only when Kimi itself is not signed in; nothing is written to Kimi's settings.

这一页的 Markdown 原文This page as Markdown: zh.md · en.md