Protocol v1 · owner-reviewed · sync pre-release

Your secrets sync. The server only sees ciphertext.

ak-vault is the opt-in, end-to-end encrypted sync layer for AgentKit's ak secrets. Secrets are sealed on your device before they leave it, agents keep reading from the local vault, and with sync off nothing touches the network. A browser dashboard and remote MCP are on in production by owner decision on 2026-11-01, before their release gate passed; they are pre-release and not for production credentials; remote MCP passes plaintext through server memory during a call (details).

one secret, two devices · illustrative
  1. Sealed on device AName, value and description are encrypted together and signed before anything leaves the laptop.
  2. Stored as ciphertextThe Worker checks the device, orders the write and keeps the sealed record. It holds no key that opens it.
  3. Verified, then opened on device BYour other device checks signatures and history, then decrypts into its own local vault.
The name, value, description and sensitivity all travel inside the ciphertext. The Worker sees metadata such as a random ID, revisions, sizes and a signature, and holds no key that opens them.
The problem

Secrets drift into places they were never meant to be.

A key starts in one .env file. Then it is pasted into a chat for a teammate, lands in shell history, gets copied to a second laptop and ends up in an agent's config. Every copy is plaintext that someone else can read.

Before: plaintext copies

every copy readable
  • .env in a repoOPENAI_API_KEY=sk-proj-…
  • team chathere's the key: sk-proj-…
  • shell historyexport STRIPE_KEY=rk_live_…
  • agent config"GITHUB_TOKEN": "ghp_…"

After: one local vault

available today
OPENAI_API_KEYsealed
STRIPE_KEYsealed
GITHUB_TOKENsealed

configs say ${secret:OPENAI_API_KEY}

Values live in the OS keychain or the age-encrypted file vault. Agents receive a value only through a grant you approved, and every release is recorded in a local audit ledger.

That fixes one machine. ak-vault adds the missing piece: the same vault on your other devices, without handing the values to a server.

How sync works

Sealed on one device. Relayed as ciphertext. Verified on the next.

Your local vault stays the source of truth. Sync is an optional path between devices you enrolled yourself.

  1. 01Device A

    You set a secret

    ak secrets set stores it in the OS keychain or the age-encrypted file vault, as it does today. Nothing leaves the machine unless you turn sync on.

    OPENAI_API_KEYsk-proj-…
  2. 02Device A · local crypto

    It is sealed locally

    Name, value and description are encrypted together under a per-item key derived from the vault key. The device signs the record with its own key.

    XChaCha20-Poly1305Ed25519 signature
  3. 03Cloudflare Worker

    The Worker stores ciphertext

    It checks the device's token and proof, accepts the write only if the revision matches, and keeps conflicts and deletions. It holds no key that opens the record.

    rev 7 → 8ct: Hq9Z…
  4. 04Device B

    Another device verifies, then decrypts

    Device B checks the signature, the owner-signed member list and its last witnessed checkpoint. It refuses anything older, then decrypts into its own local vault.

    signature ✓membership ✓checkpoint ✓
Cross-device updates are targeted to arrive within about a minute, only when both devices run an active sync service and the network works. A CLI without a background service syncs on its next run. Reads through resolve always come from the local vault. Read the full walkthrough: keys, enrollment and conflicts.
Two views of one secret

What your device knows, and what the server gets.

The server needs a little metadata to order and authorize writes. Everything that describes a secret travels inside the ciphertext.

On your deviceplaintext · local only
name        OPENAI_API_KEY
value       sk-proj-xxxxxxxxxxxxxxxx
meta        "Billing project key"
sensitivity high
What the Worker storesciphertext + metadata
{"item_id":"q7N2fXk0RZ1hTqLw9bYc4A",
 "base_revision":7, "key_epoch":1,
 "env":{"alg":"xc20p",
   "n":"u3Rk9QeZ2vP0aL8m…",
   "ct":"Hq9Zx2LmVb0Rk7TnYc4W…"},
 "sig":"Zk3pW8…"}
