Kiro Snippets
Figure 1. Kiro Snippets

Pi Agent and Kiro

Install PI Agent
npm install -g --ignore-scripts @earendil-works/pi-coding-agent
Install Kiro pi Provider
pi install npm:pi-provider-kiro
Log into kiro
pi
/login kiro
pi kiro login
Figure 2. Log into kiro with pi kiro provider
Select a model
/model
pi kiro model selection
Figure 3. Model selection in pi

and we’re ready to go …​.

Kiro and IntelliJ

Kiro, Intellij, idea-mcp and AI Chat
Figure 4. Kiro, IntelliJ, idea-mcp and AI Chat Plugin

Integrate into IntelliJ using ACP

Kiro in IntelliJ AI Chat using ACP

Kiro in IntelliJ AI Chat over ACP

We just need to add the following config as ~/.jetbrains/acp.json, restart IntelliJ and we’re ready to go.

~/.jetbrains/acp.json
{
  "default_mcp_settings": {},
  "agent_servers": {
    "Kiro Agent ACP": {
      "command": "/Users/<USER>/.local/bin/kiro-cli",
      "args": ["acp"]
    }
  }
}

Defining an agent to use the IntelliJ MCP Server

First of all, we need to activate the Intellij MCP Server:

intellij activate mcp
Figure 5. Activating the MCP server in IntelliJ

Then we’re defining a new agent named idea by creating the file ~/.kiro/agents/idea.json.

There we allow to use the non-risky tools of the IntelliJ MCP Server also as some basic git commands and finally we also add the configuration to access the Intellij MCP server.

One personal thing: I hate it when a tool opens a new terminal window in intellij, so I added a execute_terminal_command deny for it in the MCP configuration.

~/.kiro/agents/idea.json
{
  "name": "idea",
  "description": "Custom default agent for working with intellij mcp",
  "tools": [
    "*"
  ],
  "allowedTools": [
    "@idea/search_in_files_by_text",
    "@idea/search_in_files_by_regex",
    "@idea/search_text",
    "@idea/search_regex",
    "@idea/search_symbol",
    "@idea/search_file",
    "@idea/execute_run_configuration",
    "@idea/find_files_by_name_keyword",
    "@idea/find_files_by_glob",
    "@idea/get_file_text_by_path",
    "@idea/read_file",
    "@idea/get_file_problems",
    "@idea/get_symbol_info",
    "@idea/get_document_symbols",
    "@idea/get_all_open_file_paths",
    "@idea/list_directory_tree",
    "@idea/get_project_modules",
    "@idea/get_project_dependencies",
    "@idea/get_repositories",
    "@idea/get_run_configurations",
    "@idea/build_project",
    "@idea/generate_psi_tree",
    "@idea/generate_inspection_kts_api",
    "@idea/generate_inspection_kts_examples",
    "read",
    "grep",
    "glob",
    "code"
  ],
  "toolsSettings": {
    "shell": {
      "allowedCommands": [
        "git diff",
        "git status",
        "git log",
        "git branch",
        "git show",
        "git blame"
      ],
      "autoAllowReadonly": true
    }
  },
  "mcpServers": {
    "idea": {
      "type": "http",
      "url": "http://127.0.0.1:64342/stream",
      "disabledTools": [
        "execute_terminal_command"
      ]
    }
  }
}

Now we’re ready to use this agent in the IntelliJ AI Chat:

idea agent in intellij ai chat
Figure 6. Using the agent in IntelliJ AI Chat

Orchestrating work between subagents using an orchestrator agent

Remember Context or conversational state

There are different ways to store state exceeding the lifetime of a kiro session …​

Load and save Chats

save chat
/chat save [name]
Saving without a name saves the chat using an automated timestamp
load chat
/chat load

Using Knowledge Base

Activating knowledge base
kiro-cli settings chat.enableKnowledge true
Add content to knowledge base
/knowledge add --name "mein-projekt" --path /pfad/zum/projekt

TODO-Lists

Activate TODO Lists
kiro-cli settings chat.enableTodoList true

TODO-Listen are stored in .kiro/cli-todo-lists/

Resume todos
/todos resume

Agent-specific configuration

Configure an agent with persistent information:

{
  "resources": [
    {
      "type": "knowledgeBase",
      "source": "file://./docs",
      "name": "Dokumentation",
      "autoUpdate": true
    }
  ]
}

These are loaded automatically when the designated agent is used

Checkpoints

Activate Checkpoints
kiro-cli settings chat.enableCheckpoint true

Costs and Usage

Usage

Display kiro usage with /usage
/usage
kiro cli usage
Figure 7. Kiro Usage

Analyze Context

Analyze context using /context
/context
kiro cli context
Figure 8. Kiro Context Stats