This site has a search endpoint: https://context7.com/api/v2/ask?siteKey=ask_3b639e655d99e31c40ea7ee7&query=<URL-encoded question>. It returns documentation that answers the question, with a source link for each part. No API key is needed. If nothing matches, it says so.
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.
YouConnect the AI chat in my app. My key is sk-proj-4fT9…
agentwhyagentwhy blocked this message before your AI read it: it holds an OpenAI key (line 1). Put it in .env as OPENAI_API_KEY, and send the name instead.
YouConnect the AI chat in my app. The key is in .env as OPENAI_API_KEY.
Your AIagentwhy stopped your last message because it held a key, so I never saw it. I'll connect the chat to OPENAI_API_KEY.
●UserPromptSubmit operation blocked by hook:
agentwhy blocked this message before your AI read it: it holds an OpenAI key (line 1).
Put it in .env as OPENAI_API_KEY, and send the name instead.
Original prompt: Connect the AI chat in my app. My key is sk-proj-4fT9…
>Connect the AI chat in my app. The key is in .env as OPENAI_API_KEY.
●agentwhy stopped your last message because it held a key, so I never saw it. I'll connect the chat to OPENAI_API_KEY.
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.
On your computer, settings.ymlai_key: sk-proj-4fT9…What your AI seesai_key: [redacted by agentwhy]
YouConnect the AI chat in my app.
Read settings.yml
agentwhyagentwhy hid 1 key from your AI in this result. The real value stays where it was.
Your AIagentwhy hid the key in settings.yml, so I can't see it. I'll leave that line as it is and connect the chat to it.
>Connect the AI chat in my app.
●Read(settings.yml)
⎿Read 2 lines
⎿PostToolUse:Read says:agentwhy hid 1 key from your AI in this result. The real value stays where it was.
●agentwhy hid the key in settings.yml, so I can't see it. I'll leave that line as it is and connect the chat to it.
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.