Let AI agents use any API, on any machine, without ever holding a secret. KeyValet keeps your API keys and OAuth accounts in a Secure Enclave / TPM-protected vault that only a system service can read, and makes each call for the agent after you say yes — with the real request on screen.
A valet key starts the car but doesn’t open the trunk.
Open source (Apache-2.0), completely free, vault stored on your device. See the Privacy policy for API calls and optional remote services. Claude Code, Codex, Cursor, Gemini, Grok, Devin — any MCP client or HTTP SDK.
openai/mainGET api.openai.com/v1/modelsThe key stays with the valet. The agent gets the answer.
Four steps, and the secret never leaves a vault the agent can’t read.
Over MCP, naming the credential and saying why it needs it.
Touch ID shows the credential and what the grant allows. In per-use mode it shows the real request — method, host, path, plus the business fields that matter for known APIs — and one touch approves exactly that call.
A privileged service — the root daemon on macOS, a dedicated service user on Linux, a Windows service — injects the key, only toward hosts you allowed, and redacts anything that echoes it back.
Response in; session, purpose and result logged. The grant ends with the session.
Putting keys in .env or pasting them into chat hands over the master key.
| Master key: .env, pasted keys | Valet key: KeyValet | |
|---|---|---|
| What the agent sees | The plaintext key, in its context and logs | Only the response. Long-term secrets never leave the privileged service. |
| Who decides | Nobody, once the file is readable | You, with Touch ID — per use, per credential, or per session |
| Where it can go | Anywhere the agent sends it | Only the hosts you allowed, no redirects |
| What you can check later | Nothing | Every use, with session, purpose and result, in an audit log the agent can’t read |
| Where it lives | Plaintext files, or someone else’s cloud | A hardware-protected, encrypted vault on your machine — Secure Enclave on macOS, TPM 2.0 on Linux, Hello on Windows — readable only by the system service |
Agents receive short-lived tokens or proxied responses. Refresh tokens, private keys and seeds stay in the vault.
OPENAI_BASE_URL-style); streaming works and the program never holds the real key.keyvalet scan finds secrets in .env* and agent configs, imports them proxy-only and removes them from the file; hooks for Claude Code, Codex, Cursor, Grok and Devin catch a key before it’s pasted into chat or hard-coded.A credential tool should be precise about its limits. The full model is in SECURITY.md, or read the security summary.
credential_get are in the agent’s context.Run agents on machines nobody is sitting at — a Linux server, a headless Mac mini, an overnight job — and keep the “allow” in your hand: a phone app (iOS + Android), or the laptop you’re already using.
In development: the protocol and relay are on main with tests; the end-to-end path and app distribution are not finished. Product design · architecture (Chinese)
One command for macOS and Linux: it picks your platform's release package (signed and notarized on macOS; checksums on Linux), asks for your password once, and sets up Claude Code, Codex, Cursor, Grok and Devin CLI if they’re installed. Run it again to upgrade.
curl -fsSL https://keyvalet.dev/install.sh | sh
macOS: Apple Silicon, macOS 14+. Linux: systemd, polkit, sudo, TPM 2.0 (or --software without one). Windows 11: unsigned release packages. See downloads and the Code signing policy for release status. Details in the guide.
Then just ask your agent:
“Store my OpenAI key in KeyValet with the openai template.”
“Use KeyValet to list my OpenAI models.”
You type the key into a native dialog, and approve its use with Touch ID (polkit on Linux). The agent never sees it.