[ rust · e2e ]
Klav
Secrets agents can use without the model ever seeing them.
An end-to-end encrypted password manager in Rust, with agent identities, Face ID approvals and a tamper-evident log.
An end-to-end encrypted password manager built for people and agents. Agents get their own identity, scoped permissions and a tamper-evident log of what they used, so they can sign in to sites and call APIs without the secret ever reaching the model.
The model is not the agent
An agent usually gets either a person's master password or a pasted API key. Both put the secret where the model can read it. Klav separates two things that usually get blurred: an agent's runtime (my code, which can hold a key) and its model (its context, the provider's logs, whatever a prompt injection makes it say), which cannot. By default Klav hands an agent actions and references, not values.
- Agent klav mcp, with its own key
- Grant and policy allow · ask · deny
- Face ID / Touch ID only when the policy says ask
- Decrypted in the runtime fill a form, inject into a process
- Model sees {"ok": true, "filled": ["username", "password"]}
Filling a login, injecting secrets into a process and generating a password are on by default; revealing a value in the clear is off. Every tool call requires a reason, which goes into the audit log next to what was done. Revoking an agent cuts it off on its next request, and the log shows exactly which secrets it got to see, so I rotate those and only those.
An agent is a device, not a user
An agent generates its own X25519 and Ed25519 key pair and asks to pair. I see its name and a six-word fingerprint the terminal also shows, pick which projects it gets, what needs approval and when it expires, and approve with Face ID. My device wraps those project keys to the agent's public key; the server never sees them. Each request is signed with the agent's key, so there is no bearer token to steal and replay.
- Account Who am I? master password + 128-bit Secret Key, Argon2id, OPAQUE login
- Vault Personal or work? random key, wrapped with HPKE for each member, person or agent
- Project this project What can this agent touch? the unit shared with an agent and linked to a repo
- Item Which secret? fields and attachments, XChaCha20-Poly1305
Each ciphertext is bound to its account, vault, project, item and version, so a malicious server cannot move an item or roll it back unnoticed. Cryptography lives only in one Rust crate and uses audited implementations (RustCrypto, opaque-ke, hpke); nothing is home-made.
A log nobody can rewrite
Every event is hash-chained to the previous one and signed by whoever performed it, and trusted devices sign the head of the chain from time to time, so not even the server can delete or alter an entry without it showing. The same chain gives three views: who used an item, what an agent saw, and the whole log with filters.
One core, many surfaces
Everything that can be Rust is: the core compiles to a CLI and daemon, to WebAssembly for the browser extension and through uniffi for the iPhone app. klavd keeps the vault unlocked in memory and asks for Touch ID, so the extension, the CLI and the Mac app unlock through it. A klav.toml in a repo maps environment variables to secret references, and klav run starts a process with them; nothing secret is committed.
Status
Early and private, being prepared to open: the docs are moving to English, and the server is AGPL-3.0 and the rest Apache-2.0. The first milestone ("Klav for my agent") is complete, and since 4 November 2026 my own vault lives on a self-hosted Klav server, with the iPhone app in TestFlight. The browser extension (Chromium and Firefox) is ready but not in the stores yet, and a native Mac app is built. The repo is a workspace of 13 crates and 40 ADRs, and its CI is the first one ci-cache was measured on. Not for real secrets yet.
Stack Rust · Axum · sqlx (Postgres / SQLite) · OPAQUE · HPKE · Argon2id · XChaCha20-Poly1305 · Secure Enclave · WebAssembly · uniffi · SwiftUI · TypeScript (MV3) · MCP