Keys saved the moment you create them
The Chrome extension spots key shapes for OpenAI, Anthropic, OpenRouter, NVIDIA NIM, Groq, Helius and more, and saves them with one click. Then it fills them into Cursor, Kilo or NVIDIA settings.
src/extension →KeyShield is a vault for your provider keys. Browser-agnostic extension builds (Chrome + Firefox/Muse docs) spot a key the moment you create it and save it in one click, then fill it into your tools. There is also a personal macOS DMG app path for the same dashboard. Agents you run get a session token instead, and you can revoke it whenever you want.
Press play to watch KeyShield collect keys and connect your tools.
.envWorks with anything that takes a base URL and a bearer token: OpenAI SDK, LangChain, CrewAI, AutoGen, Vercel AI SDK, Claude via MCP, or plain curl.
Raw keys in .env files get copied across machines, tools and teammates. Taking access away means rotating the key at the provider and breaking everything else that uses it.
401. Nothing else breaks.One vault with two ways in: a dashboard and browser extension for you, and an SDK, CLI and REST API for your agents.
The extension saves it from the provider's page, or you paste it in the dashboard. The Device Vault encrypts on your device.
Copy a session token, or register the agent's ed25519 key so it can sign in by itself.
The token and its revocation status are checked, then the proxy looks up your key for this request.
The call is forwarded with your key and the key is dropped. Revoke the token any time.
Every feature links to the code or doc it comes from, so you can check it yourself.
The Chrome extension spots key shapes for OpenAI, Anthropic, OpenRouter, NVIDIA NIM, Groq, Helius and more, and saves them with one click. Then it fills them into Cursor, Kilo or NVIDIA settings.
src/extension →Agents get a bearer token with an expiry that can only call the proxy. Vault, decrypt and management routes answer 403 to it. The raw sk- key never enters the agent's process.
The hosted proxy checks tokens on every call, with no cache window. In ZK mode, local unlocks stop within 60 s. Revoke from the dashboard, the API or Claude, and the next call fails.
SPEC.md §7 →Register an agent's ed25519 public key. It signs a server challenge to get its own token, and the server never stores its private key.
How agents register →Proxy paths for OpenAI, Anthropic, OpenRouter, Groq, Mistral, Cohere and Helius. Change the base URL and the code stays the same.
docs/API.md →Passkey PRF output goes through HKDF-SHA256 to an AES-256-GCM key that can't be exported. The sync server stores only ciphertext. Opt-in ZK mode does the same for extension-saved keys. MCP server, Python SDK and CLI are in the repo too.
SPEC.md §3 →Also in the repo: a read-only RPC cache, scoped sharing, and pay-per-call on Solana devnet →
Agents never see your keys. This is exactly where each copy lives, including the one on the server. Only the Device Vault and ZK mode are zero-knowledge.
{ ciphertext, nonce, tag }. Without your device credential it can't decrypt them./manage/store), so the hosted /vproxy can add them to calls. Whoever runs that server can read them. Turn on ZK mode, self-host, or call /proxy and send the key from your device in X-Upstream-API-Key.keyshield-proxy, never by the hosted proxy. Revoke a token and the server stops releasing shares, within a cache of at most 60 s.sk-, sk-ant- or gsk_ material, and no access to vault or decrypt routes. Each token can be revoked on its own.npm run test:bankruncargo test --test fuzz_invariantsnpm run test:faultnpm run live:e2e:dry/manage/store are stored server-side, not end-to-end encrypted. Turn on ZK mode or self-host if you don't want them on a hosted server. Keys saved before ZK mode was on should be re-saved and then rotated at the provider.secrecy/zeroize hardening is planned, not yet a dependency.:free models cost nothing.KS_TOKEN. With ZK mode, run keyshield-proxy and point KS_BASE at it instead.KS_TOKEN.export KS_TOKEN="<paste from Developer>" export KS_BASE="https://keyshield-production.up.railway.app" curl -sS -X POST "$KS_BASE/vproxy/openrouter/api/v1/chat/completions" \ -H "Authorization: Bearer $KS_TOKEN" \ -H "Content-Type: application/json" \ -d '{"model":"nvidia/nemotron-3-ultra-550b-a55b:free", "messages":[{"role":"user","content":"ping"}]}'
import os from openai import OpenAI # api_key is your KeyShield session, not the OpenRouter key. client = OpenAI( base_url=os.environ["KS_BASE"] + "/vproxy/openrouter/api/v1", api_key=os.environ["KS_TOKEN"], ) reply = client.chat.completions.create( model="nvidia/nemotron-3-ultra-550b-a55b:free", messages=[{"role": "user", "content": "ping"}], ) print(reply.choices[0].message.content)
import OpenAI from "openai"; // apiKey is your KeyShield session, not the OpenRouter key. const client = new OpenAI({ baseURL: process.env.KS_BASE + "/vproxy/openrouter/api/v1", apiKey: process.env.KS_TOKEN, }); const reply = await client.chat.completions.create({ model: "nvidia/nemotron-3-ultra-550b-a55b:free", messages: [{ role: "user", content: "ping" }], }); console.log(reply.choices[0].message.content);
# Needs Node 20+, Python 3.10+ and Rust git clone https://github.com/lilaclilac09/keyshield.git cd keyshield npm install python3 -m venv .venv && source .venv/bin/activate pip install -r src/backend/requirements.txt node dev.cjs # Vault UI http://localhost:5173 # Rust proxy http://localhost:8000 # Control API http://localhost:8001
401 {"error":"invalid token"}. Full reference: docs/API.mdThat depends on which vault holds them. Keys in the Device Vault are encrypted on your device, and the sync server stores only ciphertext. By default, keys saved through the extension or the Vault page go to the control API so the hosted proxy can add them to calls, so whoever runs that server can read them. On the hosted instance, that's KeyShield. That path is not zero-knowledge.
If you don't want that, turn on ZK mode on the dashboard's Vault page: the extension encrypts keys before saving, and the extension or keyshield-proxy on your machine injects them. You can also self-host the stack, or call /proxy and send the key from your device with each request in X-Upstream-API-Key. Either way, the proxy never passes the key to the agent.
Yes. KeyShield is open source under the MIT license, and you can run the whole stack on your own machine or servers. You still pay your model providers as usual. Their free tiers, like OpenRouter's :free models, work through KeyShield.
Revoke it under Sessions or Agents, through POST /sessions/{prefix}/revoke or DELETE /agents/{id}, or ask Claude through the MCP server. The token stops working on its next request. Your provider key and your other agents keep working, because the leaked token never contained the key.
There are proxy paths for OpenAI, Anthropic, OpenRouter, Groq, Mistral, Cohere and Helius (Solana RPC). Any client that takes a base URL and a bearer token works, including the OpenAI SDK, LangChain, CrewAI, AutoGen and the Vercel AI SDK. Streaming responses pass through as SSE.
No. Sign in and unlock with a passkey. A Solana wallet is optional, either for signing in or for the experimental per-call metering, which currently runs on devnet.
Those tools hand the secret to your process, for example through environment variables with op run. KeyShield never does that. The agent gets a token that can be revoked on its own and is only valid through the proxy, while the raw key stays in the vault and the proxy. If you do want op run-style injection, the CLI's keyshield run does it too.
It's early. The protocol spec is v0.1 and the Python SDK is alpha. Security and fault-injection tests run in CI, but read the known limits and the security write-up before you trust it with high-value keys.
Save each key once, then give every agent its own token that you can revoke.