The name, value, description and sensitivity are all inside ct. The Worker sees metadata such as a random ID, revisions and a signature, and holds no key that opens them.
One synced secret, seen from each side (protocol v1, proposed; values illustrative)
DataOn your deviceWhat the server stores
Secret nameOPENAI_API_KEYencryptedinside ctItem IDs are random and never derived from names.
Secret valuesk-proj-…encryptedinside ctNever in logs, errors or telemetry.
Description, tags, profile, sensitivity"Billing project key", highencryptedinside ct
Vault keyUnwrapped in memory when neededwrappedonly to your devices, your password-derived key and your recovery key
Item ID and revisionYou use the name insteadvisibleq7N2fXk0…, revision 8Needed to order writes and catch conflicts.
Sizes and timestampsSamevisibleShows roughly how many items change, and when. Sizes hint at value length.
Devices and membersYour device listvisibledevice IDs, public keys, roles, accountsThe signed member list, so the server can authorize requests.
Network metadataNot applicablevisibleIP address and request timing at the edge
Master password, recovery key, device private keysOnly herenever sent
encryptedsealed on your device visibleoperational metadata never sentstays with you
Promises and fine print

Every promise comes with its fine print.

These are design properties of protocol v1 as proposed. They hold only after the implementation passes every security gate in issue #8. The owner accepted the review gate on 2026-10-16 with no written findings; no independent third party has reviewed it.

GuaranteeEncrypted before upload

Values, names, descriptions, tags, profiles, policy and audit entries are sealed on the device. spec §3.2, §7

LimitationMetadata is visible

Random IDs, revisions, sizes, timestamps, device public keys, roles and request metadata.

GuaranteeOwner-signed membership

A hash-chained, owner-signed log decides which devices receive the vault key. Injected recipients are rejected. spec §4

LimitationOne key per vault

Anyone holding a vault's key can decrypt every item in it. There is no per-secret access; use separate vaults instead.

GuaranteeRollback detection

Devices keep signed checkpoints and refuse server state older than one they already witnessed. spec §6

LimitationWithheld updates

A malicious server can hide updates that a new or long-offline device has never seen. Detecting that needs a second channel, such as another device's checkpoint.

GuaranteeLive revocation

Device-bound tokens plus a per-request device signature. Revoked devices and sessions are refused on every request, and lookup errors fail closed. spec §9

LimitationNo claw-back

Revocation blocks new keys and ciphertext. Anything a device already decrypted stays exposed, so affected secrets are marked to rotate.

GuaranteeLocal-first and opt-in

resolve reads the local vault and never waits on the Worker. With sync off, secrets make zero network requests.

LimitationPlaintext reaches the child process

ak secrets run (planned) hands the value to the process you approved. The vault controls and records the release; it cannot take the value back from that program.

GuaranteeNo silent overwrites

Writes use revision compare-and-swap. A stale write gets 409 and is kept as a conflict branch for you to resolve, and deleted stays deleted. spec §5

LimitationNot independently reviewed

Protocol v1 is a proposal; the owner accepted the review gate with no written findings. Treat every property on this page as a design target until every release gate is met.

GuaranteeRecovery without trusting the server

The encrypted recovery bundle carries the owner's public trust anchor, the recovery signing key and the newest witnessed checkpoint, so a fresh device does not take the server's word. spec §3.4

LimitationLose every key, lose the vault

Without an enrolled device, your master password or your recovery key, nobody can decrypt the vault, including AgentKit.

Read the full security model, with each adversary, its defence and the risk that stays with you.

Start

Start local today.

The local vault ships in the AgentKit CLI now. Sync commands are a hidden, unsupported preview in the released CLI; agent-discovery commands are planned and not available yet.

01 available

Import your .env

Move existing values into the vault in one pass. Delete the plaintext file once you have checked the import.

shell
$ ak secrets import-env .env
$ ak secrets list
02 available

Reference, don't paste

