agentwhy

Your API keys

Keep an API key out of your AI's chat.

Paste a key into a message, and agentwhy stops the message before your AI gets it. When your AI opens a file with a key in it, agentwhy can swap the key for a stand-in first. It knows keys by their format, so one it doesn't recognise still goes through.

Your API keys

Keep your API keys
away from your AI.

A key gets to your AI in two ways: you paste it into a message, or your AI opens a file with a key in it. agentwhy stops the first and hides the second.

You paste a key into a message

agentwhy stops the message before your AI gets it, and tells you what to do instead: put the key in the file with your API keys, and send its name.

Then your AI works with the name. It never sees the key.

On the screen, .env is the file with your API keys.

Your AI opens a file with a key in it

agentwhy swaps the key for a stand-in before your AI sees it. Your file stays as it is, and your AI is told a key was there.

Examples in Claude Code. In the Claude app or VS Code it looks like Chat, in a terminal like Terminal. agentwhy's words are the same in all three.

Works in Claude Code and Codex. Hiding keys is on for a project you set up on agentwhy's welcome page, and one switch in Settings turns it off. It knows the keys of common services, not every key: what it misses.

Straight answers

What people ask about API keys.

What if I paste an API key into a message?

agentwhy stops the message before your AI gets it. It tells you which key it found and on which line, and what to do instead: put the key in the file with your API keys, and write its name in your message.

This works in Claude Code and Codex, when agentwhy's warnings in your chat are on. It recognises the keys of common services by their shape. A key it doesn't recognise still goes through.

Some apps name a new chat from your first message, so that message may already have been sent. When that can happen, agentwhy says so, and you change the key.

Can it hide a key inside a file?

Yes, when hiding keys is on, as it is for a project you set up on agentwhy's welcome page. When your AI opens a file, agentwhy swaps each key it recognises for a stand-in before your AI sees it. The file on your computer doesn't change. Your AI is told a key was hidden, so it works around it.

It lowers the risk; it doesn't remove it. A key it doesn't recognise, part of a key, a key written in an unusual way, or a file you attach to a message still gets to your AI. So does a key in a step that fails, in Claude Code. Each step of your AI also takes about half a second longer.

Keep your agent out of private files.

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.

Start agentwhy

Pick the app you already use. One line, and you're done.

  1. Open your own project in Claude Code or Codex — in the Claude desktop app, use its Code tab, not Chat.

    Your project is the folder you build in. agentwhy only ever looks at the one you open it in.

  2. Paste this line in:

    Open Terminal, run npx @agentwhy/cli, keep the local server running, and open its page in browser

  3. A page opens on your computer. That's where you set everything up.

An example of what you'll see
  1. Open a terminal in your own project. That's Terminal on a Mac and PowerShell on Windows.

    Your project is the folder you build in. agentwhy only ever looks at the one you start it in.

  2. Type this:

    npx @agentwhy/cli

    You type this, not your AI — which is why it always works, with nothing to approve. Needs Node 22 or later.

  3. A page opens on your computer. That's where you set everything up.

An example of what you'll see

Add agentwhy to Claude Code once

  1. karolkozer/agentwhy

  2. /agentwhy:report

Step 1 of 5
  1. Open Claude Code in a terminal, in your own project. It needs version 2.1.275 or later.

  2. Type this, then choose Install for you:

    /plugin install agentwhy --marketplace karolkozer/agentwhy

  3. Then type this in a conversation:

    /agentwhy:report

An example of what you'll type