AI agents ask for passwords. I made sure they never see them
How to give an AI agent access to secrets without leaking them. Based on a real product: TenVault 1.0 / AgentVault (Windows, Rust + Tauri).
The problem that arrived quietly
A year ago an "AI agent" was a toy: it wrote code and sometimes hallucinated. Today agents (Claude Desktop, Cursor, VS Code extensions, custom bots) work on real projects β which means they need keys and passwords : OpenAI, Stripe, databases, staging environments.
The usual workarounds are bad:
.env in the project. The agent reads it. Best case it does not decide to "improve" the config or paste it into a 100k-token context.
Copy the key into a prompt. It lands in logs, chat history and the provider's cache. Game over.
A cloud secrets manager. Overkill for a personal project, and in some countries a data-residency and payment question.
Do nothing.β¦