Architecture Vision (TOGAF Phase A)
Auto-generated from USM. Source:
.usm/system.usm
System Identity
| Field | Value |
|---|---|
| Name | Safekeys |
| Domain | safekeys.ai |
| Contact | james@smith-gray.com |
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
| ID | Title | Status | Target Date |
|---|---|---|---|
| phase-0-mvp | Phase 0 — Software MVP | planned | — |
| phase-1-hardware | Phase 1 — Hardware root of trust | planned | — |
| phase-2-threshold | Phase 2 — Threshold and post-quantum | planned | — |
| phase-3-high-assurance | Phase 3 — High assurance | planned | — |
Feature Index
| ID | Name | Status | Tags |
|---|---|---|---|
| protocol-capability-token | Capability Token | built | protocol, crypto, token, mvp |
| protocol-encrypted-folder | Encrypted Folder Format | built | protocol, crypto, folder, mvp |
| protocol-envelope-encryption | Envelope Encryption | built | protocol, crypto, kms, mvp |
| resolution-sidecar | Sidecar Resolution | built | sidecar, mvp, security |
| resolution-injection | Secret Injection Interfaces | built | sidecar, injection, mvp |
| resolution-exec-wrapper | Exec Wrapper | built | cli, injection, mvp |
| lifecycle-creation | Secret Creation | built | lifecycle, mvp |
| lifecycle-transport | Secret Transport | built | lifecycle, mvp, agents |
| lifecycle-revocation | Token Revocation | built | lifecycle, security, mvp |
| control-plane-api | Control Plane API | built | control-plane, api, mvp |
| control-plane-audit | Audit Logging | built | control-plane, audit, mvp |
| control-plane-policy | Policy Engine | built | control-plane, policy, mvp |
| integration-python-sdk | Python Agent SDK | built | sdk, mvp, agents |
| integration-mcp-server | MCP Server | built | mcp, mvp, agents |
| control-plane-db | Control Plane Data Model | built | data, postgres, mvp |
| hardening-hardware-root | Hardware Root of Trust | planned | hardening, hardware, phase-1 |
| hardening-threshold-crypto | Threshold and Post-Quantum Hardening | planned | hardening, crypto, phase-2 |
| deployment-packaging | Deployment Packaging | built | deployment, hardening, operations |
| deployment-docs-hosting | Docs and Site Hosting | built | deployment, docs, cloudflare |
Services Overview
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