Custom agents provide a way to customize Kiro behavior by defining specific configurations for different use cases. Each custom agent is defined by a configuration file that specifies which tools the agent can access, what permissions it has, and what context it should include.
| Capability | IDE | CLI | Web | Mobile |
|---|---|---|---|---|
Project-level agents (.kiro/agents/) | ✓ | ✓ | — | — |
Global agents (~/.kiro/agents/) | ✓ | ✓ | — | — |
| Agent switching via UI | ✓ | ✓ | — | — |
| Modify agent settings | ✓ | ✓ | — | — |
By default, Kiro provides access to all available tools but requires user confirmation for most operations. This approach prioritizes security but can interrupt your workflow with frequent permission prompts.
Custom agents solve this by allowing you to:
Custom agents work with both built-in tools and external tools from MCP servers. Use the tools field to specify exactly which tools from each source are available, and toolAliases to handle naming conflicts.
Agent configurations support two formats - JSON and Markdown. Both support identical fields. Use Markdown when your system prompt is long or benefits from human readability; JSON works well for programmatically generated configs.
.kiro/agents/my-agent.json:
{ "name": "my-agent", "description": "A custom agent for my workflow", "tools": ["read", "write", "shell"], "excludedTools": ["knowledge"], "includeMcpJson": true, "includePowers": false, "resources": [ "file://./ARCHITECTURE.md", "skill://backend-patterns" ], "permissions": { "rules": [ { "capability": "shell", "match": ["npm *", "git *"], "effect": "allow" } ] }, "prompt": "You are a helpful coding assistant", "model": "claude-sonnet-5", "welcomeMessage": "Ready to help. What are you working on?" }
.kiro/agents/[name].json or .kiro/agents/[name].md — shared via version control, loaded only if the workspace is trusted~/.kiro/agents/[name].json or ~/.kiro/agents/[name].md — available across all projectsWhen both locations have agents with the same name, workspace agents take precedence.
Nested directories are supported. The agent name is the path relative to the agents directory without the extension: ~/.kiro/agents/team/planner.md becomes team/planner.
Custom agents are available in the IDE and CLI today. Web and Mobile sessions run with Kiro's built-in agents - there is no way to select a custom agent there yet.
If you're upgrading from IDE 0.x or CLI 2.x, agent configs are backward-compatible - existing JSON files continue to work without modification. New fields (permissions, excludedTools, includeMcpJson, resources with skill://, Markdown format) are all optional.
Custom agents