Skip to content

Architecture Vision (TOGAF Phase A) ​

Auto-generated from USM. Source: .usm/system.usm

System Identity ​

FieldValue
NameSafekeys
Domainsafekeys.ai
Contact[email protected]

Summary ​

Safekeys.ai — encrypted transport for secrets through environments, agentic flows, and LLM systems, designed so plaintext is never exposed to any model. Secrets are treated as movable encrypted objects (ciphertext folders) plus opaque capability tokens; a privileged local sidecar resolves them outside the LLM process. The agent-facing interface is stable as the backend hardens from software isolation to hardware and threshold cryptography.

Architecture Principles ​

The LLM is never on the decryption path (never-on-decrypt-path) ​

Statement: No language model ever holds, receives, or can derive plaintext secret material or long-term keys.

Rationale: Once an LLM has seen a value, that session — and the logs, traces, and memory around it — is compromised. This is the product's reason to exist.

Implications:

  • Agents may only receive tokens, folder paths, ciphertext, metadata, and success/deny status

  • Resolution happens in a privileged sidecar, never in the model process

  • Create-secret flows never round-trip plaintext through model context

Agents see only opaque capability tokens (opaque-capability) ​

Statement: The only secret-bearing artefact an agent reasons about is a short-lived, scoped, audience-bound capability token containing zero secret material.

Rationale: A token is safe to pass through prompts, memory, tool calls, and multi-agent buses where a value is not.

Implications:

  • Tokens are short TTL (minutes to hours), scoped, and audience-bound

  • Revocation is immediate via jti denylist plus short TTL

Stable agent-facing interface (stable-agent-interface) ​

Statement: The public interface (tokens plus folders) stays constant as backends harden from software isolation to hardware to threshold crypto.

Rationale: Agent frameworks, runtimes, and customers integrate once and inherit later hardening without rewrites.

Implications:

  • MVP is software-only and already meets the product promise

  • Hardware, threshold crypto, and post-quantum ratchets land behind the same API

Plaintext is materialised only for the consumer, then zeroised (materialise-then-zeroise) ​

Statement: Plaintext exists only transiently inside the sidecar's injection path for the consuming non-LLM process, and is zeroised immediately after use.

Rationale: Minimises the window and the surface where a live secret value exists.

Implications:

  • Prefer exec-wrapper and env injection over returning values on an agent's stdout

  • Sidecar holds transient unwrapped data keys, never long-term master keys in the hardware phase

Open protocol, commercial authority (open-core-protocol) ​

Statement: Token and folder specifications, the sidecar reference implementation, CLI, and core SDKs are open source; the hosted authority, hardware, and enterprise controls are commercial.

Rationale: Security tooling requiring deep trust wins adoption when the foundational pieces are auditable — the Let's Encrypt model — while revenue sits on hosted authority, hardware, and enterprise controls.

Implications:

  • Public core is Apache-2.0 (explicit patent grant matters for crypto)

  • Control plane and hardware provisioning remain proprietary or BSL

  • No AGPL/SSPL on the sidecar or SDKs — it scares agent-framework maintainers

Roadmap ​

IDTitleStatusTarget Date
phase-0-mvpPhase 0 — Software MVPplanned—
phase-1-hardwarePhase 1 — Hardware root of trustplanned—
phase-2-thresholdPhase 2 — Threshold and post-quantumplanned—
phase-3-high-assurancePhase 3 — High assuranceplanned—

Feature Index ​

IDNameStatusTags
protocol-capability-tokenCapability Tokenbuiltprotocol, crypto, token, mvp
protocol-encrypted-folderEncrypted Folder Formatbuiltprotocol, crypto, folder, mvp
protocol-envelope-encryptionEnvelope Encryptionbuiltprotocol, crypto, kms, mvp
resolution-sidecarSidecar Resolutionbuiltsidecar, mvp, security
resolution-injectionSecret Injection Interfacesbuiltsidecar, injection, mvp
resolution-exec-wrapperExec Wrapperbuiltcli, injection, mvp
lifecycle-creationSecret Creationbuiltlifecycle, mvp
lifecycle-transportSecret Transportbuiltlifecycle, mvp, agents
lifecycle-revocationToken Revocationbuiltlifecycle, security, mvp
control-plane-apiControl Plane APIbuiltcontrol-plane, api, mvp
control-plane-auditAudit Loggingbuiltcontrol-plane, audit, mvp
control-plane-policyPolicy Enginebuiltcontrol-plane, policy, mvp
integration-python-sdkPython Agent SDKbuiltsdk, mvp, agents
integration-mcp-serverMCP Serverbuiltmcp, mvp, agents
control-plane-dbControl Plane Data Modelbuiltdata, postgres, mvp
hardening-hardware-rootHardware Root of Trustplannedhardening, hardware, phase-1
hardening-threshold-cryptoThreshold and Post-Quantum Hardeningplannedhardening, crypto, phase-2
deployment-packagingDeployment Packagingbuiltdeployment, hardening, operations
deployment-docs-hostingDocs and Site Hostingbuiltdeployment, docs, cloudflare

Services Overview ​

mermaid
graph TD
    subgraph "App Services"
        control_plane["Control Plane API <port 8080>"]
        sidecar["Sidecar / Resolver"]
        cli["Safekeys CLI"]
        safekeys["Safekeys.ai Site <port 3000>"]
        control_plane_db["Control Plane Database <port 5432>"]
    end
    subgraph "Packages"
        mcp_server["Safekeys MCP Server"]
        python_sdk["Python SDK"]
        typescript_sdk["TypeScript SDK"]
        key_store["Key Store (OpenBao / Vault)"]
    end
    control_plane --> key_store
    control_plane --> control_plane_db
    sidecar --> control_plane
    sidecar --> key_store
    cli --> sidecar
    cli --> control_plane
    mcp_server --> cli
    python_sdk --> cli
    typescript_sdk --> cli