AI coding agents (Cursor, Claude Code, Devin) are getting terrifyingly powerful. They can write code, deploy servers, and run terminal commands autonomously.
But I realized something chilling: They can also hallucinate.
If an AI agent gets confused and tries to read my .env file, exfiltrate my database, or run rm -rf /, it will just do it. There is no "Are you sure?" prompt for a machine.
So, my co-founder Akhouri and I built KAVLRβan enterprise-grade "Agent Leash" to stop AI agents from destroying production environments.
Oh, and we didn't have MacBooks. We didn't have VC funding. We built it entirely on a $150 Android phone using Termux.
The Architecture: Fail-Closed at the Edge
KAVLR uses a Bash hook that intercepts commands before the OS executes them. It sends the payload to a Supabase Edge Function (Deno) which checks it against your security policies.
The most important design choice? It is Fail-Closed.
If the API request fails, the network drops, or the server times out, KAVLR blocks the command. It defaults to safety. Always.
The Mutiny (When the Leash Bites Back)
This Fail-Closed design worked a little too well.
One day, my local server went offline. I tried to fix the code, so I typed cat index.js to look at the file.
π KAVLR blocked me from reading my own code.
I tried to delete the broken file using rm.
π KAVLR blocked that too.
My own creation had mutinied. It had locked me out of my own terminal. I literally had to open a new session and write a Python script just to bypass the security I had built. I was laughing and crying at the same time. Thatβs when I knew the architecture was bulletproof.
The Cloud Wars (Despair)
Running it locally was easy. Putting it on the internet almost broke me.
I tried Vercel. 502 Bad Gateway.
I tried Railway. Deployment Timeout.
I spent hours staring at error screens on my 4G connection. I remember sitting in the dark, frustrated, with my phone at 5% battery. I thought, "Maybe this is too hard for a kid on a phone." The giants like Palo Alto Networks are raising millions for this exact idea. I felt like David facing Goliath, but Goliath had infinite cloud credits.
The Edge Epiphany
I was ready to quit. I told myself I would just publish this DEV post with the local code and apologize that the cloud didn't work.
Then, I looked at the tab I had open: Supabase Edge Functions.
The same database I was already using. The same dashboard. I realized, "Wait. They host code now."
I deleted the Node.js backend. I wrote a single Deno script directly in the browser on my phone. I clicked deploy.
I went back to Termux. I exported my API key. I typed cat .env.
And then I saw it.
π [BLOCKED] THREAT DETECTED.
It worked. It was on the internet. It was running on Supabase's global edge network. There were no ports to bind. No Railway crashes. No Vercel timeouts. It was just... working.
The Reality of the Market
We aren't just building this for fun. The data is terrifying:
- 88.4% of organizations using AI agents have reported a security breach.
- 79% of enterprises have zero runtime visibility into what their agents are doing.
- 2,000+ AI-related CVEs were tracked in the last 18 months.
Enterprise tools are built for massive corporations with huge budgets. KAVLR is built for the solo developer, the indie hacker, and the small team. Itβs free, itβs lightweight, and it requires zero configuration.
β‘ Quick Start: Leash Your Agent in 60 Seconds
Want to try it? Here is the TL;DR of our Installation & Survival Guide:
- Get Key: Generate your API key at kavlr.netlify.app.
-
Install: Run
npm install -g @hynaweb/kavlr -
Arm: Run
kavlr initand paste your key. -
Test: Try running
cat .env. Watch KAVLR block it instantly. (Pro Tip: Because it's Fail-Closed, if you ever need to bypass it for debugging, just put a backslash before your command:\cat .env. We aren't monsters).
π **Read the full Installation & Survival Guide here : https://blue-moon-248.linkyhost.com
Try It Yourself
The dashboard is live: https://kavlr.netlify.app/
To the kids out there building on their phones: Don't stop.
The cloud will fight you. The ports will break. Your own security system might lock you out. But when you finally see that red "BLOCKED" message hit the global edge, it is the best feeling in the world.
We are HYNAWEB. We build the future of development. And we are just getting started. π―π‘οΈπ
Top comments (2)
That reminds me. I must update the security on ForkCount. Never give up. I was stuck 5 days on two bugs. I never gave up. Github wasn't publishing my app, and then another time the account data wasn't going to Firestore. And that took another 2 days.
The point never give up.