mirror of
https://github.com/Kilo-Org/kilocode.git
synced 2026-09-24 16:02:55 +08:00
Apply suggestions from code review
This commit is contained in:
@@ -8,7 +8,7 @@ description: "Create and configure custom subagents in Kilo Code's CLI"
|
||||
Kilo Code's CLI supports **custom subagents** — specialized AI assistants that can be invoked by primary agents or manually via `@` mentions. Subagents run in their own isolated sessions with tailored prompts, models, tool access, and permissions, enabling you to build purpose-built workflows for tasks like code review, documentation, security audits, and more.
|
||||
|
||||
{% callout type="info" %}
|
||||
Custom subagents are currently configured through the config file (`opencode.json` or `kilo.json`) or via markdown agent files. UI-based configuration is not yet available.
|
||||
Custom subagents are currently configured through the config file (`kilo.json`) or via markdown agent files. UI-based configuration is not yet available.
|
||||
{% /callout %}
|
||||
|
||||
## What Are Subagents?
|
||||
@@ -47,7 +47,7 @@ There are two ways to define custom subagents: through JSON configuration or mar
|
||||
|
||||
### Method 1: JSON Configuration
|
||||
|
||||
Add agents to the `agent` section of your `opencode.json` or `kilo.json` config file. Any key that doesn't match a built-in agent name creates a new custom agent.
|
||||
Add agents to the `agent` section of your `kilo.json` config file. Any key that doesn't match a built-in agent name creates a new custom agent.
|
||||
|
||||
```json
|
||||
{
|
||||
@@ -87,8 +87,8 @@ The file path is relative to the config file location, so this works for both gl
|
||||
|
||||
Define agents as markdown files with YAML frontmatter. Place them in:
|
||||
|
||||
- **Global**: `~/.config/kilo/agent/` or `~/.config/opencode/agent/`
|
||||
- **Project-specific**: `.kilo/agent/`, `.kilo/agents/`, `.opencode/agent/`, or `.opencode/agents/`
|
||||
- **Global**: `~/.config/kilo/agent/`
|
||||
- **Project-specific**: `.kilo/agent/` or `.kilo/agents/`
|
||||
|
||||
The **filename** (without `.md`) becomes the agent name.
|
||||
|
||||
@@ -244,10 +244,10 @@ This displays each agent's name, mode, and permission configuration.
|
||||
Agent configurations are merged from multiple sources. Later sources override earlier ones:
|
||||
|
||||
1. **Built-in agent defaults** (native agents defined in the codebase)
|
||||
2. **Global config** (`~/.config/kilo/opencode.json` or `~/.config/opencode/config.json`)
|
||||
2. **Global config** (`~/.config/kilo/config.json`)
|
||||
3. **Global agent markdown files** (`~/.config/kilo/agent/*.md`)
|
||||
4. **Project config** (`opencode.json` or `kilo.json` in the project root)
|
||||
5. **Project agent markdown files** (`.opencode/agent/*.md` or `.kilo/agent/*.md`)
|
||||
4. **Project config** (`kilo.json` in the project root)
|
||||
5. **Project agent markdown files** (`.kilo/agent/*.md`)
|
||||
|
||||
When overriding a built-in agent, properties are merged — only the fields you specify are overridden. When creating a new custom agent, unspecified fields use sensible defaults (`mode: "all"`, full permissions inherited from global config).
|
||||
|
||||
|
||||
Reference in New Issue
Block a user