UNCLASSIFIED
Loading image...Kiro
  • CLI
  • Powers
  • Docs
DOWNLOADS
Loading image...Kiro
Loading image...Kiro
Product
  • About Kiro
  • CLI
  • Powers
  • Downloads
Resources
  • Documentation
  • Blog
  • Changelog
  • FAQs
UNCLASSIFIED
  1. Docs
  2. CLI
  3. Custom Agents
  4. Creating

Creating custom agents

On this page
  • Quick start
  • Options
  • Directory values
  • Manual creation mode
  • Agent configuration file
  • Using your custom agent
  • Next steps

Custom agents allow you to tailor Kiro CLI behavior for specific tasks by defining which tools are available, what permissions are granted, and what context is automatically included.

Quick start

You can create an agent using the /agent create slash command from within a Kiro CLI chat session. By default, it uses AI-assisted mode to generate a full agent configuration based on your description:

text
> /agent create ✔ Enter agent name: · backend-specialist ✔ Enter agent description: · You are a specialist in backend coding practices ✔ Agent scope · Local (current workspace) Select MCP servers (use Space to toggle, Enter to confirm): markdown-downloader (node), code-analysis (uv) ✓ Agent 'backend-specialist' has been created and saved successfully!

You can also provide a name and options inline:

text
> /agent create backend-specialist -D "Backend coding specialist" -m code-analysis
Info

/agent generate is an alias for /agent create. Both commands behave identically.

Alternatively, use the CLI command directly from your terminal:

bash
kiro-cli agent create backend-specialist

Options

The /agent create slash command and the kiro-cli agent create CLI command share some flags, while others are exclusive to the slash command:

FlagDescriptionAvailability
--directoryWhere to save the agent (see directory values)Both
--fromTemplate agent to base the new agent on (implies --manual)Both
--descriptionDescription of the agentSlash command
--mcp-serverMCP server to include (repeatable)Slash command
--manualUse editor-based creation instead of AI generationSlash command
Warning

The --description and --mcp-server flags are only available in AI-assisted mode. They cannot be combined with --manual or --from.

Directory values

The --directory flag accepts two special values in addition to custom paths:

ValueDescription
workspaceCreates the agent in .kiro/agents/ in your current working directory
globalCreates the agent in ~/.kiro/agents/ (the default)
./path or /pathCreates the agent in the specified custom path

When no --directory is specified, agents are saved to the global directory (~/.kiro/agents/).

Manual creation mode

If you prefer to define the agent configuration yourself in an editor rather than using AI generation, pass the --manual flag:

text
> /agent create my-agent --manual

This opens your default editor with a basic agent configuration file. You can also base a new agent on an existing one using --from:

text
> /agent create my-agent --from backend-specialist

Agent configuration file

Custom agents are defined using JSON configuration files. Here's a basic example:

json
{ "name": "my-agent", "description": "A custom agent for my workflow", "tools": ["read","write"], "allowedTools": ["read"], "resources": [ "file://README.md", "file://.kiro/steering/**/*.md", "skill://.kiro/skills/**/SKILL.md" ], "prompt": "You are a helpful coding assistant", "model": "claude-sonnet-4" }

Using your custom agent

Start a new chat session - which uses the default agent ("kiro_default") and swap to an agent using the agent slash command

bash
> /agent swap Choose one of the following agents ❯ rust-developer-agent kiro_default backend-specialist

After selecting an agent, you will see the following:

bash
✔ Choose one of the following agents · backend-specialist [backend-specialist] >

Alternatively, start a chat session with your custom agent:

bash
kiro-cli --agent my-agent

Next steps

  • Explore Agent Configuration options in detail
Page updated: February 27, 2026
Custom agents
Configuration reference