kiro-agent-team 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.kiro/README.md +228 -0
- package/.kiro/agents/backend-engineer.json +6 -0
- package/.kiro/agents/backend-engineer.md +643 -0
- package/.kiro/agents/database-specialist.json +6 -0
- package/.kiro/agents/database-specialist.md +390 -0
- package/.kiro/agents/development-logger.json +6 -0
- package/.kiro/agents/development-logger.md +265 -0
- package/.kiro/agents/devops-engineer.json +6 -0
- package/.kiro/agents/devops-engineer.md +287 -0
- package/.kiro/agents/frontend-architect.json +6 -0
- package/.kiro/agents/frontend-architect.md +1032 -0
- package/.kiro/agents/hooks/backend-engineer-hooks.yaml +540 -0
- package/.kiro/agents/hooks/database-specialist-hooks.yaml +488 -0
- package/.kiro/agents/hooks/development-logger-hooks.yaml +361 -0
- package/.kiro/agents/hooks/devops-engineer-hooks.yaml +345 -0
- package/.kiro/agents/hooks/frontend-architect-hooks.yaml +521 -0
- package/.kiro/agents/hooks/project-manager-hooks.yaml +513 -0
- package/.kiro/agents/hooks/security-specialist-hooks.yaml +358 -0
- package/.kiro/agents/hooks/test-orchestrator-hooks.yaml +380 -0
- package/.kiro/agents/hooks/ui-ux-designer-hooks.yaml +353 -0
- package/.kiro/agents/project-manager.json +6 -0
- package/.kiro/agents/project-manager.md +344 -0
- package/.kiro/agents/prompts/backend-engineer-system.md +815 -0
- package/.kiro/agents/prompts/database-specialist-system.md +332 -0
- package/.kiro/agents/prompts/development-logger-system.md +232 -0
- package/.kiro/agents/prompts/devops-engineer-system.md +260 -0
- package/.kiro/agents/prompts/frontend-architect-system.md +305 -0
- package/.kiro/agents/prompts/project-manager-system.md +285 -0
- package/.kiro/agents/prompts/security-specialist-system.md +231 -0
- package/.kiro/agents/prompts/test-orchestrator-system.md +214 -0
- package/.kiro/agents/prompts/ui-ux-designer-system.md +270 -0
- package/.kiro/agents/security-specialist.json +6 -0
- package/.kiro/agents/security-specialist.md +277 -0
- package/.kiro/agents/test-orchestrator.json +6 -0
- package/.kiro/agents/test-orchestrator.md +266 -0
- package/.kiro/agents/ui-ux-designer.json +6 -0
- package/.kiro/agents/ui-ux-designer.md +284 -0
- package/.kiro/devlog/00-START-HERE.md +444 -0
- package/.kiro/devlog/COMPLETE-WORKFLOW.md +553 -0
- package/.kiro/devlog/DEVLOG-INTEGRATION.md +413 -0
- package/.kiro/devlog/DEVLOG-PROCESS-FLOWS.md +484 -0
- package/.kiro/devlog/DEVLOG-QUICK-REF.md +299 -0
- package/.kiro/devlog/DEVLOG.md +22 -0
- package/.kiro/devlog/IMPLEMENTATION-COMPLETE.txt +434 -0
- package/.kiro/devlog/IMPLEMENTATION-SUMMARY.md +358 -0
- package/.kiro/devlog/README.md +363 -0
- package/.kiro/devlog/devlog-update.bat +136 -0
- package/.kiro/devlog/devlog-update.sh +275 -0
- package/.kiro/devlog/feature-completion-hook.bat +78 -0
- package/.kiro/devlog/feature-completion-hook.sh +84 -0
- package/.kiro/documentation/cli.md +31 -0
- package/.kiro/documentation/docs_cli.md +41 -0
- package/.kiro/documentation/docs_cli_authentication.md +43 -0
- package/.kiro/documentation/docs_cli_autocomplete.md +132 -0
- package/.kiro/documentation/docs_cli_billing.md +31 -0
- package/.kiro/documentation/docs_cli_billing_contact-support.md +43 -0
- package/.kiro/documentation/docs_cli_billing_managing-taxes.md +67 -0
- package/.kiro/documentation/docs_cli_billing_related-questions.md +49 -0
- package/.kiro/documentation/docs_cli_billing_subscription-portal.md +31 -0
- package/.kiro/documentation/docs_cli_chat.md +84 -0
- package/.kiro/documentation/docs_cli_chat_configuration.md +40 -0
- package/.kiro/documentation/docs_cli_chat_context.md +258 -0
- package/.kiro/documentation/docs_cli_chat_git-aware-selection.md +41 -0
- package/.kiro/documentation/docs_cli_chat_images.md +53 -0
- package/.kiro/documentation/docs_cli_chat_manage-prompts.md +216 -0
- package/.kiro/documentation/docs_cli_chat_model-selection.md +153 -0
- package/.kiro/documentation/docs_cli_chat_permissions.md +68 -0
- package/.kiro/documentation/docs_cli_chat_planning-agent.md +230 -0
- package/.kiro/documentation/docs_cli_chat_responding.md +123 -0
- package/.kiro/documentation/docs_cli_chat_security.md +87 -0
- package/.kiro/documentation/docs_cli_chat_subagents.md +77 -0
- package/.kiro/documentation/docs_cli_code-intelligence.md +251 -0
- package/.kiro/documentation/docs_cli_custom-agents.md +37 -0
- package/.kiro/documentation/docs_cli_custom-agents_configuration-reference.md +941 -0
- package/.kiro/documentation/docs_cli_custom-agents_creating.md +93 -0
- package/.kiro/documentation/docs_cli_custom-agents_examples.md +360 -0
- package/.kiro/documentation/docs_cli_custom-agents_troubleshooting.md +180 -0
- package/.kiro/documentation/docs_cli_enterprise_billing.md +33 -0
- package/.kiro/documentation/docs_cli_enterprise_concepts.md +34 -0
- package/.kiro/documentation/docs_cli_enterprise_getting-started.md +19 -0
- package/.kiro/documentation/docs_cli_enterprise_iam.md +251 -0
- package/.kiro/documentation/docs_cli_enterprise_monitor-and-track.md +15 -0
- package/.kiro/documentation/docs_cli_enterprise_monitor-and-track_dashboard.md +62 -0
- package/.kiro/documentation/docs_cli_enterprise_monitor-and-track_prompt-logging.md +165 -0
- package/.kiro/documentation/docs_cli_enterprise_monitor-and-track_user-activity.md +123 -0
- package/.kiro/documentation/docs_cli_enterprise_settings.md +15 -0
- package/.kiro/documentation/docs_cli_enterprise_subscribe.md +36 -0
- package/.kiro/documentation/docs_cli_enterprise_subscription-management.md +55 -0
- package/.kiro/documentation/docs_cli_enterprise_supported-regions.md +39 -0
- package/.kiro/documentation/docs_cli_experimental.md +282 -0
- package/.kiro/documentation/docs_cli_experimental_checkpointing.md +439 -0
- package/.kiro/documentation/docs_cli_experimental_delegate.md +422 -0
- package/.kiro/documentation/docs_cli_experimental_knowledge-management.md +449 -0
- package/.kiro/documentation/docs_cli_experimental_tangent-mode.md +357 -0
- package/.kiro/documentation/docs_cli_experimental_thinking.md +331 -0
- package/.kiro/documentation/docs_cli_experimental_todo-lists.md +385 -0
- package/.kiro/documentation/docs_cli_hooks.md +207 -0
- package/.kiro/documentation/docs_cli_installation.md +235 -0
- package/.kiro/documentation/docs_cli_mcp.md +106 -0
- package/.kiro/documentation/docs_cli_mcp_configuration.md +294 -0
- package/.kiro/documentation/docs_cli_mcp_examples.md +273 -0
- package/.kiro/documentation/docs_cli_mcp_governance.md +436 -0
- package/.kiro/documentation/docs_cli_mcp_security.md +77 -0
- package/.kiro/documentation/docs_cli_migrating-from-q.md +129 -0
- package/.kiro/documentation/docs_cli_privacy-and-security.md +83 -0
- package/.kiro/documentation/docs_cli_privacy-and-security_compliance-validation.md +17 -0
- package/.kiro/documentation/docs_cli_privacy-and-security_data-protection.md +104 -0
- package/.kiro/documentation/docs_cli_privacy-and-security_firewalls.md +26 -0
- package/.kiro/documentation/docs_cli_privacy-and-security_infrastructure-security.md +10 -0
- package/.kiro/documentation/docs_cli_privacy-and-security_vpc-endpoints.md +41 -0
- package/.kiro/documentation/docs_cli_reference_built-in-tools.md +624 -0
- package/.kiro/documentation/docs_cli_reference_cli-commands.md +689 -0
- package/.kiro/documentation/docs_cli_reference_settings.md +294 -0
- package/.kiro/documentation/docs_cli_reference_slash-commands.md +559 -0
- package/.kiro/documentation/docs_cli_steering.md +84 -0
- package/.kiro/guides/AGENT_WORKFLOW_GUIDE.md +294 -0
- package/.kiro/guides/DEVLOG.md +882 -0
- package/.kiro/guides/IMPLEMENTATION_EXAMPLES.md +611 -0
- package/.kiro/guides/PIV Loop.md +122 -0
- package/.kiro/guides/PIV Loop.png +0 -0
- package/.kiro/guides/PIVLoop.png +0 -0
- package/.kiro/guides/QUICK_REFERENCE.md +202 -0
- package/.kiro/guides/README.md +149 -0
- package/.kiro/guides/advanced-patterns.md +514 -0
- package/.kiro/guides/agent-coordination.md +434 -0
- package/.kiro/guides/core-workflows.md +409 -0
- package/.kiro/guides/emergency-procedures.md +414 -0
- package/.kiro/guides/project-evaluation.md +534 -0
- package/.kiro/guides/quality-assurance.md +431 -0
- package/.kiro/guides/quick-start.md +235 -0
- package/.kiro/guides/troubleshooting.md +575 -0
- package/.kiro/guides/walkthroughs.md +711 -0
- package/.kiro/prompts/add-to-devlog.md +263 -0
- package/.kiro/prompts/code-review-fix.md +18 -0
- package/.kiro/prompts/code-review-hackathon.md +167 -0
- package/.kiro/prompts/code-review-security.md +454 -0
- package/.kiro/prompts/code-review.md +113 -0
- package/.kiro/prompts/create-prd.md +151 -0
- package/.kiro/prompts/execute-backend.md +257 -0
- package/.kiro/prompts/execute-frontend.md +438 -0
- package/.kiro/prompts/execute-logging.md +491 -0
- package/.kiro/prompts/execute-security.md +482 -0
- package/.kiro/prompts/execute-testing.md +528 -0
- package/.kiro/prompts/execute.md +101 -0
- package/.kiro/prompts/execution-report.md +72 -0
- package/.kiro/prompts/implement-fix.md +228 -0
- package/.kiro/prompts/plan-feature.md +433 -0
- package/.kiro/prompts/prime.md +73 -0
- package/.kiro/prompts/quality-metrics.md +622 -0
- package/.kiro/prompts/quickstart.md +318 -0
- package/.kiro/prompts/rca.md +220 -0
- package/.kiro/prompts/system-review.md +189 -0
- package/README.md +32 -0
- package/bin/cli.js +97 -0
- package/package.json +33 -0
|
@@ -0,0 +1,941 @@
|
|
|
1
|
+
# Agent configuration reference
|
|
2
|
+
Every agent configuration file can include the following sections:
|
|
3
|
+
* [`name`](https://kiro.dev/docs/cli/custom-agents/configuration-reference/#name-field) — The name of the agent (optional, derived from filename if not specified).
|
|
4
|
+
* [`description`](https://kiro.dev/docs/cli/custom-agents/configuration-reference/#description-field) — A description of the agent.
|
|
5
|
+
* [`prompt`](https://kiro.dev/docs/cli/custom-agents/configuration-reference/#prompt-field) — High-level context for the agent.
|
|
6
|
+
* [`mcpServers`](https://kiro.dev/docs/cli/custom-agents/configuration-reference/#mcpservers-field) — The MCP servers the agent has access to.
|
|
7
|
+
* [`tools`](https://kiro.dev/docs/cli/custom-agents/configuration-reference/#tools-field) — The tools available to the agent.
|
|
8
|
+
* [`toolAliases`](https://kiro.dev/docs/cli/custom-agents/configuration-reference/#toolaliases-field) — Tool name remapping for handling naming collisions.
|
|
9
|
+
* [`allowedTools`](https://kiro.dev/docs/cli/custom-agents/configuration-reference/#allowedtools-field) — Tools that can be used without prompting.
|
|
10
|
+
* [`toolsSettings`](https://kiro.dev/docs/cli/custom-agents/configuration-reference/#toolssettings-field) — Configuration for specific tools.
|
|
11
|
+
* [`resources`](https://kiro.dev/docs/cli/custom-agents/configuration-reference/#resources-field) — Resources available to the agent.
|
|
12
|
+
* [`hooks`](https://kiro.dev/docs/cli/custom-agents/configuration-reference/#hooks-field) — Commands run at specific trigger points.
|
|
13
|
+
* [`includeMcpJson`](https://kiro.dev/docs/cli/custom-agents/configuration-reference/#includemcpjson-field) — Whether to include MCP servers from mcp.json files.
|
|
14
|
+
* [`model`](https://kiro.dev/docs/cli/custom-agents/configuration-reference/#model-field) — The model ID to use for this agent.
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
## Name field[](https://kiro.dev/docs/cli/custom-agents/configuration-reference/#name-field)
|
|
18
|
+
The `name` field specifies the name of the agent. This is used for identification and display purposes.
|
|
19
|
+
json
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
{
|
|
23
|
+
"name": "aws-expert"
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
## Description field[](https://kiro.dev/docs/cli/custom-agents/configuration-reference/#description-field)
|
|
30
|
+
The `description` field provides a description of what the agent does. This is primarily for human readability and helps users distinguish between different agents.
|
|
31
|
+
json
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
{
|
|
35
|
+
"description": "An agent specialized for AWS infrastructure tasks"
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
## Prompt field[](https://kiro.dev/docs/cli/custom-agents/configuration-reference/#prompt-field)
|
|
42
|
+
The `prompt` field is intended to provide high-level context to the agent, similar to a system prompt. It supports both inline text and file:// URIs to reference external files.
|
|
43
|
+
### Inline prompt[](https://kiro.dev/docs/cli/custom-agents/configuration-reference/#inline-prompt)
|
|
44
|
+
json
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
{
|
|
48
|
+
"prompt": "You are an expert AWS infrastructure specialist"
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
### File URI prompt[](https://kiro.dev/docs/cli/custom-agents/configuration-reference/#file-uri-prompt)
|
|
55
|
+
You can reference external files using `file://` URIs. This allows you to maintain long, complex prompts in separate files for better organization and version control, while keeping your agent configuration clean and readable.
|
|
56
|
+
json
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
{
|
|
60
|
+
"prompt": "file://./my-agent-prompt.md"
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
#### File URI path resolution[](https://kiro.dev/docs/cli/custom-agents/configuration-reference/#file-uri-path-resolution)
|
|
67
|
+
* **Relative paths** : Resolved relative to the agent configuration file's directory
|
|
68
|
+
* `"file://./prompt.md"` → `prompt.md` in the same directory as the agent config
|
|
69
|
+
* `"file://../shared/prompt.md"` → `prompt.md` in a parent directory
|
|
70
|
+
* **Absolute paths** : Used as-is
|
|
71
|
+
* `"file:///home/user/prompts/agent.md"` → Absolute path to the file
|
|
72
|
+
|
|
73
|
+
|
|
74
|
+
#### File URI examples[](https://kiro.dev/docs/cli/custom-agents/configuration-reference/#file-uri-examples)
|
|
75
|
+
json
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
{
|
|
79
|
+
"prompt": "file://./prompts/aws-expert.md"
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
json
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
{
|
|
89
|
+
"prompt": "file:///Users/developer/shared-prompts/rust-specialist.md"
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
## McpServers field[](https://kiro.dev/docs/cli/custom-agents/configuration-reference/#mcpservers-field)
|
|
96
|
+
The `mcpServers` field specifies which Model Context Protocol (MCP) servers the agent has access to. Each server is defined with a command and optional arguments.
|
|
97
|
+
json
|
|
98
|
+
```
|
|
99
|
+
|
|
100
|
+
{
|
|
101
|
+
"mcpServers": {
|
|
102
|
+
"fetch": {
|
|
103
|
+
"command": "fetch3.1",
|
|
104
|
+
"args": []
|
|
105
|
+
},
|
|
106
|
+
"git": {
|
|
107
|
+
"command": "git-mcp",
|
|
108
|
+
"args": [],
|
|
109
|
+
"env": {
|
|
110
|
+
"GIT_CONFIG_GLOBAL": "/dev/null"
|
|
111
|
+
},
|
|
112
|
+
"timeout": 120000
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
|
|
118
|
+
```
|
|
119
|
+
|
|
120
|
+
Each MCP server configuration can include:
|
|
121
|
+
* `command` (required): The command to execute to start the MCP server
|
|
122
|
+
* `args` (optional): Arguments to pass to the command
|
|
123
|
+
* `env` (optional): Environment variables to set for the server
|
|
124
|
+
* `timeout` (optional): Timeout for each MCP request in milliseconds (default: 120000)
|
|
125
|
+
|
|
126
|
+
|
|
127
|
+
## Tools field[](https://kiro.dev/docs/cli/custom-agents/configuration-reference/#tools-field)
|
|
128
|
+
The `tools` field lists all tools that the agent can potentially use. Tools include built-in tools and tools from MCP servers.
|
|
129
|
+
* Built-in tools are specified by their name (e.g., `read`, `shell`)
|
|
130
|
+
* MCP server tools are prefixed with `@` followed by the server name (e.g., `@git`)
|
|
131
|
+
* To specify a specific tool from an MCP server, use `@server_name/tool_name`
|
|
132
|
+
* Use `*` as a special wildcard to include all available tools (both built-in and from MCP servers)
|
|
133
|
+
* Use `@builtin` to include all built-in tools
|
|
134
|
+
* Use `@server_name` to include all tools from a specific MCP server
|
|
135
|
+
|
|
136
|
+
|
|
137
|
+
json
|
|
138
|
+
```
|
|
139
|
+
|
|
140
|
+
{
|
|
141
|
+
"tools": [
|
|
142
|
+
"read",
|
|
143
|
+
"write",
|
|
144
|
+
"shell",
|
|
145
|
+
"@git",
|
|
146
|
+
"@rust-analyzer/check_code"
|
|
147
|
+
]
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
|
|
151
|
+
```
|
|
152
|
+
|
|
153
|
+
To include all available tools, you can simply use:
|
|
154
|
+
json
|
|
155
|
+
```
|
|
156
|
+
|
|
157
|
+
{
|
|
158
|
+
"tools": ["*"]
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
|
|
162
|
+
```
|
|
163
|
+
|
|
164
|
+
## ToolAliases field[](https://kiro.dev/docs/cli/custom-agents/configuration-reference/#toolaliases-field)
|
|
165
|
+
The `toolAliases` field is an advanced feature that allows you to remap tool names. This is primarily used to resolve naming collisions between tools from different MCP servers, or to create more intuitive names for specific tools.
|
|
166
|
+
For example, if both `@github-mcp` and `@gitlab-mcp` servers provide a tool called `get_issues`, you would have a naming collision. You can use `toolAliases` to disambiguate them:
|
|
167
|
+
json
|
|
168
|
+
```
|
|
169
|
+
|
|
170
|
+
{
|
|
171
|
+
"toolAliases": {
|
|
172
|
+
"@github-mcp/get_issues": "github_issues",
|
|
173
|
+
"@gitlab-mcp/get_issues": "gitlab_issues"
|
|
174
|
+
}
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
|
|
178
|
+
```
|
|
179
|
+
|
|
180
|
+
With this configuration, the tools will be available to the agent as `github_issues` and `gitlab_issues` instead of having a collision on `get_issues`.
|
|
181
|
+
You can also use aliases to create shorter or more intuitive names for frequently used tools:
|
|
182
|
+
json
|
|
183
|
+
```
|
|
184
|
+
|
|
185
|
+
{
|
|
186
|
+
"toolAliases": {
|
|
187
|
+
"@aws-cloud-formation/deploy_stack_with_parameters": "deploy_cf",
|
|
188
|
+
"@kubernetes-tools/get_pod_logs_with_namespace": "pod_logs"
|
|
189
|
+
}
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
|
|
193
|
+
```
|
|
194
|
+
|
|
195
|
+
The key is the original tool name (including server prefix for MCP tools), and the value is the new name to use.
|
|
196
|
+
## AllowedTools field[](https://kiro.dev/docs/cli/custom-agents/configuration-reference/#allowedtools-field)
|
|
197
|
+
The `allowedTools` field specifies which tools can be used without prompting the user for permission. This is a security feature that helps prevent unauthorized tool usage.
|
|
198
|
+
json
|
|
199
|
+
```
|
|
200
|
+
|
|
201
|
+
{
|
|
202
|
+
"allowedTools": [
|
|
203
|
+
"read",
|
|
204
|
+
"write",
|
|
205
|
+
"@git/git_status",
|
|
206
|
+
"@server/read_*",
|
|
207
|
+
"@fetch"
|
|
208
|
+
]
|
|
209
|
+
}
|
|
210
|
+
|
|
211
|
+
|
|
212
|
+
```
|
|
213
|
+
|
|
214
|
+
You can allow tools using several patterns:
|
|
215
|
+
### Exact matches[](https://kiro.dev/docs/cli/custom-agents/configuration-reference/#exact-matches)
|
|
216
|
+
* **Built-in tools** : `"read"`, `"shell"`, `"knowledge"`
|
|
217
|
+
* **Specific MCP tools** : `"@server_name/tool_name"` (e.g., `"@git/git_status"`)
|
|
218
|
+
* **All tools from MCP server** : `"@server_name"` (e.g., `"@fetch"`)
|
|
219
|
+
|
|
220
|
+
|
|
221
|
+
### Wildcard patterns[](https://kiro.dev/docs/cli/custom-agents/configuration-reference/#wildcard-patterns)
|
|
222
|
+
The `allowedTools` field supports glob-style wildcard patterns using `*` and `?`:
|
|
223
|
+
#### MCP tool patterns[](https://kiro.dev/docs/cli/custom-agents/configuration-reference/#mcp-tool-patterns)
|
|
224
|
+
* **Tool prefix** : `"@server/read_*"` → matches `@server/read_file`, `@server/read_config`
|
|
225
|
+
* **Tool suffix** : `"@server/*_get"` → matches `@server/issue_get`, `@server/data_get`
|
|
226
|
+
* **Server pattern** : `"@*-mcp/read_*"` → matches `@git-mcp/read_file`, `@db-mcp/read_data`
|
|
227
|
+
* **Any tool from pattern servers** : `"@git-*/*"` → matches any tool from servers matching `git-*`
|
|
228
|
+
|
|
229
|
+
|
|
230
|
+
Optionally, you can also prefix native tools with the namespace `@builtin`.
|
|
231
|
+
### Examples[](https://kiro.dev/docs/cli/custom-agents/configuration-reference/#examples)
|
|
232
|
+
json
|
|
233
|
+
```
|
|
234
|
+
|
|
235
|
+
{
|
|
236
|
+
"allowedTools": [
|
|
237
|
+
// Exact matches
|
|
238
|
+
"read",
|
|
239
|
+
"knowledge",
|
|
240
|
+
"@server/specific_tool",
|
|
241
|
+
|
|
242
|
+
// Native tool wildcards
|
|
243
|
+
"r*", // Read
|
|
244
|
+
"w*", // Write
|
|
245
|
+
@builtin, // All native tools
|
|
246
|
+
|
|
247
|
+
// MCP tool wildcards
|
|
248
|
+
"@server/api_*", // All API tools from server
|
|
249
|
+
"@server/read_*", // All read tools from server
|
|
250
|
+
"@git-server/get_*_info", // Tools like get_user_info, get_repo_info
|
|
251
|
+
"@*/status", // Status tool from any server
|
|
252
|
+
|
|
253
|
+
// Server-level permissions
|
|
254
|
+
"@fetch", // All tools from fetch server
|
|
255
|
+
"@git-*" // All tools from any git-* server
|
|
256
|
+
]
|
|
257
|
+
}
|
|
258
|
+
|
|
259
|
+
|
|
260
|
+
```
|
|
261
|
+
|
|
262
|
+
### Pattern matching rules[](https://kiro.dev/docs/cli/custom-agents/configuration-reference/#pattern-matching-rules)
|
|
263
|
+
* **`*`**matches any sequence of characters (including none)
|
|
264
|
+
* **`?`**matches exactly one character
|
|
265
|
+
* **Exact matches** take precedence over patterns
|
|
266
|
+
* **Server-level permissions** (`@server_name`) allow all tools from that server
|
|
267
|
+
* **Case-sensitive** matching
|
|
268
|
+
|
|
269
|
+
|
|
270
|
+
Unlike the `tools` field, the `allowedTools` field does not support the `"*"` wildcard for allowing all tools. To allow tools, you must use specific patterns or server-level permissions.
|
|
271
|
+
## ToolsSettings field[](https://kiro.dev/docs/cli/custom-agents/configuration-reference/#toolssettings-field)
|
|
272
|
+
The `toolsSettings` field provides configuration for specific tools. Each tool can have its own unique configuration options. Note that specifications that configure allowable patterns will be overridden if the tool is also included in `allowedTools`.
|
|
273
|
+
json
|
|
274
|
+
```
|
|
275
|
+
|
|
276
|
+
{
|
|
277
|
+
"toolsSettings": {
|
|
278
|
+
"write": {
|
|
279
|
+
"allowedPaths": ["~/**"]
|
|
280
|
+
},
|
|
281
|
+
"@git/git_status": {
|
|
282
|
+
"git_user": "$GIT_USER"
|
|
283
|
+
}
|
|
284
|
+
}
|
|
285
|
+
}
|
|
286
|
+
|
|
287
|
+
|
|
288
|
+
```
|
|
289
|
+
|
|
290
|
+
## Resources field[](https://kiro.dev/docs/cli/custom-agents/configuration-reference/#resources-field)
|
|
291
|
+
The `resources` field gives an agent access to local resources. Currently, only file resources are supported, and all resource paths must start with `file://`.
|
|
292
|
+
json
|
|
293
|
+
```
|
|
294
|
+
|
|
295
|
+
{
|
|
296
|
+
"resources": [
|
|
297
|
+
"file://AmazonQ.md",
|
|
298
|
+
"file://README.md",
|
|
299
|
+
"file://.amazonq/rules/**/*.md"
|
|
300
|
+
]
|
|
301
|
+
}
|
|
302
|
+
|
|
303
|
+
|
|
304
|
+
```
|
|
305
|
+
|
|
306
|
+
Resources can include:
|
|
307
|
+
* Specific files
|
|
308
|
+
* Glob patterns for multiple files
|
|
309
|
+
* Absolute or relative paths
|
|
310
|
+
|
|
311
|
+
|
|
312
|
+
## Hooks field[](https://kiro.dev/docs/cli/custom-agents/configuration-reference/#hooks-field)
|
|
313
|
+
The `hooks` field defines commands to run at specific trigger points during agent lifecycle and tool execution.
|
|
314
|
+
For detailed information about hook behavior, input/output formats, and examples, see the [Hooks documentation](https://kiro.dev/docs/cli/hooks).
|
|
315
|
+
json
|
|
316
|
+
```
|
|
317
|
+
|
|
318
|
+
{
|
|
319
|
+
"hooks": {
|
|
320
|
+
"agentSpawn": [
|
|
321
|
+
{
|
|
322
|
+
"command": "git status"
|
|
323
|
+
}
|
|
324
|
+
],
|
|
325
|
+
"userPromptSubmit": [
|
|
326
|
+
{
|
|
327
|
+
"command": "ls -la"
|
|
328
|
+
}
|
|
329
|
+
],
|
|
330
|
+
"preToolUse": [
|
|
331
|
+
{
|
|
332
|
+
"matcher": "shell",
|
|
333
|
+
"command": "{ echo \"$(date) - Bash command:\"; cat; echo; } >> /tmp/bash_audit_log"
|
|
334
|
+
},
|
|
335
|
+
{
|
|
336
|
+
"matcher": "aws",
|
|
337
|
+
"command": "{ echo \"$(date) - AWS CLI call:\"; cat; echo; } >> /tmp/aws_audit_log"
|
|
338
|
+
}
|
|
339
|
+
],
|
|
340
|
+
"postToolUse": [
|
|
341
|
+
{
|
|
342
|
+
"matcher": "write",
|
|
343
|
+
"command": "cargo fmt --all"
|
|
344
|
+
}
|
|
345
|
+
]
|
|
346
|
+
}
|
|
347
|
+
}
|
|
348
|
+
|
|
349
|
+
|
|
350
|
+
```
|
|
351
|
+
|
|
352
|
+
Each hook is defined with:
|
|
353
|
+
* `command` (required): The command to execute
|
|
354
|
+
* `matcher` (optional): Pattern to match tool names for `preToolUse` and `postToolUse` hooks. See [built-in tools documentation](https://kiro.dev/docs/cli/custom-agents/configuration-reference/built-in-tools.md) for available tool names.
|
|
355
|
+
|
|
356
|
+
|
|
357
|
+
Available hook triggers:
|
|
358
|
+
* `agentSpawn`: Triggered when the agent is initialized.
|
|
359
|
+
* `userPromptSubmit`: Triggered when the user submits a message.
|
|
360
|
+
* `preToolUse`: Triggered before a tool is executed. Can block the tool use.
|
|
361
|
+
* `postToolUse`: Triggered after a tool is executed.
|
|
362
|
+
* `stop`: Triggered when the assistant finishes responding.
|
|
363
|
+
|
|
364
|
+
|
|
365
|
+
## includeMcpJson field[](https://kiro.dev/docs/cli/custom-agents/configuration-reference/#includemcpjson-field)
|
|
366
|
+
The `includeMcpJson` field determines whether to include MCP servers defined in the MCP configuration files (`~/.kiro/settings/mcp.json` for global and `<cwd>/.kiro/settings/mcp.json` for workspace).
|
|
367
|
+
json
|
|
368
|
+
```
|
|
369
|
+
|
|
370
|
+
{
|
|
371
|
+
"includeMcpJson": true
|
|
372
|
+
}
|
|
373
|
+
|
|
374
|
+
|
|
375
|
+
```
|
|
376
|
+
|
|
377
|
+
When set to `true`, the agent will have access to all MCP servers defined in the global and local configurations in addition to those defined in the agent's `mcpServers` field.
|
|
378
|
+
## Model field[](https://kiro.dev/docs/cli/custom-agents/configuration-reference/#model-field)
|
|
379
|
+
The `model` field specifies the model ID to use for this agent. If not specified, the agent will use the default model.
|
|
380
|
+
json
|
|
381
|
+
```
|
|
382
|
+
|
|
383
|
+
{
|
|
384
|
+
"model": "claude-sonnet-4"
|
|
385
|
+
}
|
|
386
|
+
|
|
387
|
+
|
|
388
|
+
```
|
|
389
|
+
|
|
390
|
+
The model ID must match one of the available models returned by the Kiro CLI's model service. You can see available models by using the `/model` command in an active chat session.
|
|
391
|
+
If the specified model is not available, the agent will fall back to the default model and display a warning.
|
|
392
|
+
## Complete example[](https://kiro.dev/docs/cli/custom-agents/configuration-reference/#complete-example)
|
|
393
|
+
Here's a complete example of an agent configuration file:
|
|
394
|
+
json
|
|
395
|
+
```
|
|
396
|
+
|
|
397
|
+
{
|
|
398
|
+
"name": "aws-rust-agent",
|
|
399
|
+
"description": "A specialized agent for AWS and Rust development tasks",
|
|
400
|
+
"mcpServers": {
|
|
401
|
+
"fetch": {
|
|
402
|
+
"command": "fetch3.1",
|
|
403
|
+
"args": []
|
|
404
|
+
},
|
|
405
|
+
"git": {
|
|
406
|
+
"command": "git-mcp",
|
|
407
|
+
"args": []
|
|
408
|
+
}
|
|
409
|
+
},
|
|
410
|
+
"tools": [
|
|
411
|
+
"read",
|
|
412
|
+
"write",
|
|
413
|
+
"shell",
|
|
414
|
+
"aws",
|
|
415
|
+
"@git",
|
|
416
|
+
"@fetch/fetch_url"
|
|
417
|
+
],
|
|
418
|
+
"toolAliases": {
|
|
419
|
+
"@git/git_status": "status",
|
|
420
|
+
"@fetch/fetch_url": "get"
|
|
421
|
+
},
|
|
422
|
+
"allowedTools": [
|
|
423
|
+
"read",
|
|
424
|
+
"@git/git_status"
|
|
425
|
+
],
|
|
426
|
+
"toolsSettings": {
|
|
427
|
+
"write": {
|
|
428
|
+
"allowedPaths": ["src/**", "tests/**", "Cargo.toml"]
|
|
429
|
+
},
|
|
430
|
+
"aws": {
|
|
431
|
+
"allowedServices": ["s3", "lambda"]
|
|
432
|
+
}
|
|
433
|
+
},
|
|
434
|
+
"resources": [
|
|
435
|
+
"file://README.md",
|
|
436
|
+
"file://docs/**/*.md"
|
|
437
|
+
],
|
|
438
|
+
"hooks": {
|
|
439
|
+
"agentSpawn": [
|
|
440
|
+
{
|
|
441
|
+
"command": "git status"
|
|
442
|
+
}
|
|
443
|
+
],
|
|
444
|
+
"userPromptSubmit": [
|
|
445
|
+
{
|
|
446
|
+
"command": "ls -la"
|
|
447
|
+
}
|
|
448
|
+
]
|
|
449
|
+
},
|
|
450
|
+
"useLegacyMcpJson": true,
|
|
451
|
+
"model": "claude-sonnet-4"
|
|
452
|
+
}
|
|
453
|
+
|
|
454
|
+
|
|
455
|
+
```
|
|
456
|
+
|
|
457
|
+
Agent configuration files are JSON files that define how your custom agents behave. The filename (without `.json`) becomes the agent's name.
|
|
458
|
+
## Quick start[](https://kiro.dev/docs/cli/custom-agents/configuration-reference/#quick-start)
|
|
459
|
+
We recommend using the `/agent generate` command within your active Kiro session to intelligently generate agent configurations with AI assistance.
|
|
460
|
+
## File locations[](https://kiro.dev/docs/cli/custom-agents/configuration-reference/#file-locations)
|
|
461
|
+
You can define local agents and global agents.
|
|
462
|
+
### Local agents (project-specific)[](https://kiro.dev/docs/cli/custom-agents/configuration-reference/#local-agents-project-specific)
|
|
463
|
+
```
|
|
464
|
+
|
|
465
|
+
.kiro/agents/
|
|
466
|
+
|
|
467
|
+
|
|
468
|
+
```
|
|
469
|
+
|
|
470
|
+
Local agents are specific to the current workspace and only available when running Kiro CLI from that directory or its subdirectories.
|
|
471
|
+
**Example:**
|
|
472
|
+
```
|
|
473
|
+
|
|
474
|
+
my-project/
|
|
475
|
+
├── .kiro/
|
|
476
|
+
│ └── agents/
|
|
477
|
+
│ ├── dev-agent.json
|
|
478
|
+
│ └── aws-specialist.json
|
|
479
|
+
└── src/
|
|
480
|
+
└── main.py
|
|
481
|
+
|
|
482
|
+
|
|
483
|
+
```
|
|
484
|
+
|
|
485
|
+
### Global agents (user-wide)[](https://kiro.dev/docs/cli/custom-agents/configuration-reference/#global-agents-user-wide)
|
|
486
|
+
```
|
|
487
|
+
|
|
488
|
+
~/.kiro/agents/
|
|
489
|
+
|
|
490
|
+
|
|
491
|
+
```
|
|
492
|
+
|
|
493
|
+
Global agents are available from any directory.
|
|
494
|
+
**Example:**
|
|
495
|
+
```
|
|
496
|
+
|
|
497
|
+
~/.kiro/agents/
|
|
498
|
+
├── general-assistant.json
|
|
499
|
+
├── code-reviewer.json
|
|
500
|
+
└── documentation-writer.json
|
|
501
|
+
|
|
502
|
+
|
|
503
|
+
```
|
|
504
|
+
|
|
505
|
+
### Agent precedence[](https://kiro.dev/docs/cli/custom-agents/configuration-reference/#agent-precedence)
|
|
506
|
+
When Kiro CLI looks for an agent:
|
|
507
|
+
1. **Local first** : Checks `.kiro/agents/` in the current directory
|
|
508
|
+
2. **Global fallback** : Checks `~/.kiro/agents/` in the HOME directory
|
|
509
|
+
|
|
510
|
+
|
|
511
|
+
If both locations have agents with the same name, the local agent takes precedence with a warning message.
|
|
512
|
+
## Configuration fields[](https://kiro.dev/docs/cli/custom-agents/configuration-reference/#configuration-fields)
|
|
513
|
+
### name[](https://kiro.dev/docs/cli/custom-agents/configuration-reference/#name)
|
|
514
|
+
The agent's name for identification and display.
|
|
515
|
+
json
|
|
516
|
+
```
|
|
517
|
+
|
|
518
|
+
{
|
|
519
|
+
"name": "aws-expert"
|
|
520
|
+
}
|
|
521
|
+
|
|
522
|
+
|
|
523
|
+
```
|
|
524
|
+
|
|
525
|
+
### description[](https://kiro.dev/docs/cli/custom-agents/configuration-reference/#description)
|
|
526
|
+
Human-readable description of the agent's purpose.
|
|
527
|
+
json
|
|
528
|
+
```
|
|
529
|
+
|
|
530
|
+
{
|
|
531
|
+
"description": "An agent specialized for AWS infrastructure tasks"
|
|
532
|
+
}
|
|
533
|
+
|
|
534
|
+
|
|
535
|
+
```
|
|
536
|
+
|
|
537
|
+
### prompt[](https://kiro.dev/docs/cli/custom-agents/configuration-reference/#prompt)
|
|
538
|
+
High-level context for the agent, similar to a system prompt. Supports inline text or `file://` URIs.
|
|
539
|
+
**Inline:**
|
|
540
|
+
json
|
|
541
|
+
```
|
|
542
|
+
|
|
543
|
+
{
|
|
544
|
+
"prompt": "You are an expert AWS infrastructure specialist"
|
|
545
|
+
}
|
|
546
|
+
|
|
547
|
+
|
|
548
|
+
```
|
|
549
|
+
|
|
550
|
+
**File URI:**
|
|
551
|
+
json
|
|
552
|
+
```
|
|
553
|
+
|
|
554
|
+
{
|
|
555
|
+
"prompt": "file://./my-agent-prompt.md"
|
|
556
|
+
}
|
|
557
|
+
|
|
558
|
+
|
|
559
|
+
```
|
|
560
|
+
|
|
561
|
+
**Path Resolution:**
|
|
562
|
+
* Relative paths: Resolved relative to agent config file
|
|
563
|
+
* `"file://./prompt.md"` → Same directory as agent config
|
|
564
|
+
* `"file://../shared/prompt.md"` → Parent directory
|
|
565
|
+
* Absolute paths: Used as-is
|
|
566
|
+
* `"file:///home/user/prompts/agent.md"`
|
|
567
|
+
|
|
568
|
+
|
|
569
|
+
### mcpServers[](https://kiro.dev/docs/cli/custom-agents/configuration-reference/#mcpservers)
|
|
570
|
+
MCP servers the agent can access.
|
|
571
|
+
json
|
|
572
|
+
```
|
|
573
|
+
|
|
574
|
+
{
|
|
575
|
+
"mcpServers": {
|
|
576
|
+
"fetch": {
|
|
577
|
+
"command": "fetch-server",
|
|
578
|
+
"args": []
|
|
579
|
+
},
|
|
580
|
+
"git": {
|
|
581
|
+
"command": "git-mcp",
|
|
582
|
+
"args": [],
|
|
583
|
+
"env": {
|
|
584
|
+
"GIT_CONFIG_GLOBAL": "/dev/null"
|
|
585
|
+
},
|
|
586
|
+
"timeout": 120000
|
|
587
|
+
}
|
|
588
|
+
}
|
|
589
|
+
}
|
|
590
|
+
|
|
591
|
+
|
|
592
|
+
```
|
|
593
|
+
|
|
594
|
+
**Fields:**
|
|
595
|
+
* `command` (required): Command to start the MCP server
|
|
596
|
+
* `args` (optional): Arguments for the command
|
|
597
|
+
* `env` (optional): Environment variables
|
|
598
|
+
* `timeout` (optional): Request timeout in milliseconds (default: 120000)
|
|
599
|
+
|
|
600
|
+
|
|
601
|
+
### tools[](https://kiro.dev/docs/cli/custom-agents/configuration-reference/#tools)
|
|
602
|
+
Tools available to the agent.
|
|
603
|
+
json
|
|
604
|
+
```
|
|
605
|
+
|
|
606
|
+
{
|
|
607
|
+
"tools": [
|
|
608
|
+
"read",
|
|
609
|
+
"write",
|
|
610
|
+
"shell",
|
|
611
|
+
"@git",
|
|
612
|
+
"@rust-analyzer/check_code"
|
|
613
|
+
]
|
|
614
|
+
}
|
|
615
|
+
|
|
616
|
+
|
|
617
|
+
```
|
|
618
|
+
|
|
619
|
+
**Tool References:**
|
|
620
|
+
* Built-in tools: `"read"`, `"shell"`
|
|
621
|
+
* All MCP server tools: `"@server_name"`
|
|
622
|
+
* Specific MCP tool: `"@server_name/tool_name"`
|
|
623
|
+
* All tools: `"*"`
|
|
624
|
+
* All built-in tools: `"@builtin"`
|
|
625
|
+
|
|
626
|
+
|
|
627
|
+
### toolAliases[](https://kiro.dev/docs/cli/custom-agents/configuration-reference/#toolaliases)
|
|
628
|
+
Remap tool names to resolve naming collisions or create intuitive names.
|
|
629
|
+
json
|
|
630
|
+
```
|
|
631
|
+
|
|
632
|
+
{
|
|
633
|
+
"toolAliases": {
|
|
634
|
+
"@github-mcp/get_issues": "github_issues",
|
|
635
|
+
"@gitlab-mcp/get_issues": "gitlab_issues",
|
|
636
|
+
"@aws-cloud-formation/deploy_stack_with_parameters": "deploy_cf"
|
|
637
|
+
}
|
|
638
|
+
}
|
|
639
|
+
|
|
640
|
+
|
|
641
|
+
```
|
|
642
|
+
|
|
643
|
+
### allowedTools[](https://kiro.dev/docs/cli/custom-agents/configuration-reference/#allowedtools)
|
|
644
|
+
Tools that can be used without prompting for permission.
|
|
645
|
+
json
|
|
646
|
+
```
|
|
647
|
+
|
|
648
|
+
{
|
|
649
|
+
"allowedTools": [
|
|
650
|
+
"read",
|
|
651
|
+
"@git/git_status",
|
|
652
|
+
"@server/read_*",
|
|
653
|
+
"@fetch"
|
|
654
|
+
]
|
|
655
|
+
}
|
|
656
|
+
|
|
657
|
+
|
|
658
|
+
```
|
|
659
|
+
|
|
660
|
+
**Pattern Support:**
|
|
661
|
+
**Exact Matches:**
|
|
662
|
+
* Built-in: `"read"`, `"shell"`
|
|
663
|
+
* MCP tool: `"@server_name/tool_name"`
|
|
664
|
+
* All server tools: `"@server_name"`
|
|
665
|
+
|
|
666
|
+
|
|
667
|
+
**Wildcards:**
|
|
668
|
+
* Prefix: `"code_*"` → `code_review`, `code_analysis`
|
|
669
|
+
* Suffix: `"*_bash"` → `execute_bash`, `run_bash`
|
|
670
|
+
* Single char: `"?ead"` → `read`, `head`
|
|
671
|
+
* MCP patterns: `"@server/read_*"`, `"@git-*/status"`
|
|
672
|
+
|
|
673
|
+
|
|
674
|
+
### toolsSettings[](https://kiro.dev/docs/cli/custom-agents/configuration-reference/#toolssettings)
|
|
675
|
+
Configuration for specific tools.
|
|
676
|
+
json
|
|
677
|
+
```
|
|
678
|
+
|
|
679
|
+
{
|
|
680
|
+
"toolsSettings": {
|
|
681
|
+
"write": {
|
|
682
|
+
"allowedPaths": ["~/**"]
|
|
683
|
+
},
|
|
684
|
+
"shell": {
|
|
685
|
+
"allowedCommands": ["git status", "git fetch"],
|
|
686
|
+
"deniedCommands": ["git commit .*", "git push .*"],
|
|
687
|
+
"autoAllowReadonly": true
|
|
688
|
+
},
|
|
689
|
+
"@git/git_status": {
|
|
690
|
+
"git_user": "$GIT_USER"
|
|
691
|
+
}
|
|
692
|
+
}
|
|
693
|
+
}
|
|
694
|
+
|
|
695
|
+
|
|
696
|
+
```
|
|
697
|
+
|
|
698
|
+
See [Built-in Tools](https://kiro.dev/docs/cli/reference/built-in-tools) for tool-specific options.
|
|
699
|
+
### resources[](https://kiro.dev/docs/cli/custom-agents/configuration-reference/#resources)
|
|
700
|
+
Local resources available to the agent. All paths must start with `file://`.
|
|
701
|
+
json
|
|
702
|
+
```
|
|
703
|
+
|
|
704
|
+
{
|
|
705
|
+
"resources": [
|
|
706
|
+
"file://README.md",
|
|
707
|
+
"file://.kiro/steering/**/*.md",
|
|
708
|
+
"file://docs/**/*.md"
|
|
709
|
+
]
|
|
710
|
+
}
|
|
711
|
+
|
|
712
|
+
|
|
713
|
+
```
|
|
714
|
+
|
|
715
|
+
Supports:
|
|
716
|
+
* Specific files
|
|
717
|
+
* Glob patterns
|
|
718
|
+
* Absolute or relative paths
|
|
719
|
+
|
|
720
|
+
|
|
721
|
+
### hooks[](https://kiro.dev/docs/cli/custom-agents/configuration-reference/#hooks)
|
|
722
|
+
Commands to run at specific trigger points.
|
|
723
|
+
json
|
|
724
|
+
```
|
|
725
|
+
|
|
726
|
+
{
|
|
727
|
+
"hooks": {
|
|
728
|
+
"agentSpawn": [
|
|
729
|
+
{
|
|
730
|
+
"command": "git status"
|
|
731
|
+
}
|
|
732
|
+
],
|
|
733
|
+
"userPromptSubmit": [
|
|
734
|
+
{
|
|
735
|
+
"command": "ls -la"
|
|
736
|
+
}
|
|
737
|
+
],
|
|
738
|
+
"preToolUse": [
|
|
739
|
+
{
|
|
740
|
+
"matcher": "shell",
|
|
741
|
+
"command": "{ echo \"$(date) - Bash:\"; cat; } >> /tmp/audit.log"
|
|
742
|
+
}
|
|
743
|
+
],
|
|
744
|
+
"postToolUse": [
|
|
745
|
+
{
|
|
746
|
+
"matcher": "write",
|
|
747
|
+
"command": "cargo fmt --all"
|
|
748
|
+
}
|
|
749
|
+
],
|
|
750
|
+
"stop": [
|
|
751
|
+
{
|
|
752
|
+
"command": "npm test"
|
|
753
|
+
}
|
|
754
|
+
]
|
|
755
|
+
}
|
|
756
|
+
}
|
|
757
|
+
|
|
758
|
+
|
|
759
|
+
```
|
|
760
|
+
|
|
761
|
+
**Hook Types:**
|
|
762
|
+
* `agentSpawn`: When agent is activated
|
|
763
|
+
* `userPromptSubmit`: When user submits a prompt
|
|
764
|
+
* `preToolUse`: Before tool execution (can block)
|
|
765
|
+
* `postToolUse`: After tool execution
|
|
766
|
+
* `stop`: When assistant finishes responding
|
|
767
|
+
|
|
768
|
+
|
|
769
|
+
See [Hooks](https://kiro.dev/docs/cli/hooks) for detailed documentation.
|
|
770
|
+
### model[](https://kiro.dev/docs/cli/custom-agents/configuration-reference/#model)
|
|
771
|
+
Model ID to use for this agent.
|
|
772
|
+
json
|
|
773
|
+
```
|
|
774
|
+
|
|
775
|
+
{
|
|
776
|
+
"model": "claude-sonnet-4"
|
|
777
|
+
}
|
|
778
|
+
|
|
779
|
+
|
|
780
|
+
```
|
|
781
|
+
|
|
782
|
+
If not specified or unavailable, falls back to default model.
|
|
783
|
+
## Complete example[](https://kiro.dev/docs/cli/custom-agents/configuration-reference/#complete-example-1)
|
|
784
|
+
json
|
|
785
|
+
```
|
|
786
|
+
|
|
787
|
+
{
|
|
788
|
+
"name": "aws-rust-agent",
|
|
789
|
+
"description": "Specialized agent for AWS and Rust development",
|
|
790
|
+
"prompt": "file://./prompts/aws-rust-expert.md",
|
|
791
|
+
"mcpServers": {
|
|
792
|
+
"fetch": {
|
|
793
|
+
"command": "fetch-server",
|
|
794
|
+
"args": []
|
|
795
|
+
},
|
|
796
|
+
"git": {
|
|
797
|
+
"command": "git-mcp",
|
|
798
|
+
"args": []
|
|
799
|
+
}
|
|
800
|
+
},
|
|
801
|
+
"tools": [
|
|
802
|
+
"read",
|
|
803
|
+
"write",
|
|
804
|
+
"shell",
|
|
805
|
+
"aws",
|
|
806
|
+
"@git",
|
|
807
|
+
"@fetch/fetch_url"
|
|
808
|
+
],
|
|
809
|
+
"toolAliases": {
|
|
810
|
+
"@git/git_status": "status",
|
|
811
|
+
"@fetch/fetch_url": "get"
|
|
812
|
+
},
|
|
813
|
+
"allowedTools": [
|
|
814
|
+
"read",
|
|
815
|
+
"@git/git_status"
|
|
816
|
+
],
|
|
817
|
+
"toolsSettings": {
|
|
818
|
+
"write": {
|
|
819
|
+
"allowedPaths": ["src/**", "tests/**", "Cargo.toml"]
|
|
820
|
+
},
|
|
821
|
+
"aws": {
|
|
822
|
+
"allowedServices": ["s3", "lambda"],
|
|
823
|
+
"autoAllowReadonly": true
|
|
824
|
+
}
|
|
825
|
+
},
|
|
826
|
+
"resources": [
|
|
827
|
+
"file://README.md",
|
|
828
|
+
"file://docs/**/*.md"
|
|
829
|
+
],
|
|
830
|
+
"hooks": {
|
|
831
|
+
"agentSpawn": [
|
|
832
|
+
{
|
|
833
|
+
"command": "git status"
|
|
834
|
+
}
|
|
835
|
+
],
|
|
836
|
+
"postToolUse": [
|
|
837
|
+
{
|
|
838
|
+
"matcher": "write",
|
|
839
|
+
"command": "cargo fmt --all"
|
|
840
|
+
}
|
|
841
|
+
]
|
|
842
|
+
},
|
|
843
|
+
"model": "claude-sonnet-4"
|
|
844
|
+
}
|
|
845
|
+
|
|
846
|
+
|
|
847
|
+
```
|
|
848
|
+
|
|
849
|
+
## Best practices[](https://kiro.dev/docs/cli/custom-agents/configuration-reference/#best-practices)
|
|
850
|
+
1. Start restrictive: Begin with minimal tool access and expand as needed
|
|
851
|
+
2. Name clearly: Use descriptive names that indicate the agent's purpose
|
|
852
|
+
3. Document usage: Add clear descriptions to help team members understand the agent
|
|
853
|
+
4. Version control: Store agent configurations in your project repository
|
|
854
|
+
5. Test thoroughly: Verify tool permissions work as expected before sharing
|
|
855
|
+
|
|
856
|
+
|
|
857
|
+
### Local vs global agents[](https://kiro.dev/docs/cli/custom-agents/configuration-reference/#local-vs-global-agents)
|
|
858
|
+
**Use Local Agents For:**
|
|
859
|
+
* Project-specific configurations
|
|
860
|
+
* Agents needing project files/tools
|
|
861
|
+
* Development environments with unique requirements
|
|
862
|
+
* Sharing with team via version control
|
|
863
|
+
|
|
864
|
+
|
|
865
|
+
**Use Global Agents For:**
|
|
866
|
+
* General-purpose agents across projects
|
|
867
|
+
* Personal productivity agents
|
|
868
|
+
* Agents without project-specific context
|
|
869
|
+
* Commonly used tools and workflows
|
|
870
|
+
|
|
871
|
+
|
|
872
|
+
### Security[](https://kiro.dev/docs/cli/custom-agents/configuration-reference/#security)
|
|
873
|
+
* Review `allowedTools` carefully
|
|
874
|
+
* Use specific patterns over wildcards
|
|
875
|
+
* Configure `toolsSettings` for sensitive operations
|
|
876
|
+
* Test agents in safe environments first
|
|
877
|
+
|
|
878
|
+
|
|
879
|
+
### Organization[](https://kiro.dev/docs/cli/custom-agents/configuration-reference/#organization)
|
|
880
|
+
* Use descriptive agent names
|
|
881
|
+
* Document agent purposes in descriptions
|
|
882
|
+
* Keep prompt files organized
|
|
883
|
+
* Version control local agents with projects
|
|
884
|
+
|
|
885
|
+
|
|
886
|
+
## Next steps[](https://kiro.dev/docs/cli/custom-agents/configuration-reference/#next-steps)
|
|
887
|
+
* [Creating Custom Agents](https://kiro.dev/docs/cli/custom-agents/creating)
|
|
888
|
+
* [Built-in Tools Reference](https://kiro.dev/docs/cli/built-in-tools)
|
|
889
|
+
* [Hooks Documentation](https://kiro.dev/docs/cli/hooks)
|
|
890
|
+
* [Agent Examples](https://kiro.dev/docs/cli/custom-agents/examples)
|
|
891
|
+
|
|
892
|
+
|
|
893
|
+
Page updated: November 27, 2025
|
|
894
|
+
[Creating custom agents](https://kiro.dev/docs/cli/custom-agents/creating/)
|
|
895
|
+
[Examples](https://kiro.dev/docs/cli/custom-agents/examples/)
|
|
896
|
+
On this page
|
|
897
|
+
* [Name field](https://kiro.dev/docs/cli/custom-agents/configuration-reference/#name-field)
|
|
898
|
+
* [Description field](https://kiro.dev/docs/cli/custom-agents/configuration-reference/#description-field)
|
|
899
|
+
* [Prompt field](https://kiro.dev/docs/cli/custom-agents/configuration-reference/#prompt-field)
|
|
900
|
+
* [Inline prompt](https://kiro.dev/docs/cli/custom-agents/configuration-reference/#inline-prompt)
|
|
901
|
+
* [File URI prompt](https://kiro.dev/docs/cli/custom-agents/configuration-reference/#file-uri-prompt)
|
|
902
|
+
* [File URI path resolution](https://kiro.dev/docs/cli/custom-agents/configuration-reference/#file-uri-path-resolution)
|
|
903
|
+
* [File URI examples](https://kiro.dev/docs/cli/custom-agents/configuration-reference/#file-uri-examples)
|
|
904
|
+
* [McpServers field](https://kiro.dev/docs/cli/custom-agents/configuration-reference/#mcpservers-field)
|
|
905
|
+
* [Tools field](https://kiro.dev/docs/cli/custom-agents/configuration-reference/#tools-field)
|
|
906
|
+
* [ToolAliases field](https://kiro.dev/docs/cli/custom-agents/configuration-reference/#toolaliases-field)
|
|
907
|
+
* [AllowedTools field](https://kiro.dev/docs/cli/custom-agents/configuration-reference/#allowedtools-field)
|
|
908
|
+
* [Exact matches](https://kiro.dev/docs/cli/custom-agents/configuration-reference/#exact-matches)
|
|
909
|
+
* [Wildcard patterns](https://kiro.dev/docs/cli/custom-agents/configuration-reference/#wildcard-patterns)
|
|
910
|
+
* [MCP tool patterns](https://kiro.dev/docs/cli/custom-agents/configuration-reference/#mcp-tool-patterns)
|
|
911
|
+
* [Examples](https://kiro.dev/docs/cli/custom-agents/configuration-reference/#examples)
|
|
912
|
+
* [Pattern matching rules](https://kiro.dev/docs/cli/custom-agents/configuration-reference/#pattern-matching-rules)
|
|
913
|
+
* [ToolsSettings field](https://kiro.dev/docs/cli/custom-agents/configuration-reference/#toolssettings-field)
|
|
914
|
+
* [Resources field](https://kiro.dev/docs/cli/custom-agents/configuration-reference/#resources-field)
|
|
915
|
+
* [Hooks field](https://kiro.dev/docs/cli/custom-agents/configuration-reference/#hooks-field)
|
|
916
|
+
* [includeMcpJson field](https://kiro.dev/docs/cli/custom-agents/configuration-reference/#includemcpjson-field)
|
|
917
|
+
* [Model field](https://kiro.dev/docs/cli/custom-agents/configuration-reference/#model-field)
|
|
918
|
+
* [Complete example](https://kiro.dev/docs/cli/custom-agents/configuration-reference/#complete-example)
|
|
919
|
+
* [Quick start](https://kiro.dev/docs/cli/custom-agents/configuration-reference/#quick-start)
|
|
920
|
+
* [File locations](https://kiro.dev/docs/cli/custom-agents/configuration-reference/#file-locations)
|
|
921
|
+
* [Local agents (project-specific)](https://kiro.dev/docs/cli/custom-agents/configuration-reference/#local-agents-project-specific)
|
|
922
|
+
* [Global agents (user-wide)](https://kiro.dev/docs/cli/custom-agents/configuration-reference/#global-agents-user-wide)
|
|
923
|
+
* [Agent precedence](https://kiro.dev/docs/cli/custom-agents/configuration-reference/#agent-precedence)
|
|
924
|
+
* [Configuration fields](https://kiro.dev/docs/cli/custom-agents/configuration-reference/#configuration-fields)
|
|
925
|
+
* [name](https://kiro.dev/docs/cli/custom-agents/configuration-reference/#name)
|
|
926
|
+
* [description](https://kiro.dev/docs/cli/custom-agents/configuration-reference/#description)
|
|
927
|
+
* [prompt](https://kiro.dev/docs/cli/custom-agents/configuration-reference/#prompt)
|
|
928
|
+
* [mcpServers](https://kiro.dev/docs/cli/custom-agents/configuration-reference/#mcpservers)
|
|
929
|
+
* [tools](https://kiro.dev/docs/cli/custom-agents/configuration-reference/#tools)
|
|
930
|
+
* [toolAliases](https://kiro.dev/docs/cli/custom-agents/configuration-reference/#toolaliases)
|
|
931
|
+
* [allowedTools](https://kiro.dev/docs/cli/custom-agents/configuration-reference/#allowedtools)
|
|
932
|
+
* [toolsSettings](https://kiro.dev/docs/cli/custom-agents/configuration-reference/#toolssettings)
|
|
933
|
+
* [resources](https://kiro.dev/docs/cli/custom-agents/configuration-reference/#resources)
|
|
934
|
+
* [hooks](https://kiro.dev/docs/cli/custom-agents/configuration-reference/#hooks)
|
|
935
|
+
* [model](https://kiro.dev/docs/cli/custom-agents/configuration-reference/#model)
|
|
936
|
+
* [Complete example](https://kiro.dev/docs/cli/custom-agents/configuration-reference/#complete-example-1)
|
|
937
|
+
* [Best practices](https://kiro.dev/docs/cli/custom-agents/configuration-reference/#best-practices)
|
|
938
|
+
* [Local vs global agents](https://kiro.dev/docs/cli/custom-agents/configuration-reference/#local-vs-global-agents)
|
|
939
|
+
* [Security](https://kiro.dev/docs/cli/custom-agents/configuration-reference/#security)
|
|
940
|
+
* [Organization](https://kiro.dev/docs/cli/custom-agents/configuration-reference/#organization)
|
|
941
|
+
* [Next steps](https://kiro.dev/docs/cli/custom-agents/configuration-reference/#next-steps)
|