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.
The IDE and CLI can select a custom agent as the primary session agent. Kiro Web loads project-level custom agents committed to .kiro/agents/ and can invoke them for sub-agent delegation, but you cannot select one as the primary Web session agent. Mobile uses Kiro's built-in agents only.
To use personal custom agents in cloud sessions, upload them from Settings > Sync in Kiro Web, then manage them under Settings > Agents.
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