Open Source ยท MIT License

Some secrets are meant to stay hidden.
Even from the agents that use them.

Zero-knowledge secret provisioning for AI agents. HPKE end-to-end encryption. In-memory only. No plaintext ever touches the wire.

11 Security Layers
RFC 9180 HPKE Standard
0 Plaintext Exposure

The Secret Problem No One Talks About

AI agents need credentials to do their jobs. But every current method leaks secrets.

Chat Leaks

AI agents ask for API keys in chat. Keys get logged, stored in conversation history, and leaked through prompt injection.

Config Files

.env files and configs get committed to repos, shared in Slack, and copied across machines unencrypted.

Plain Text on the Wire

Secrets transmitted as plain text through middleware, proxies, and gateways that can read everything passing through.

No Expiry

Secrets persist forever in memory, logs, and databases with no automatic cleanup or time-based expiration.

How agent-Kryptos Works

A secure 5-step process for end-to-end encrypted secret delivery.

1
๐Ÿค–

Keypair Generation

Agent generates an ephemeral HPKE keypair. Keys exist only in memory โ€” never written to disk, never logged.

2
๐Ÿ”’

Secure Request

SPS creates a secret request with 3-minute TTL, HMAC-signed URL, and a human-readable confirmation code.

3
๐Ÿ’ฌ

Link Delivery

Gateway sends the secure URL to human via Telegram or Slack. The LLM never sees the URL or confirmation code.

4
๐ŸŒ

Client-Side Encryption

Human opens the URL, verifies the confirmation code, enters the secret. Browser encrypts with HPKE.Seal โ€” no server sees plaintext.

5
โœ…

Retrieve & Destroy

Agent atomically retrieves the ciphertext (single-use), decrypts in memory, then immediately destroys all keys.

Built for Zero Trust

Four components working together with cryptographic guarantees at every boundary.

SPS Server

Redis-backed secret provisioning with 3-min auto-expiry TTL, atomic single-use GETDEL retrieval via Lua scripts, and Ed25519 JWT authentication.

FastifyRedisJWT

Browser UI

Self-contained encryption page. No external dependencies, no CDN. HPKE.Seal happens entirely in your browser with a vendored, audited library.

Vanilla JSHPKEZero-Dep

Agent Skill

HPKE keypair generation, in-memory SecretStore with Buffer zeroing, custom toJSON() returning [REDACTED], and lazy re-request flow.

TypeScriptBufferSkills

Gateway

LLM-blind URL generation, egress URL filtering with homograph attack detection, Ed25519 identity signing, and anti-phishing controls.

DLPEd25519Filter

11 Layers of Security

Defense in depth, not security theater. Every layer neutralizes a specific threat.

01

HPKE Ephemeral Keys

Key compromise โ†’ no forward exposure

Crypto
02

Client-Side Encryption

Secret never plaintext on wire

Crypto
03

Zero-Knowledge SPS

Service compromise โ†’ no secrets exposed

Architecture
04

Single-Use IDs + 3-Min TTL

Replay attacks blocked

Protocol
05

Hardened Device Flow

Phishing via prompt injection neutralized

UX
06

LLM Blindness

Agent never sees URL or confirmation code

Critical
07

Gateway Egress Filtering

LLM-injected malicious URLs redacted

Critical
08

SPIFFE/SPIRE Identity

Agent impersonation prevented

Identity
09

In-Memory + Zeroing

Crash dumps and disk forensics defeated

Runtime
10

Audit Logging

Non-repudiation and rogue agent detection

Ops
11

TEE Execution

Host OS compromise neutralized (optional)

Hardware

Why agent-Kryptos

State-of-the-art cryptography, designed specifically for LLMs and ephemeral interactions.

HPKE (RFC 9180)

X25519 + HKDF-SHA256 + ChaCha20-Poly1305. Industry-standard hybrid encryption, not homebrew crypto.

LLM Blindness

The AI agent never sees the secret URL or confirmation code. Gateway controls the entire delivery flow.

Ephemeral Keys

Per-request keypairs. Generated, used once, destroyed. No key storage, no forward exposure.

In-Memory Only

Secrets live in zeroed Buffers. No disk, no logs, no serialization. Agent crash = clean slate.

Single-Use Retrieval

Atomic GETDEL via Redis Lua script. First retrieval succeeds, all subsequent attempts get 410 Gone.

Anti-Phishing

HMAC-signed URLs, human-readable confirmation codes, egress URL filtering. Social engineering blocked at every layer.

Get Started in 60 Seconds

Integrate secure secret provisioning with just a few lines of code.

terminal
# Install agent-Kryptos
$ npm install agent-kryptos

# Start the secret provisioning service
$ npx agent-kryptos serve

๐Ÿ”’ SPS Server running on http://localhost:3100
๐Ÿ”‘ Gateway identity loaded (Ed25519)
โœ… Ready to provision secrets

# In your agent code
const secret = await agent.requestSecret("Stripe API Key");
// โ†’ Human receives secure link via Telegram
// โ†’ Secret encrypted client-side with HPKE
// โ†’ Agent decrypts in-memory, keys destroyed