Stop
We stop your AI when it tries to open it.
Best for API keys and bank details.
Stop it
Your AI agent asks before it installs something, but not before it opens a file. agentwhy can add rules that stop the obvious tries at the files you keep private, and tells you if one gets past.
You choose
Stop your AI, or let it open the file and tell you. One click per file.
Try it: click Stop or Tell me.
We stop your AI when it tries to open it.
Best for API keys and bank details.
Your AI can open it. You'll know when it does.
Best for files your AI needs for its work.
In your chat
Two examples in Claude Code: a file agentwhy stops, and a file it lets your AI open and tells you about.
Your AI asks for the file and a rule turns it down. At the end of its reply, agentwhy tells you it kept your AI out.
Use it for the file with your API keys.
On the screen, .env is the file with your API keys.
Your AI can open the file whenever the work needs it. At the end of its reply, agentwhy tells you it did.
Use it for a file your AI needs, like the customer list it writes emails from.
Examples in Claude Code. agentwhy's words and Claude Code's are word for word; what your AI says is an example.
Private files
By default, agentwhy treats as private the file with your API keys, your server login keys and a folder called secrets. You can add your own files and folders.
A rule stops the usual ways in: asking for the file by name, or a search that would print it. A small program your AI writes and runs can still get past, so agentwhy also checks afterwards and tells you.
For developers: by default .env*, *.env, .npmrc, secrets/,
.ssh/, id_rsa*. Add your own with
npx @agentwhy/cli init --protect "config/*.pem"; a place outside the project with
npx @agentwhy/cli protect "~/.ssh/**" (tested on a Mac, in Claude Code's terminal).
Straight answers
You can, and it is worth doing. But people keep reporting the same thing in public: they wrote a rule in their agent's instructions to stay away from the file with their keys, and it opened it anyway.
Telling your agent is a rule. agentwhy stops what it can, and shows you the rest.
It tells you the same day, not months later when someone else is already using your key. But there are three things it can't do.
Most days nothing needs fixing. Now you'll know.
Free, no account Runs only on your computer
Does your company work with AI agents? Work with the person who makes agentwhy.