Kiro Custom Agents
Overview
Guide for creating and configuring Kiro CLI custom agents — JSON configuration files that customize Kiro's behavior for specific workflows.
Quick Start
Create an agent interactively in a Kiro CLI session:
/agent generate
Or via CLI:
kiro-cli agent create --name my-agent
Or manually create a JSON file:
- Global:
~/.kiro/agents/<name>.json
- Local (project):
.kiro/agents/<name>.json
Minimal agent:
{
"name": "my-agent",
"description": "A custom agent for my workflow",
"tools": ["read", "write"],
"allowedTools": ["read"],
"resources": ["file://README.md"],
"prompt": "You are a helpful coding assistant"
}
Workflow
- Clarify the agent's purpose and target workflow
- Determine which tools are needed (
tools) and which to pre-approve (allowedTools)
- Identify MCP servers if external tools are needed
- Choose resources to load (files, skills, knowledge bases)
- Add hooks for dynamic context or validation
- Configure tool restrictions via
toolsSettings
- Write the JSON config file
- Test:
/agent list → /agent swap <name> → /tools → test workflows
Key Concepts
tools: What the agent CAN use. "*" = all, "@builtin" = built-in only, "@server" = all from MCP server.
allowedTools: What runs WITHOUT permission prompts. Supports glob patterns (@server/read_*, @builtin). Does NOT support "*".
toolAliases: Remap tool names to resolve naming collisions or create intuitive names.
resources: Context loaded at startup. file:// = immediate, skill:// = on-demand, knowledgeBase = indexed search.
hooks: Commands at lifecycle points. agentSpawn, userPromptSubmit, preToolUse (can block), postToolUse, stop.
steering: NOT auto-included in custom agents. Add explicitly: "resources": ["file://.kiro/steering/**/*.md"]
Updating This Skill
Reference files have Source: <URL> headers linking to official Kiro docs. To check for updates:
python3 scripts/fetch_docs.py --diff # Check which sources changed
python3 scripts/fetch_docs.py # Fetch and save raw HTML to references/raw/
After fetching, compare references/raw/*.html against existing references/*.md files and update the summaries as needed. Each reference file is a curated summary — not a raw copy — so review changes before updating.
References
- Full config schema: See references/configuration-reference.md for all fields, patterns, and best practices
- Working examples: See references/examples.md for AWS, dev workflow, code review, project-specific, and remote MCP agents
- Hooks: See references/hooks.md for hook types, matchers, exit codes, MCP examples, and use cases
- MCP setup: See references/mcp.md for MCP server configuration (CLI, mcp.json, agent config, remote)
- Steering: See references/steering.md for steering file scope, team steering, custom files, and integration with agents
- Code intelligence: See references/code-intelligence.md for LSP setup, pattern search/rewrite,
/code commands, and language server usage
- Context management: See references/context.md for agent resources, session context, knowledge bases, and compaction
- Subagents: See references/subagents.md for subagent tool availability,
availableAgents/trustedAgents config, and usage
- Prompts: See references/prompts.md for
/prompts commands, MCP prompt arguments, and storage priority
- Images: See references/images.md for image input methods, supported formats, and use cases
- Troubleshooting: See references/troubleshooting.md for common issues and testing checklist
Converted and distributed by TomeVault — claim your Tome and manage your conversions.
1---2name: kiro-custom-agents3description: Create and configure Kiro CLI custom agents (JSON config files). Use when user asks to "create a kiro agent", "make a custom agent", "configure agent tools", "set up MCP servers in an agent", "add hooks to an agent", "troubleshoot agent config", or any task involving kiro-cli agent JSON configuration, tool permissions, resources, hooks, steering, MCP integration, or code intelligence setup. Use when this capability is needed.4---56# Kiro Custom Agents78## Overview910Guide for creating and configuring Kiro CLI custom agents — JSON configuration files that customize Kiro's behavior for specific workflows.1112## Quick Start1314Create an agent interactively in a Kiro CLI session:1516```17/agent generate18```1920Or via CLI:2122```bash23kiro-cli agent create --name my-agent24```2526Or manually create a JSON file:27- Global: `~/.kiro/agents/<name>.json`28- Local (project): `.kiro/agents/<name>.json`2930Minimal agent:3132```json33{34 "name": "my-agent",35 "description": "A custom agent for my workflow",36 "tools": ["read", "write"],37 "allowedTools": ["read"],38 "resources": ["file://README.md"],39 "prompt": "You are a helpful coding assistant"40}41```4243## Workflow44451. Clarify the agent's purpose and target workflow462. Determine which tools are needed (`tools`) and which to pre-approve (`allowedTools`)473. Identify MCP servers if external tools are needed484. Choose resources to load (files, skills, knowledge bases)495. Add hooks for dynamic context or validation506. Configure tool restrictions via `toolsSettings`517. Write the JSON config file528. Test: `/agent list` → `/agent swap <name>` → `/tools` → test workflows5354## Key Concepts5556**tools**: What the agent CAN use. `"*"` = all, `"@builtin"` = built-in only, `"@server"` = all from MCP server.5758**allowedTools**: What runs WITHOUT permission prompts. Supports glob patterns (`@server/read_*`, `@builtin`). Does NOT support `"*"`.5960**toolAliases**: Remap tool names to resolve naming collisions or create intuitive names.6162**resources**: Context loaded at startup. `file://` = immediate, `skill://` = on-demand, `knowledgeBase` = indexed search.6364**hooks**: Commands at lifecycle points. `agentSpawn`, `userPromptSubmit`, `preToolUse` (can block), `postToolUse`, `stop`.6566**steering**: NOT auto-included in custom agents. Add explicitly: `"resources": ["file://.kiro/steering/**/*.md"]`6768## Updating This Skill6970Reference files have `Source: <URL>` headers linking to official Kiro docs. To check for updates:7172```bash73python3 scripts/fetch_docs.py --diff # Check which sources changed74python3 scripts/fetch_docs.py # Fetch and save raw HTML to references/raw/75```7677After fetching, compare `references/raw/*.html` against existing `references/*.md` files and update the summaries as needed. Each reference file is a curated summary — not a raw copy — so review changes before updating.7879## References8081- **Full config schema**: See [references/configuration-reference.md](references/configuration-reference.md) for all fields, patterns, and best practices82- **Working examples**: See [references/examples.md](references/examples.md) for AWS, dev workflow, code review, project-specific, and remote MCP agents83- **Hooks**: See [references/hooks.md](references/hooks.md) for hook types, matchers, exit codes, MCP examples, and use cases84- **MCP setup**: See [references/mcp.md](references/mcp.md) for MCP server configuration (CLI, mcp.json, agent config, remote)85- **Steering**: See [references/steering.md](references/steering.md) for steering file scope, team steering, custom files, and integration with agents86- **Code intelligence**: See [references/code-intelligence.md](references/code-intelligence.md) for LSP setup, pattern search/rewrite, `/code` commands, and language server usage87- **Context management**: See [references/context.md](references/context.md) for agent resources, session context, knowledge bases, and compaction88- **Subagents**: See [references/subagents.md](references/subagents.md) for subagent tool availability, `availableAgents`/`trustedAgents` config, and usage89- **Prompts**: See [references/prompts.md](references/prompts.md) for `/prompts` commands, MCP prompt arguments, and storage priority90- **Images**: See [references/images.md](references/images.md) for image input methods, supported formats, and use cases91- **Troubleshooting**: See [references/troubleshooting.md](references/troubleshooting.md) for common issues and testing checklist9293---94> Converted and distributed by [TomeVault](https://tomevault.io/claim/tkykenmt) — claim your Tome and manage your conversions.95<!-- tomevault:4.0:skill_md:2026-04-13 -->