Kiro Snippets
Figure 1. Kiro Snippets

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"]
    }
  }
}

Fix for auth issues with legacy versions

Some older versions might need the to use the following workaround that fixes this kiro issue.

Thanks a lot Daniele De Francesco for the workaround!

~/kiroAuthWrapper.py
#!/usr/bin/env python3
import subprocess, sys, threading, json

proc = subprocess.Popen(
    ["kiro-cli", "acp"],
    stdin=subprocess.PIPE,
    stdout=subprocess.PIPE,
    bufsize=0,
)

def forward_stdin():
    try:
        for line in sys.stdin.buffer:
            proc.stdin.write(line)
            proc.stdin.flush()
    except:
        pass
    finally:
        proc.stdin.close()

threading.Thread(target=forward_stdin, daemon=True).start()

for line in proc.stdout:
    try:
        msg = json.loads(line)
        if msg.get("id") == 1 and "authMethods" in (msg.get("result") or {}):
            msg["result"]["authMethods"] = []
            line = (json.dumps(msg, separators=(",", ":")) + "\n").encode()
    except:
        pass
    sys.stdout.buffer.write(line)
    sys.stdout.buffer.flush()
~/.jetbrains/acp.json
{
  "default_mcp_settings": {},
  "agent_servers": {
    "Kiro Agent Wrap": {
      "command": "/usr/bin/python3",
      "args": [
        "~/kiroAuthWrapper.py"
      ]
    }
  }
}

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

Experimental
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

Experimental
Activate TODO Lists
kiro-cli settings chat.enableTodoList true

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

Resume todos
/todos resume

Agent-specific configfuration

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

Experimental
Activate Checkpoints
kiro-cli settings chat.enableCheckpoint true