Open source · MIT · free to self-host

Give your agents access,
not your API keys.

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.

Browser-agnostic extension pathPersonal macOS DMG pathRevocable proxy-only tokens
Test buildUnder developmentNot production release
Marketing release: v0.3 · 2026-11-11Latest status: CHANGELOG + GitHub main
Product simulationSimulation · no real keys

Press play to watch KeyShield collect keys and connect your tools.

The same job, counted in stepsIllustrative steps from the flow above. Not a timing measurement.

By hand

  1. Create the key on the provider's page
  2. Copy it somewhere safe
  3. Open each tool's settings and paste it
  4. Paste it again into every agent's .env
  5. To cut one agent off, rotate the key and repeat steps 1–4

With KeyShield

  1. Create the key. The extension spots it on the page
  2. Click Save to vault
  3. Open the tool's settings. Empty key boxes fill on their own
  4. Give each agent a session token, not the key
  5. To cut one agent off, click Revoke. Nothing else changes

Works 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.

The problem

Pasting a key into an agent means handing it over for good.

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.

Today

Every process holds the raw key

  • The agent holds the same key you do, with all of your access.
  • Keys end up in logs, traces, prompt context and screenshots.
  • To cut off one agent, you rotate the key and update every consumer.
OPENAI_API_KEY=sk-proj-…
ANTHROPIC_API_KEY=sk-ant-…
With KeyShield

Each agent holds its own token

  • The agent holds a session token. The provider key stays in your vault.
  • The proxy adds the key to each upstream request. The agent never sees it.
  • Revoke one agent and its next request gets a 401. Nothing else breaks.
KS_TOKEN=<session token, revocable>
KS_BASE=https://keyshield-production.up.railway.app
How it works

Store a key once. Hand out tokens instead.

One vault with two ways in: a dashboard and browser extension for you, and an SDK, CLI and REST API for your agents.

  1. Save the key once

    The extension saves it from the provider's page, or you paste it in the dashboard. The Device Vault encrypts on your device.

  2. Give the agent a token

    Copy a session token, or register the agent's ed25519 key so it can sign in by itself.

  3. Proxy checks every call

    The token and its revocation status are checked, then the proxy looks up your key for this request.

  4. Provider gets your key

    The call is forwarded with your key and the key is dropped. Revoke the token any time.

Features

Small surface, checked in code.

Every feature links to the code or doc it comes from, so you can check it yourself.

01 · Capture

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 →
02 · Tokens

Proxy-only agent tokens

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.

SPEC.md §4 →
03 · Revocation

Revoked on the next request

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 →
04 · Agents

Agents sign in by themselves

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 →
05 · Proxy

Drop-in for existing clients

Proxy paths for OpenAI, Anthropic, OpenRouter, Groq, Mistral, Cohere and Helius. Change the base URL and the code stays the same.

docs/API.md →
06 · Encryption

A Device Vault on your device

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 →

Security model

What each part can see.

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.

Your device
The plaintext keyThe Device Vault encrypts it locally with WebAuthn PRF → HKDF-SHA256 → AES-256-GCM.
Device Vault sync
Ciphertext onlyThe sync worker stores { ciphertext, nonce, tag }. Without your device credential it can't decrypt them.
Hosted vault
A server-side copy (not ZK)By default, keys saved by the extension or on the Vault page go to the control API (/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.
ZK mode (opt-in)
Ciphertext and a shareThe extension encrypts each key on your device with a passkey-derived key before saving. The server keeps the ciphertext and a per-key share. Keys are unlocked and injected on your machine by the extension or keyshield-proxy, never by the hosted proxy. Revoke a token and the server stops releasing shares, within a cache of at most 60 s.
Agent process
A proxy-only tokenNo sk-, sk-ant- or gsk_ material, and no access to vault or decrypt routes. Each token can be revoked on its own.
Hosted proxy (not ZK)
The key, for one requestChecks the token and revocation, adds the key, forwards the call, and never hands the key back to the agent.
Provider
A normal API callMade with your key. Nothing about the provider's API changes.
Guardrails
Limits on runaway agentsPer-session spend caps per second and per minute. Repeated empty or 5xx upstream responses freeze the session. Sign-in routes are rate-limited, and every proxy path needs a valid session.
Tested on failure paths
Bankrun security
Clawback only after the dispute window. Closed accounts can't come back, and concurrent settles can't double-claim.npm run test:bankrun
Fuzz invariants
Random instruction sequences keep spend within bounds. Unauthorized or revoked signers leave state unchanged.cargo test --test fuzz_invariants
Fault injection
502/504, dropped TCP, empty 200 and truncated JSON give no fulfilment proof, so nothing settles.npm run test:fault
End-to-end
Passkey-derived session → proxy → on-chain stream, as a dry run with no spending.npm run live:e2e:dry
Known limits
  • Without ZK mode, keys saved through the extension or /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.
  • ZK mode keys can't use the hosted proxy or its guardrails. They're injected locally, and the server still sees metadata such as provider names and call times. Code served by the dashboard could in principle read the passkey-derived key while the vault is unlocked.
  • KeyShield only protects calls that go through the proxy. It can't add a key to a binary that never calls it.
  • The decrypted key is in the proxy's memory while it handles a request. secrecy/zeroize hardening is planned, not yet a dependency.
  • On-chain metering runs on Solana devnet only. The spec is v0.1 and the SDK is alpha.
  • No latency numbers are published until they're measured in a named production environment.
Quickstart

First proxied call in five minutes.

  1. Open the appSign in at app.ks.aileena.xyz with a passkey, or run it yourself.
  2. Save a provider keyAdd an OpenRouter key under Vault. Its :free models cost nothing.
  3. Create an agent tokenOpen Developer, create a proxy-only agent token and set it as KS_TOKEN. With ZK mode, run keyshield-proxy and point KS_BASE at it instead.
  4. Make the callUse any snippet here. Your code only ever holds 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"}]}'
A revoked or invalid token gets 401 {"error":"invalid token"}. Full reference: docs/API.md
FAQ

Questions people ask first.

Can KeyShield read my API keys?

That 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.

Is it free?

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.

What happens if an agent leaks its token?

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.

Which providers and clients work?

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.

Do I need a crypto wallet?

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.

How is this different from 1Password CLI or HashiCorp Vault?

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.

Is it production-ready?

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.

Stop pasting keys into agents.

Save each key once, then give every agent its own token that you can revoke.