From the Beach to the Cloud: How I Built an Autonomous AWS Agent on WhatsApp
Have you ever been out for coffee, or perhaps at your kid’s soccer game, and realized you needed to check a CDK diff or update a Lambda environment variable? Usually, that means “Wait until I get home to my Mac.”
Not anymore.
I’ve recently finished a project that feels like living in the future. By bridging OpenClaw (an agentic framework) with Kiro-cli (a specialized AI coding tool), I’ve turned my WhatsApp into a remote command center for my AWS infrastructure.
The Secret Sauce: Agents as Peers
Most people use AI tools like a hammer—you pick it up, hit a nail, and put it down. In this setup, I’ve moved beyond that. I treat Kiro-cli as a “Peer Agent.”
Instead of my main agent (the one I talk to on WhatsApp) trying to write every line of code itself, it recognizes when a task involves AWS or complex coding. It then hands the “baton” to Kiro. Kiro operates in its own sandbox, executes the code, runs the tests, and only reports back once the job is actually done.
The Setup in a Nutshell
- The Brain (OpenClaw): Runs on my local machine and handles the communication via WhatsApp.
- The Worker (Kiro-cli): A high-performance CLI that specializes in “vibe coding” and AWS deployments.
- The Bridge: A custom Python script that lets these two talk to each other using a protocol called ACP (Agent Communication Protocol).
Why This is Awesome
- Cost Savings: By offloading the iterative “fix-run-fix” coding loop to Kiro, I’ve slashed my Claude API token usage by nearly 80%.
- Real Automation: I don’t just get code snippets; I get results. If I ask to fix a bug in a Lambda function, the agent actually edits the file, runs a
cdk synthto verify, and lets me know it’s ready for deployment. - Mobile Freedom: Since the interface is WhatsApp, I can manage my projects from literally anywhere with a signal.
💡 Tips & Tricks for the Agentic Life
1. The “80% Rule” for Context
AI agents are like humans; they get overwhelmed if you give them too much to remember. I’ve configured my bridge to proactively refresh the session whenever the “Context Usage” hits 80%. This keeps the agent sharp and prevents it from hallucinating old code versions.
2. The Permission Firewall
Giving an AI access to your terminal is powerful, but it needs guardrails. My bridge uses a “Request Permission” system. Even if the agent wants to run a cdk deploy, it has to send me a button on WhatsApp first. I click “Allow,” and then it proceeds. Safety first!
3. The “Classic” Hack
Pro tip for anyone setting this up: CLIs love to use colors and animations to look pretty for humans. But for a JSON bridge, those colors are just “noise” that causes crashes. I forced my Kiro instance into “Dumb Terminal” mode to ensure perfectly clean data transfer.
What’s Next?
The world of “Agentic Workflows” is moving fast. We are shifting from AI as a chatbot to AI as a teammate. Being able to manage complex AWS deployments from a phone is just the beginning.
If you’re a developer looking to reclaim your weekends while keeping your stacks healthy, I highly recommend looking into local agent bridges. The “Command Line” isn’t a place anymore—it’s a conversation.
Follow me for more updates on my local AI journey and AWS experiments!