Skip to content

Commit 1dee8a5

Browse files
grokifyclaude
andcommitted
docs(deployments): improve Kiro CLI installation guidance
Add comprehensive installation documentation: - New Installation section with two approaches (copy vs direct install) - Project vs User-Level Agents comparison table - Explanation of why Kiro requires user-level installation - Project-level context via steering files workaround - Updated Step 7 with mkdir and tip callout Clarifies that Kiro CLI only reads agents from ~/.kiro/agents/, unlike Claude Code which supports project-level .claude/agents/ directories. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
1 parent 6b35246 commit 1dee8a5

File tree

1 file changed

+111
-2
lines changed

1 file changed

+111
-2
lines changed

docs/deployments/kiro-cli.md

Lines changed: 111 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,109 @@ Kiro CLI uses a flat agent directory structure where all agents live in `~/.kiro
88

99
AssistantKit addresses this with **single-source prefix configuration**: define the prefix once in your deployment config, and it's applied to all generated agent names, filenames, and documentation.
1010

11+
## Project vs User-Level Agents
12+
13+
Kiro CLI and Claude Code handle agent storage differently:
14+
15+
| Aspect | Claude Code | Kiro CLI |
16+
|--------|-------------|----------|
17+
| **Project agents** | `.claude/agents/*.md`| Not supported ❌ |
18+
| **User agents** | `~/.claude/agents/*.md` | `~/.kiro/agents/*.json` |
19+
| **Project context** | `CLAUDE.md` | `.kiro/steering/*.md` |
20+
| **Auto-discovery** | Yes (scans project) | No (user dir only) |
21+
| **Namespacing** | Directory-based | Prefix-based |
22+
23+
### Why Kiro Works This Way
24+
25+
Kiro CLI reads agents **only** from the user-level `~/.kiro/agents/` directory. It does not scan project directories for agent definitions. This design means:
26+
27+
1. **All agents share one namespace** — Without prefixes, an agent named `coordinator` in Project A would conflict with `coordinator` in Project B
28+
2. **Installation is always required** — You can't just define agents in your project and use them; they must be copied to `~/.kiro/`
29+
3. **Prefixes prevent conflicts** — Using `rel_coordinator` vs `rev_coordinator` lets multiple teams coexist
30+
31+
### Project-Level Context (Steering Files)
32+
33+
While agent *definitions* must live in `~/.kiro/agents/`, you can still use **project-level context** via steering files:
34+
35+
```
36+
my-project/
37+
└── .kiro/
38+
└── steering/
39+
├── project-guidelines.md
40+
└── coding-standards.md
41+
```
42+
43+
Reference them in your agent's `resources` field:
44+
45+
```json
46+
{
47+
"name": "rel_coordinator",
48+
"resources": [
49+
"file://.kiro/steering/**/*.md",
50+
"file://README.md"
51+
]
52+
}
53+
```
54+
55+
This gives agents project-specific context while the agent definitions remain in the global directory.
56+
57+
!!! note "Claude Code Alternative"
58+
If you prefer project-scoped agents without installation, consider using Claude Code instead. Claude Code automatically discovers agents in `.claude/agents/` within your project, with no copy step required.
59+
60+
## Installation
61+
62+
Kiro CLI reads agents from `~/.kiro/agents/` and steering files from `~/.kiro/steering/`. Generated files must be installed to these directories before Kiro can use them.
63+
64+
### Option A: Generate then Copy (Recommended for Distribution)
65+
66+
Generate to a project directory, then copy to Kiro's config:
67+
68+
```bash
69+
# Generate to plugins/kiro/
70+
assistantkit generate --specs=specs --target=local
71+
72+
# Install to Kiro
73+
cp plugins/kiro/agents/*.json ~/.kiro/agents/
74+
cp plugins/kiro/steering/*.md ~/.kiro/steering/
75+
```
76+
77+
This approach is best when:
78+
79+
- You want to review generated files before installing
80+
- You're distributing agents to others (commit `plugins/kiro/` to git)
81+
- You have multiple projects and want to manage installations manually
82+
83+
### Option B: Direct Install (Recommended for Personal Use)
84+
85+
Set `output` to `~/.kiro` in your deployment config to install directly:
86+
87+
```json
88+
{
89+
"team": "release-team",
90+
"targets": [
91+
{
92+
"name": "local-kiro",
93+
"platform": "kiro-cli",
94+
"output": "~/.kiro",
95+
"kiroCli": {
96+
"prefix": "rel_"
97+
}
98+
}
99+
]
100+
}
101+
```
102+
103+
Then generate:
104+
105+
```bash
106+
assistantkit generate --specs=specs --target=local
107+
```
108+
109+
Files are written directly to `~/.kiro/agents/` and `~/.kiro/steering/`. No copy step needed.
110+
111+
!!! tip "Output Path Must Be Plugin Root"
112+
Set `output` to `~/.kiro` (the plugin root), NOT `~/.kiro/agents`. The generator creates the `agents/` and `steering/` subdirectories automatically.
113+
11114
## Generated Output
12115

13116
For a Kiro CLI target, AssistantKit generates:
@@ -228,16 +331,22 @@ assistantkit generate --specs=specs --target=local
228331

229332
### 7. Install Agents
230333

231-
Copy generated agents to Kiro's agent directory:
334+
Install generated files to Kiro's config directory:
232335

233336
```bash
337+
# Create directories if needed
338+
mkdir -p ~/.kiro/agents ~/.kiro/steering
339+
234340
# Copy agents
235341
cp plugins/kiro/agents/*.json ~/.kiro/agents/
236342

237-
# Copy steering files
343+
# Copy steering files (if any)
238344
cp plugins/kiro/steering/*.md ~/.kiro/steering/
239345
```
240346

347+
!!! tip "Direct Installation"
348+
To skip the copy step, set `"output": "~/.kiro"` in your deployment config. See [Installation](#installation) for details.
349+
241350
### 8. Use Agents
242351

243352
```bash

0 commit comments

Comments
 (0)