You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add an `[identity]` config section (`name`, optional `slug`, both also
settable through `KIMI_CODE_IDENTITY_NAME` / `KIMI_CODE_IDENTITY_SLUG`)
that sets the identity the agent presents: the name it calls itself in
the system prompt, the `User-Agent` product token sent to third-party
providers, and the client name announced to MCP servers. Leaving it
unset changes nothing.
Until now every one of these was fixed, which left no way to run the
agent as part of another product — an internal deployment, a fork with
its own branding, an embedding host.
The identity resolves inside the engine rather than being seeded by each
host, so it applies to every launch surface — including headless runs,
which today seed no display name at all and fall through to the built-in
default.
Two deliberate asymmetries:
- The display name is a filling value with a fallback chain (config >
host-declared > the consumer's own default); the slug is a rewriting
value with two states only, so with no identity configured the
rewriting paths are equivalent to not existing.
- The rewrite happens in the outbound header assembly, the one layer
that knows which vendor it is building for. Vendors declaring
`hostHeaders: 'full'` keep the host's own product token, which that
header set is built around and which backends key on; the configured
identity applies to the third-party path.
Resolution is lazy throughout: config loads asynchronously, and a
constructor snapshot would freeze the pre-load value under some startup
orderings. A name that folds away to nothing under slug normalization
(a CJK-only name, say) falls back to a neutral token rather than
reaching the User-Agent builder, which rejects a blank product.
Add a custom agent identity: the new `[identity]` section in `config.toml` (`name`, optional `slug`, also settable via `KIMI_CODE_IDENTITY_NAME` / `KIMI_CODE_IDENTITY_SLUG`) sets the name the agent calls itself in the system prompt, the `User-Agent` product token sent to third-party providers, and the client name announced to MCP servers.
6
+
7
+
Add a `builtin_product_skills` field (also settable via `KIMI_CODE_BUILTIN_PRODUCT_SKILLS`) that controls whether the built-in skills documenting Kimi Code itself — `update-config`, `custom-theme`, `mcp-config`, `check-kimi-code-docs`, `import-from-cc-codex` — are offered to the model. Enabled by default; turning it off trims their names and descriptions from the system prompt.
Copy file name to clipboardExpand all lines: docs/en/configuration/config-files.md
+21Lines changed: 21 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -103,6 +103,7 @@ Fields in the config file fall into two categories: **top-level scalars** that d
103
103
|`merge_all_available_skills`|`boolean`|`true`| Whether to merge Agent Skills from all available directories |
104
104
|`extra_skill_dirs`|`array<string>`| — | Extra skill search directories, layered on top of the default directories |
105
105
|`extra_agent_dirs`|`array<string>`| — | Extra custom agent search directories, layered on top of the default directories |
106
+
|`builtin_product_skills`|`boolean`|`true`| Whether the built-in skills that document Kimi Code itself are offered to the model: `update-config`, `custom-theme`, `mcp-config`, `check-kimi-code-docs`, and `import-from-cc-codex`. Turning them off trims their names and descriptions from the system prompt, at the cost of the guided flows for those tasks |
106
107
|`telemetry`|`boolean`|`true`| Whether anonymous telemetry is enabled; disabled only when explicitly set to `false`|
107
108
|`providers`|`table`|`{}`| API provider table → [`providers`](#providers)|
108
109
|`models`|`table`| — | Model alias table → [`models`](#models)|
@@ -114,6 +115,7 @@ Fields in the config file fall into two categories: **top-level scalars** that d
114
115
|`services`|`table`| — | Built-in external service configuration → [`services`](#services)|
The following sections cover each of the nested tables in turn: `providers`, `models`, `thinking`, `loop_control`, `background`, `tools`, `image`, `services`, and `permission`.
119
121
@@ -285,6 +287,25 @@ In print mode (`kimi -p "<prompt>"`), Kimi Code stays alive after the main agent
285
287
286
288
`startup_timeout_ms` and `tool_timeout_ms` can be overridden by the `KIMI_MCP_STARTUP_TIMEOUT_MS` and `KIMI_MCP_TOOL_TIMEOUT_MS` environment variables respectively, which take higher priority than `config.toml`. See [MCP](../customization/mcp.md) for the full MCP server configuration.
287
289
290
+
## `identity`
291
+
292
+
Customizes how the agent identifies itself. Leave it unset and nothing changes.
293
+
294
+
| Field | Type | Default | Description |
295
+
| --- | --- | --- | --- |
296
+
|`name`|`string`| — | Display name the agent calls itself in the system prompt (fills the `${product_name}` slot, including in your own `SYSTEM.md` and agent files) |
297
+
|`slug`|`string`| derived from `name`| Machine identifier used in protocol fields: the `User-Agent` product token sent to third-party providers, and the client name announced to MCP servers. Derived from `name` when omitted: lowercased, with every run of non-alphanumeric characters folded to `-`|
298
+
299
+
```toml
300
+
[identity]
301
+
name = "Acme Dev Agent"
302
+
slug = "acme-dev"# optional
303
+
```
304
+
305
+
Both fields can be set through the `KIMI_CODE_IDENTITY_NAME` and `KIMI_CODE_IDENTITY_SLUG` environment variables, which take higher priority than `config.toml` and are never written back to it — convenient for containers and CI, where writing a config file is awkward.
306
+
307
+
A name that contains no ASCII letters or digits (for example a purely Chinese name) leaves nothing to derive a slug from and falls back to `agent`; write `slug` explicitly if you need a specific protocol token.
308
+
288
309
## `tools`
289
310
290
311
`tools` is the global tool switch: it applies to every agent in all sessions and intersects with each agent's own `tools` / `disallowedTools` policy.
Copy file name to clipboardExpand all lines: docs/en/configuration/env-vars.md
+3Lines changed: 3 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -128,6 +128,9 @@ Switches that control the behavior of subsystems such as telemetry, background t
128
128
|`KIMI_CODE_PLUGIN_MARKETPLACE_URL`| Override the plugin marketplace JSON loaded by `/plugins`; useful for dev loopback servers, staging CDN files, or alternate marketplace directories |`https://code.kimi.com/kimi-code/plugins/marketplace.json`; also accepts `http://`, `file://` URLs, and local paths |
129
129
|`KIMI_CODE_AGENT_SWARM_MAX_CONCURRENCY`| Cap how many AgentSwarm subagents run concurrently during the initial ramp; leave unset for no cap | Positive integer; invalid values fail fast |
130
130
|`KIMI_SUBAGENT_TIMEOUT_MS`| Maximum wall-clock time (ms) a single subagent (`Agent` / `AgentSwarm`) may run; takes higher priority than `[subagent] timeout_ms` in `config.toml` (default `7200000`, i.e. 2 hours) | Positive integer; invalid values fall back to the config or default |
131
+
|`KIMI_CODE_IDENTITY_NAME`| Display name the agent calls itself in the system prompt; takes higher priority than `[identity] name` in `config.toml` and is never written back to it | Any non-empty string; blank values read as unset |
132
+
|`KIMI_CODE_IDENTITY_SLUG`| Protocol identifier for the `User-Agent` product token sent to third-party providers and the MCP client name; takes higher priority than `[identity] slug`. Derived from the name when unset | Any non-empty string; normalized to lowercase with non-alphanumeric runs folded to `-`|
133
+
|`KIMI_CODE_BUILTIN_PRODUCT_SKILLS`| Whether the built-in skills documenting Kimi Code itself are offered to the model; takes higher priority than `builtin_product_skills` in `config.toml` (default enabled) | Truthy: `1`/`true`/`yes`/`on`; falsy: `0`/`false`/`no`/`off`|
131
134
|`KIMI_CODE_EXPERIMENTAL_SECONDARY_MODEL`| Enable the experimental secondary-model feature in every launch mode, including the interactive TUI; the master `KIMI_CODE_EXPERIMENTAL_FLAG=1` also enables it | Truthy: `1`/`true`/`yes`/`on`; falsy: `0`/`false`/`no`/`off`|
132
135
|`KIMI_SECONDARY_MODEL`| Secondary model; takes higher priority than [`[secondary_model] model`](./config-files.md#secondary-model) in `config.toml`. When the secondary-model experiment is enabled, newly spawned subagents (`Agent` / `AgentSwarm`) bind to it by default instead of inheriting the main agent's model | The alias of a configured `[models]` entry, e.g. `kimi-code/kimi-k2.5`; blank values are ignored |
133
136
|`KIMI_SECONDARY_EFFORT`| Thinking effort for the secondary model; takes higher priority than `[secondary_model] default_effort` in `config.toml` and applies only when both the model and its experiment are enabled | An effort value, e.g. `low`; blank values are ignored |
**Built-in Skills** are distributed with the CLI and have the lowest priority. They provide out-of-the-box workflows for common tasks — for example, configuring MCP servers, customizing the TUI theme, and editing config files. See [Built-in skill commands](../reference/slash-commands.md#built-in-skill-commands) for the full list.
84
+
**Built-in Skills** are distributed with the CLI and have the lowest priority. They provide out-of-the-box workflows for common tasks — for example, configuring MCP servers, customizing the TUI theme, and editing config files. See [Built-in skill commands](../reference/slash-commands.md#built-in-skill-commands) for the full list. Those describing Kimi Code itself can be turned off with the top-level [`builtin_product_skills`](../configuration/config-files.md#top-level-fields) field.
0 commit comments