The problem

AI agents increasingly need real credentials to act: API keys, signing keys, tokens. Handing an agent the full key means it can use it any time, forever, and one leaked key is a full compromise. Humans don't hand out master keys; we hand out shares and require a quorum.

The idea

SplitKey is a small custody service built on Shamir's Secret Sharing. Split a key into 5 shares; any 3 reconstruct the key, fewer reveal nothing. The agent can run its task only when a human-collected quorum is present, and the key is wiped from memory the moment the task ends.

What the prototype does

  • Split: any secret becomes 5 shares on a 3-of-5 threshold.
  • Collect: click 3 of the 5 shares; with fewer than 3, reconstruction is impossible.
  • Run agent task: with the quorum present, the agent runs its task (demo: encrypt a payload with the key). The reconstructed key lives in memory only for the run.
  • Zeroize: one button wipes the reconstructed key and returns the vault to 0/3 collected.
  • Audit log: every event (shares collected, key reconstructed, agent task, key zeroized) is recorded with a timestamp.

How it was built

Python and Flask on the back end carrying the Shamir split/reconstruct logic, a vanilla JavaScript front end, deployed free on Render. Demo data is synthetic; no real credentials live in the app.

Challenges

Getting the key lifecycle right: the key must exist only between reconstruction and zeroize, never longer. An early version failed when the shares were collected before the agent task ran; that bug was caught in a live end-to-end test and fixed so reconstruction happens whenever the agent needs the key while the vault is inactive.

Built With

Share this project:

Updates