Secret broker for AI agents

Use, never see: agents run commands with the value injected and never read it. Open source, Python, installed in 2 minutes.

The broker at work

The agent names a secret and a command. The broker checks who is asking, writes the receipt, starts the command with the value inside it, and hands back only the output. How an agent uses it

What the broker checks before a value moves.

Checks the calling process

Every call carries a token for one named principal, and the broker reads the calling process's ancestry before it reads anything else.

  • lead:release attestedpid 5122 under pane 3, argv hash matched
  • CIToken issued to worker:ciscope inject:infra/railway, 8 hours
  • Grant inject:infra/* confirmedhuman:jason, reason: release 0.2.0

Writes the audit row

The audit row commits before the value leaves broker memory. If that write fails, the command does not start.

Delivery #4821
3 of 5
  • Resolve infra/github v3
  • Commit the audit row
  • Open the lease
  • Start the child with the value
  • Close the lease on exit

What never leaves the broker Keys, and the values they protect.

Seals on every restart

A restart, a crash or a deploy drops the keys. A human unseals; a freeze latches agents off; a panic seal enters lockdown.

Broker policy
4 of 5 on
  • Sealed on every restartKeys never on disk
  • Freeze latchesDeleting the file does not clear it
  • Audit verified on unsealA broken chain enters lockdown
  • Panic sealAny principal may drop the keys
  • Agent revealNo such operation exists

Redacts what tries to leave

Every child's output passes a redactor that knows every stored value in raw, base64, hex and percent form. A match becomes tw:redacted.

shdeploy.sh logpane-3.log 3 redacted
# the agent tries every trick
echo $RAILWAY_TOKEN
tw:redacted
echo $RAILWAY_TOKEN | base64
tw:redacted
printf %s $RAILWAY_TOKEN | xxd -p
tw:redacted
railway up # the real work still runs

Install in 2 minutes

macOS or Linux, Python 3.12 or newer, SSH from a device you trust. The first setup is human-only.

Run it yourself

git clone https://github.com/frontier-infra/titanwarden && cd titanwarden
uv sync --frozen && scripts/install.sh
twadmin init      # over SSH from your own device
twadmin unseal && tw status

Or hand it to your agent

Install Titanwarden from https://github.com/frontier-infra/titanwarden: run uv sync --frozen and scripts/install.sh, then stop. Never run twadmin init or unseal; I do those over SSH. Show me the init command when tw status says sealed.

Give an agent a credential in 3 steps

1

Put the value in

A human types it at a hidden prompt, or the broker generates it. It never crosses a command line.

twadmin put infra/railway
2 of 4
  • Passphrase verified
  • Value read at the hidden prompt
  • Encrypted as version 7
  • Fingerprint 9c4e recorded
2

Grant the agent its scope

A grant names a principal, a path pattern and the operations it covers. Agents without one file a request you answer.

  • CIworker:ci asks for inject:infra/railwayreason: deploy 0.2.0, for 4 hours
  • Approved by human:jasongrant g-118, expires 00:41
  • tw run started under lease 78audit #4822 committed first
3

Run with a manifest

A manifest holds references, not values, so it is safe to commit. The broker fills them in at start.

tw.env.tw shdeploy.sh 3 refs
# references, never values
GITHUB_TOKEN=tw://infra/github
RAILWAY_TOKEN=tw://infra/railway
DATABASE_URL=tw://infra/db-url
LOG_LEVEL=info

$ tw inject -- npm start

Questions

The ones engineers ask before they install it. The full guide

Can an agent ever read a value?

No. The agent socket has no operation that returns plaintext. A human can, with twadmin reveal over SSH and a reason that is logged.

Are there one-time shares for clients?

Designed for the next version, not built yet: one secret per link, burned after one reveal, with a copy-and-confirm receipt.

Does it sync between machines?

Today one broker serves one machine. The design adds an opt-in cloud broker that exchanges only ciphertext, and later a tailnet transport.

Will it sync with Bitwarden or 1Password?

No two-way sync, by design. There is a one-way import from Bitwarden, run by a human from a names-only manifest.

What does it not protect against yet?

A hostile process running as the same OS user. Today's version stops accidents and records honest use; the next runs the broker as its own user.