
Integrate Kiro CLI into Your AI Agent via ACP
The Problem: Coding Tasks Are Token Killers Every month I get a bill from Anthropic for my personal AI assistant. Most of it comes from coding tasks — not because I write a lot of code, but because Claude charges $15/1M output tokens, and writing a Flask API with tests burns ~3,500 output tokens. Every time. Openclaw (my agent platform) can execute code — it has shell tool calls, so it runs the code, reads the error, and tries to fix it automatically. No manual copy-paste needed. But here's the problem: every single step in that loop (generate → run → read output → fix → run again) is a separate Claude API call. A simple "write and validate" task that takes 5 iterations = 5 round-trips = 5× the token cost. The bill compounds fast. $54/month — and most of it is just Openclaw iterating on code fixes, each round burning $3–15 per million tokens. Then I found Kiro CLI's ACP protocol. Here's what I built — and what the numbers actually look like. TL;DR Calling Claude API directly for coding
Continue reading on Dev.to
Opens in a new tab


