Hermes Agent
How to use Kimi K3 in Hermes Agent
Updated 30 November 2026
To use Moonshot AI’s Kimi K3 in Hermes Agent, start with where you got your key. On Kimi Open Platform, the model ID is kimi-k3 and you pay for API usage. With a Kimi Code membership key, the K3 ID is k3 and the context window depends on your plan.
This guide uses Moonshot’s integration guides for Kimi K3 and K3.1 Pro and the Hermes Agent 0.23.5 documentation and source code, read on 30 November 2026. Kimi’s guides are unversioned. The two Open Platform guides show Hermes Agent 0.18.2 in their screenshots. The steps below use the menus and provider behaviour in 0.23.5. Hermes provider documentation, Global Open Platform guide, China Open Platform guide, Kimi Help Centre and Kimi Code setup guide.
Choose the key for your account
Kimi K3 is an open-weight model from Moonshot AI. In this setup Moonshot runs the model, and Nous Research’s open-source Hermes Agent provides the terminal chat, tools and persistent memory. Kimi K3 model repository and Hermes Agent README.
- Open Platform. Create a key in the Global or China console and use the matching regional endpoint. Keep an available balance in that Open Platform account.
- Kimi Code. Create a membership API key in the Kimi Code Console. Your plan determines which models and context windows you can use, and requests count towards its allowances.
The two services keep separate keys and balances. If you need Hermes first, use the installation guide or the update guide for an existing installation. Kimi API account and key help.
Set up an Open Platform key in the Hermes wizard
Create your key in the Global console or the China console. The Global platform requires a minimum recharge of US$1 to start using the API, and its rate limits depend on cumulative recharge. If your organisation uses an IP allowlist, add the public outbound IPv4 address of the machine or gateway making the request. Global rate limits.
Run the model wizard and open Kimi / Moonshot.
hermes model- Global. Choose Kimi / Kimi Coding Plan, the first entry. In Hermes this is
kimi-coding, also known askimi,moonshotandkimi-for-coding. If prompted forKIMI_API_KEY, paste your Global key. The built-in also acceptsKIMI_CODING_API_KEY. For the Global key, the wizard should report the Moonshot endpointhttps://api.moonshot.ai/v1. - China. If your key is from the China console, choose Kimi / Moonshot (China) instead. Its provider ID is
kimi-coding-cn, with aliaseskimi-cnandmoonshot-cn. If prompted forKIMI_CN_API_KEY, paste your China key.
The custom setup below reads KIMI_API_KEY for Global or KIMI_CN_API_KEY for China. If the wizard offers to keep a key, choose Replace and paste your Open Platform key unless the correct key is already saved under the variable for your region.
For China, press Enter at the base URL prompt if it shows https://api.moonshot.cn/v1. If the prompt shows a different URL, leave it blank, press Enter and choose Skip (keep current) in the model picker. Use hermes config edit to remove the saved model.base_url. Save the file and run hermes model again.
For either region, pick kimi-k3. If it’s missing, select Enter custom model name and type the bare ID kimi-k3. If Hermes asks you to select a reasoning effort, choose Skip (keep current). The next section sets it to max.
The wizard saves a newly entered key in the active Hermes profile’s .env file. The default path is ~/.hermes/.env on macOS, Linux and WSL, or %LOCALAPPDATA%\hermes\.env on native Windows. Keep the key out of config.yaml, terminal commands, screenshots and Git repositories. Hermes provider registry.
The Global Open Platform also lists kimi-k3.1-pro and kimi-k3.1-pro-highspeed. The Kimi setup below uses the direct Open Platform ID for K3. An ID copied from an aggregator can have a provider prefix. For that route, see the OpenRouter setup guide. Global API quickstart.
Set the Open Platform context window and image support
Run hermes config edit to open the active profile’s config.yaml. Add the named item to custom_providers. If that list already has an item with the same name, replace the whole item. If your chosen name also appears under providers, pick an unused name. Use it for the item’s name and after custom: in model.provider. Merge the other fields into their existing sections. Remove any existing thinking field from auxiliary.vision.extra_body. If you previously set up a separate vision endpoint, remove base_url, api_key, key_env, api_key_env and api_mode from auxiliary.vision so it uses the main Kimi connection. The example shows the Global settings. Make the four substitutions below if you use a China key, then save the file.
custom_providers:
- name: kimi-k3-global
base_url: https://api.moonshot.ai/v1
key_env: KIMI_API_KEY
api_mode: chat_completions
model: kimi-k3
extra_body:
reasoning_effort: max
models:
kimi-k3:
context_length: 1048576
supports_vision: true
model:
provider: custom:kimi-k3-global
default: kimi-k3
context_length: 1048576
supports_vision: true
agent:
reasoning_effort: max
auxiliary:
vision:
provider: main
model: kimi-k3
extra_body:
reasoning_effort: maxFor China, set the custom entry’s name to kimi-k3-cn, its base_url to https://api.moonshot.cn/v1 and its key_env to KIMI_CN_API_KEY. Set the top-level model.provider to custom:kimi-k3-cn. Hermes appends /chat/completions to the base URL, so the Open Platform bases end at /v1.
Hermes 0.23.5 reads the custom_providers list that Kimi uses in its examples. Both Open Platform guides set context_length to 1048576. A Hermes code comment describes the large K3 window as specific to the Kimi Code endpoint, but that helper covers only endpoint-specific defaults. Hermes’s generic K3 table also lists 1,048,576 tokens for kimi-k3. Use Kimi’s explicit Open Platform value for the endpoint in its guide. Hermes context heuristic and Kimi Open Platform context limits.
The Open Platform K3 series accepts low, high or max for reasoning_effort, with max as the service default. Kimi marks the separate thinking request field as unsupported for this series. Open Platform model parameters.
Connect a Kimi Code membership key
Create a membership API key in the Kimi Code Console. Open the active Hermes profile’s .env file in a local editor and set KIMI_API_KEY to the membership key. The default path is ~/.hermes/.env on macOS, Linux and WSL, or %LOCALAPPDATA%\hermes\.env on native Windows. If you’re switching from Global Open Platform, replace the existing value. Use separate Hermes profiles to keep both configurations. Keep the key out of terminal commands, screenshots and Git repositories.
Run hermes config edit to open the active profile’s config.yaml. Add the named item to custom_providers. If that list already has an item with the same name, replace the whole item. If your chosen name also appears under providers, pick an unused name. Use it for the item’s name and after custom: in model.provider. Merge the other fields into their existing sections. If you previously set up a separate vision endpoint, remove base_url, api_key, key_env, api_key_env and api_mode from auxiliary.vision so it uses the main Kimi connection.
The example uses Kimi’s overseas Chat Completions route with K3.1 Pro at 262,144 tokens. For China, Kimi’s protocol table gives https://api.kimi.com/coding/v1 as the Chat Completions base. Use it for the entry’s base_url when configuring a China membership key. Set both context values to the limit for the model and plan you choose, then save the file.
custom_providers:
- name: kimi-coding-plan
base_url: https://api.kimi.ai/coding/v1
key_env: KIMI_API_KEY
api_mode: chat_completions
model: k3.1-pro
extra_body:
reasoning_effort: high
models:
k3.1-pro:
context_length: 262144
supports_vision: true
model:
provider: custom:kimi-coding-plan
default: k3.1-pro
context_length: 262144
supports_vision: true
agent:
reasoning_effort: high
auxiliary:
vision:
provider: main
model: k3.1-pro
extra_body:
reasoning_effort: highWhy the Hermes wizard shows a different URL. The built-in kimi-coding wizard detects the sk-kimi- prefix, clears any saved KIMI_BASE_URL in its setup flow and saves https://api.kimi.com/coding. Hermes infers anthropic_messages from that base. The wizard’s code comment shows a version with /v1, but the saved value comes from the actual resolver constant without the suffix. Outside the wizard, the credential resolver honours KIMI_BASE_URL before checking the prefix, and a saved model.base_url for the matching built-in can take precedence at runtime. Hermes wizard source and Kimi key resolver.
Kimi lists separate Anthropic-compatible bases, https://api.kimi.com/coding/ for China and https://api.kimi.ai/coding/ for overseas. Use the named configuration above to pin the Chat Completions transport and its regional base as Kimi documents for Hermes. Kimi Code protocol table.
Choose a Kimi Code model and its context window
The context window is how much the model can take into account at once, measured in tokens. For this example, choose a model ID from your plan’s row that supports reasoning_effort: high. The kimi-for-coding-highspeed model has a fixed thinking setting. If you switch models, replace every occurrence of k3.1-pro in the example, including the key under models and the model under auxiliary.vision. Set both context_length values to the limit listed for that model on your plan. On legacy Andante, use kimi-for-coding and set both values to 1048576. Check Kimi’s thinking settings below when switching models.
| Membership plan | Model IDs and context in tokens |
|---|---|
| Go (new plans) | Go does not include access to Kimi Code. |
| Andante (legacy) | kimi-for-coding (K2.8 Preview) at 1,048,576. |
| Plus / Moderato | k3.1-pro, k3 and k3-256k at 262,144. kimi-for-coding at 1,048,576. |
| Pro / Allegretto and higher | k3.1-pro, k3.1-pro-highspeed, k3 and kimi-for-coding at 1,048,576. k3-256k and kimi-for-coding-highspeed at 262,144. |
Hermes can estimate 1,048,576 tokens for k3 on the built-in China coding endpoint because its endpoint rule checks the host and model ID. The rule has no plan information. An explicit positive context setting takes priority in Hermes, and Kimi’s plan table determines what the account can request. Hermes context resolution and Kimi Code plan table.
Kimi Code uses a rolling five-hour window and a monthly quota. The seven-day quota refresh applies to legacy plans. Subscribed members can also use paid Extra Usage where enabled. The Code service defaults K3 and K3.1 Pro to high reasoning effort, and rejects requests with thinking disabled for K3.1 Pro and K3.1 Pro Highspeed. Membership quotas and Thinking settings.
Check the first reply, then try an image or video
Start a fresh session with hermes. Check the model and context in the status bar, then send a short text prompt to check that the key and endpoint return a reply. The status bar shows what Hermes selected. Kimi Code’s model reference says a mistyped ID can fall back to K2.8 Preview, so check the spelling in the saved configuration even if you get a reply. Kimi Code model IDs.
By default, the examples’ auxiliary.vision settings send image attachments through Hermes’s image describer. To test sending the image directly to a model that accepts images, add image_input_mode: native under agent in config.yaml, save the file and start a fresh Hermes session. Keep auxiliary.vision configured for the video tool. Attach a picture with /image /absolute/path/to/example.png, then ask about a detail you can verify in the image. Hermes image routing.
Video uses the auxiliary vision connection. If you use k3-256k for chat and images, set model to k3 in the video section under auxiliary in config.yaml. Enable the tool and start a fresh session.
hermes tools enable videoUse a short, non-sensitive MP4. Hermes can try another vision provider if it cannot initialise the configured one. Its automatic vision search skips the built-in kimi-coding and kimi-coding-cn providers. Give Hermes an absolute local path or a directly accessible HTTP(S) video URL and ask it to call video_analyze. The tool sends the full video as a base64 data URL in a video_url block. Hermes caps the encoded data URL, including its prefix, at 50 MiB. Kimi Code documents a separate 2,097,152-byte limit for the total message body. On Kimi Code, full K3 and K3.1 Pro accept video. k3-256k accepts images and lacks video input. Hermes vision fallback, Hermes video request and Kimi Code model capabilities.
Fix rejected keys, missing models and quota errors
- Wrong endpoint or rejected key. Check whether the key came from a regional Open Platform console or from Kimi Code, then check the active provider and base URL. For Kimi Code HTTP 401, check that
KIMI_API_KEYin the active profile’s.envis a current membership key from the Kimi Code Console and that the account is active. Correct the key or account issue before retrying. On Open Platform, check the balance and any IP allowlist. Kimi Code authentication errors. - Open Platform model missing. Hermes includes
kimi-k3in its static lists for both regions. If the picker omits it, type the bare ID. To check what your key can see, Kimi recommendsGET /v1/modelson the matching Open Platform host with the same key. Open Platform troubleshooting. - Kimi Code HTTP 403 or 429. The Hermes integration guide groups quota and rate issues under 403. Follow Kimi Code’s detailed error reference for the server response. It lists 403 for permissions such as access to a model or 1M context, and 429 for quota, concurrency and request-rate limits. For a permission error, check the model and both context values against your plan. For a quota error, check usage in the Kimi Code Console. Permission errors and Quota and account limits.
- Kimi Code HTTP 400. If the error mentions context, check the selected model’s limit and start a fresh session if the conversation is already too long. If the error says thinking is disabled, keep thinking enabled for the K3.1 Pro models. If the overseas endpoint reports missing
reasoning_contenton a tool call, addreasoning_echo: trueunder the top-levelmodelsection inconfig.yamland start a fresh Hermes session. This fills in the field when Hermes replays earlier assistant tool calls. Kimi Code request errors and Hermes reasoning replay setting. - Open Platform HTTP 429. Check
error.typein the response. Forengine_overloaded_error, followRetry-Afterif present and wait longer between successive retries. Forrate_limit_reached_error, send requests less often or run fewer at once. Forexceeded_current_quota_error, check your balance and billing status. Global API troubleshooting and China API error reference. - Video tool absent or request rejected. Check that you enabled the tool, explicitly asked Hermes to use it, and selected a model that accepts video. Hermes checks
auxiliary.video.modelfirst, thenauxiliary.vision.modelif the video setting is empty. If Hermes reports that the encoded video is too large or Kimi reports that the message body exceeds its limit, trim or compress the clip and retry. Hermes video model selection and Kimi Code request size errors.
Kimi on ReadyHermes
During the free trial or on a paid plan, open the Model key panel and choose Your own API key. The Model key panel lists Moonshot. After choosing a provider, paste your key, select a model from the list or type its ID, then click Switch to my key. ReadyHermes sends a small test message before restarting your assistant on the new key. See the model key overview.
ReadyHermes has not verified support for Kimi Code membership API keys or tested subscription sign-in in place of an API key. The workspace has no screen for the config.yaml settings shown in this guide. ReadyHermes runs your own Hermes Agent continuously, and the 30-minute free trial includes AI.
Questions
What is the model ID for Kimi K3 in Hermes Agent?
Use kimi-k3 with a Global or China Kimi Open Platform key. If the model is missing from the Hermes picker, choose Enter custom model name and type kimi-k3. With a Kimi Code membership key, the K3 model ID is k3.
Which base URL and key variable does Kimi Open Platform use?
For a Global key, use https://api.moonshot.ai/v1 and KIMI_API_KEY. For a China key, use https://api.moonshot.cn/v1 and KIMI_CN_API_KEY. Hermes appends /chat/completions to the base URL.
Can Hermes Agent use a Kimi Code membership?
Yes. Create a membership key in the Kimi Code Console and set KIMI_API_KEY. Kimi’s Hermes guide uses the named custom:kimi-coding-plan provider with chat_completions. Use the regional coding endpoint and a model and context window included in your plan.
How much context does Kimi K3 get on Kimi Code Plus?
Kimi Code Plus and legacy Moderato give k3 a 262,144-token context window. Set both context_length values to 262144 even if the Hermes built-in estimates 1,048,576 tokens for that model on the China coding endpoint.
Does ReadyHermes support Kimi Code membership keys?
ReadyHermes has not verified support for Kimi Code membership API keys or tested subscription sign-in in place of an API key. The workspace has no screen for the config.yaml settings shown in this guide.