Agent configs carry a reference. The value is resolved locally, for an agent you granted it to.

agent config
OPENAI_API_KEY=${secret:OPENAI_API_KEY}
03 preview

Sync a second device

Opt in, then enroll another device by comparing a six-digit code on both screens. Syntax may change.

shell · preview
# PREVIEW: hidden in the released CLI, unsupported, syntax may change
$ ak secrets sync enable
Where it stands

Built in the open, gated by review.

Work is tracked in the epic, issue #1. Personal-vault sync comes first. No dates are promised.

  1. Local vault

    available

    Ships in the AgentKit CLI: keychain or age-encrypted file vault, agent grants, approvals and an audit ledger.

  2. Protocol v1 and test vectors

    in review

    Spec, TypeScript reference and a Go implementation that reproduce every vector. #2

  3. Worker and storage

    preview

    Cloudflare Worker with a SQLite Durable Object per vault, including shared-vault membership. The production sync API is live as a pre-release preview, before the review. #4, #5

  4. Client sync in the CLI

    preview

    The sync commands ship hidden in the released ak beta; the removal-fence client is included since v3.0.0-beta.31.

  5. Security gate

    required for GA

    Red team, a two-device end-to-end run with real clients, rollback rehearsal and a review by the owner (not independent). #8

After personal sync: read-only CI identities (#6) and portable policy with encrypted audit (#7).

Pricing

Free while it is a preview. Yours to host, always.

Cloud Sync is a pre-release preview and free for AgentKit users while we use it ourselves. It is not yet recommended for production credentials. Paid annual plans start only after general availability, and preview users are told before any billing begins. Progress toward GA: #237.

Cloud Sync plans (limits planned, not yet enforced)
PlanPriceVaultsDevices per vaultStorage per vault
Preview (now)Free with an AgentKit sign-in3510 MB
AgentKit customers, after GA$9 / year with a valid AgentKit license5525 MB
Everyone else, after GA$19 / year5525 MB
Self-hostedFree, open source (MIT); in progressYour choiceYour choiceYour choice

Every plan is end-to-end encrypted: by design, the server stores ciphertext only. Limits are planned and not yet enforced; fair use applies. If a plan lapses, your vaults turn read-only and are never deleted. No lock-in: ak-vault is open source, and you will be able to deploy it to your own Cloudflare account and point ak secrets at it (in progress, #236).

Questions

Questions worth asking a secrets product.

Can I use cloud sync today?

Only as a preview. Protocol v1 is proposed; its review gate was accepted by the owner, not by an independent third party (#8). By owner decision the production sync API went live before that review as a pre-release preview: if you are signed in and run the preview ak secrets sync commands, your device syncs with it. It is not yet recommended for production credentials. The local ak secrets vault works today.

Can AgentKit read my secrets?

The design says no: the server stores ciphertext and wrapped keys only, and never receives your master password, recovery key or device private keys. It can see the metadata listed under two views of one secret. Treat this as a design claim: the owner accepted the review gate with no written findings, no independent third party has reviewed it, and the release gates are not all met. Remote MCP (pre-release, not for production credentials) narrows this: during a call, plaintext passes through the server's memory, though it is never stored or logged (remote access).

What happens if the server is down?

Nothing changes for running agents. resolve reads the local vault and never waits on the network. Changes made while offline sync on the next successful connection, and conflicting edits are kept for you to resolve.

Can I give a teammate access to just one secret?

Not within one vault. A vault key decrypts every item in the vault, so v1 makes no per-secret access claim. Put the secrets you want to share in a separate shared vault.

What if I lose my laptop?

Revoke the device. Revocation is checked on every request, so a revoked device or session is refused new reads and writes. Anything it already decrypted cannot be clawed back, so rotate sensitive credentials at the provider.

See all questions, grouped by status, security, everyday use, teams and recovery. What is live, preview and gated, surface by surface: status.

Reading this with an AI assistant? Grab the Markdown version, or open it straight in your assistant.