Self-hosted, non-custodial infrastructure that lets AI agents use real APIs without ever holding the credentials — and turns every action into a tamper-evident, independently verifiable record, anchored on-chain.
As of 2026: the settlement anchor is live on Cardano mainnet (validator deployed); the tamper-evident audit trail is delivered, with the ZK layer (Midnight) on the pre-production testnet. Pre-release.
| | | | ------------ | ------------------------------------------------------------ | | Live | — (pre-release; Cardano + Midnight anchors live on their test networks) | | Source | — (private during development) | | Role | Solo — architecture, smart contracts, backend, SDKs, security | | Stack | TypeScript · Cardano/Aiken · Midnight/ZK · Python | | Status | 98 % · close to launch (pre-release) |
The challenge
AI agents are starting to act on real systems — calling LLMs, payment rails and internal APIs — in regulated industries. Two hard problems block that: handing an agent raw API keys is a security and compliance liability, and "trust me, here is a log" is not evidence. An auditor needs proof that the record was not altered — proof that does not require trusting the operator's own server. Building that honestly means crossing an unusually wide set of disciplines end to end: a hardened local vault, cryptographic audit chains, two different blockchains, and a zero-knowledge contract.
``mermaid flowchart TD Agent["AI agent"] -->|"calls API without seeing the key"| Vault["L1 Vault · self-hosted, open-source"] Vault -->|"injects the real credential"| API["External API / LLM"] Vault --> Audit["Append-only SHA-256 hash-chain + Merkle batching"] Audit -->|"content-free Merkle root only"| Anchor{"AnchorBackend (pluggable)"} Anchor --> Local["local-file"] Anchor --> Cardano["Cardano L1 · Aiken validator · public · paid in ADA"] Anchor --> Midnight["Midnight · Compact ZK contract · roadmap"] Audit -. optional .-> TSA["Bring-your-own RFC-3161 TSA · timestamps the root"] ``
The approach
- Self-hosted vault + credential proxy. Agents call external APIs through the vault; raw keys stay encrypted (argon2id + AES-256-GCM) and the process starts locked — the master passphrase lives in RAM only, never in an env var or a Docker image.
- Append-only audit hash-chain + Merkle batching. Every action is SHA-256 chained; a
/audit/verifyendpoint re-checks integrity on demand; a hard guard at the boundary ensures only content-free hashes ever leave the host (privacy by construction). - A pluggable anchor layer. One clean
AnchorBackendinterface with three implementations (local-file, Cardano, Midnight): a batch's Merkle root is anchored externally so the tamper-evidence is verifiable by a third party — without trusting the vendor's server. - On-chain settlement on Cardano. An Aiken (Plutus v3) validator enforces proof-of-payment and a fixed split on-chain; property-tested and fuzzed; live on Cardano's test network with multiple accepted transactions.
- A zero-knowledge privacy contract (Midnight / Compact). A contract that anchors a commitment while the sensitive inputs (Merkle root, audit range, entity key) are private witnesses, with an on-chain nullifier for dedup — existence and integrity provable without public linkage. (Live on Midnight's Preprod test network end to end since June 2026, opt-in; mainnet is the next milestone.)
- Engineered the awkward infrastructure problems. A resumable, periodic-checkpoint wallet-sync engine that turns an OOM-prone, hours-long from-genesis blockchain sync into a crash-survivable process that resumes forward; bounded "safe waits" so a stalled dependency becomes a clear error, never a silent hang.
- The rest of the surface. An HTTP-402 (x402) payment gate, optional bring-your-own RFC-3161 timestamping, a dependency-free Python SDK and a TypeScript SDK, a React 19 admin cockpit, and CI across seven test suites (open-source core plus a separate private anchor-engine repo).
The result
- A working multi-layer system: self-hosted vault + audit chain + both the Cardano and Midnight anchors live on their test networks (Cardano: multiple accepted on-chain transactions; Midnight: opt-in Preprod anchoring, end to end), plus Python and TypeScript SDKs and a React cockpit.
- An extensible anchor interface — adding a new chain or backend is a single implementation behind a stable seam.
- The hard infrastructure (resumable sync, fail-closed security, the ZK privacy contract) is built and reasoned through end to end.
- Open-source core (Apache 2.0), CI-gated, property- and fuzz-tested; honest, documented separation of what runs today vs. what is on the roadmap.
What this demonstrates
- Full ownership across an unusually broad stack: backend (TypeScript/Node, Python), two blockchains (Cardano/Aiken and Midnight/zero-knowledge), applied cryptography, threat-modeled security, SDKs, a React frontend, and CI/deployment.
- Comfort with hard, low-level problems — zero-knowledge contracts, resumable blockchain sync, fail-closed security design — not just CRUD.
- Architecture-first: clean interfaces and seams, fail-closed defaults, and a truthful "today vs. roadmap" rather than overclaiming.
- Modern, AI-assisted delivery, steered and curated by a human.
Tech at a glance
TypeScript · Node / Express · Python · Aiken (Plutus v3) · Compact (Midnight ZK) · SHA-256 + Merkle · RFC-3161 · argon2id / AES-256-GCM · x402 · React 19 · Docker · CI