Help & Guides

Long-form guides for getting Vouch into production.

13 parts covering 70 guides: quickstarts in three languages, identity and key management, the post-quantum profile, delegation chains, sidecar deployment, KMS integration, reputation and revocation engines, framework integrations, and the complete CLI reference. Use the marginalia at left to navigate, or search across every guide.

New to Vouch? The six-step onboarding wizard is the fastest path from zero to a deployable adoption set.

Part I

Getting Started

Pick a language, install the SDK, and prove the sign-and-verify loop works in your dev env (no domain, no hosting) in under five minutes. Each quickstart ends with the two-line change to graduate to production.

Guide

Python Quickstart

Five-minute path from pip install to a sign-and-verify loop running entirely in your dev env.

Install

bash
# Linux and macOS: one line (on Windows, use pip below)
curl -fsSL https://vouch-protocol.org/install.sh | sh

# Or with pip on any platform
pip install vouch-protocol

The post-quantum profile (an eddsa-jcs-2022 proof plus an mldsa44-jcs-2024 proof on the same credential) is bundled by default; nothing else to install.

Not ready to write code yet? Run vouch with no arguments for a short menu (sign your git commits, or create an agent identity), or run vouch onboard --quick to generate a full agent setup with recommended defaults in one command.

Step 1 - Sign and verify locally

Start in your dev env. No domain, no hosting, no internet. Everything runs in your own Python process:

python
from vouch.keys import generate_identity
from vouch.signer import Signer
from vouch.verifier import Verifier

# Generate an in-memory identity. The "domain" string is just a label
# inside the DID; nothing is published anywhere yet.
identity = generate_identity(domain="localhost")

signer = Signer(
    private_key=identity.private_key_jwk,
    did=identity.did,
)

token = signer.sign({
    "action": "submit_claim",
    "target": "claim:HC-001",
    "resource": "https://insurance.example.com/claims/HC-001",
})

# trusted_roots is the local-dev escape hatch: in production the verifier
# fetches did.json from the issuer's domain instead.
verifier = Verifier(
    trusted_roots={identity.did: identity.public_key_jwk},
    allow_did_resolution=False,
)
ok, passport = verifier.check_vouch(token)
assert ok
print("verified intent:", passport.payload)

That round-trip is the entire credential layer: keypair, signed action, verified action, all in your own process. No webserver, no public DNS, no .well-known path.

Step 2 - Switch to the modern VC + Data Integrity proof

The legacy JWS form above stays for backward compatibility. New code should prefer the W3C Verifiable Credential form with a Data Integrity proof (eddsa-jcs-2022):

python
# sign takes the intent directly (action, target, resource required).
signed = signer.sign(
    intent={
        "action": "submit_claim",
        "target": "claim:HC-001",
        "resource": "https://insurance.example.com/claims/HC-001",
    },
    valid_seconds=300,
)
print(signed["proof"]["proofValue"])

Verify it with the same Verifier (the credential carries its issuer DID, the Verifier looks up the key in trusted_roots):

python
import asyncio
from vouch import Verifier

verifier = Verifier(
    trusted_roots={identity.did: identity.public_key_jwk},
    allow_did_resolution=False,
)
result = asyncio.run(verifier.verify(signed))
print(result.valid, result.reasons)

For the post-quantum profile, swap sign for sign_hybrid. The required pqcrypto library is already bundled with vouch-protocol, so nothing else to install. Everything else stays the same.

Step 3 - When you are ready to publish

The local trial used did:web:localhost and an in-memory keypair. Taking an agent to production is a two-line change:

  1. Replace domain="localhost" with a real domain you control.
  2. Publish the DID Document at https://your-domain/.well-known/did.json so any verifier on the internet can resolve it.

Then drop trusted_roots from your Verifier:

python
# Production: verifier resolves the DID over HTTPS at verification time.
verifier = Verifier()
ok, passport = verifier.check_vouch(token)

Generate the production keypair and DID Document with the CLI:

bash
vouch init --domain agent.example.com

That writes the private key into your platform's secure key store (Keychain on macOS, DPAPI on Windows, secret-service on Linux) and emits a did.json you can publish.

What you have now

  • A signed-and-verified credential running entirely in a Python REPL
  • A modern VC + Data Integrity form, ready for the wire
  • A clear two-line upgrade path when you decide to expose the agent to the public internet

Next: try signing with the post-quantum profile or adding a delegation chain.

Guide

TypeScript Quickstart

Same flow in Node. No domain, no hosting; cross-verifies with Python-signed credentials.

Install

bash
npm install @vouch-protocol-official/sdk

Step 1 - Sign and verify locally

Start in Node. No webserver, no domain, no internet. Save as try-vouch.ts and run with tsx try-vouch.ts (or compile and run with node):

ts
import {
  Signer,
  Verifier,
  generateIdentity,
} from '@vouch-protocol-official/sdk';

async function main() {
  // Generate an in-memory identity. The "domain" string is just a label
  // inside the DID; nothing is published anywhere yet.
  const identity = await generateIdentity('localhost');

  const signer = new Signer({
    privateKey: identity.privateKeyJwk,
    did: identity.did!,
  });

  // sign takes the intent directly (action, target, resource).
  const signed = await signer.sign({
    intent: {
      action: 'submit_claim',
      target: 'claim:HC-001',
      resource: 'https://insurance.example.com/claims/HC-001',
    },
    validSeconds: 300,
  });
  console.log('signed proof value:', signed.proof.proofValue);

  // trustedRoots is the local-dev escape hatch: in production the verifier
  // fetches did.json from the issuer's domain instead.
  const verifier = new Verifier({
    trustedRoots: { [identity.did!]: identity.publicKeyJwk },
    allowDidResolution: false,
  });
  const result = await verifier.verify(signed);
  console.log('valid:', result.valid, 'reasons:', result.reasons);
}

main().catch(console.error);

That round-trip is the entire credential layer: keypair, signed credential with a Data Integrity proof (eddsa-jcs-2022), and verification, all in one Node process.

Step 2 - When you are ready to publish

The local trial used did:web:localhost and an in-memory keypair. To take an agent to production:

  1. Pass your real domain to generateIdentity (or generate once with the Python CLI and import the JWK).
  2. Publish the DID Document at https://your-domain/.well-known/did.json.

Then drop trustedRoots and allowDidResolution:

ts
const verifier = new Verifier();              // resolves did:web over HTTPS
const result = await verifier.verify(signed);

Cross-language interop

A credential signed in Python verifies byte-identically in TypeScript and vice versa, thanks to RFC 8785 JCS canonicalization. The test vectors at test-vectors/hybrid-eddsa-mldsa44/ exercise this.

Browser vs Node

The TypeScript SDK works in both. In Node, the example above runs as-is. In the browser, key storage falls back to IndexedDB (with optional WebAuthn-gated unlock) rather than a platform key store; the sign/verify APIs are otherwise identical.

Guide

Go Sidecar Quickstart

Run the signing daemon on your laptop. Sign credentials from any language over localhost HTTP.

Step 1 - Build and run on localhost

Build the binary from source:

bash
git clone https://github.com/vouch-protocol/vouch
cd vouch/go-sidecar
go build ./cmd/vouch-sidecar

Or via go install:

bash
go install github.com/vouch-protocol/vouch/go-sidecar/cmd/vouch-sidecar@latest

Run it locally with a placeholder DID. The sidecar binds to localhost only by default; no inbound firewall change is needed:

./vouch-sidecar --did did:web:localhost --port 8877

Optional flags:

  • --sensitive or -s - wrap the response in a JWE so the credential is encrypted in flight
  • --hybrid - use the post-quantum profile (an eddsa-jcs-2022 proof plus an mldsa44-jcs-2024 proof on the same credential)
  • --verbose - detailed startup logs

Step 2 - Sign a credential over localhost

Any language can sign by POSTing to the sidecar on 127.0.0.1:

curl -X POST http://localhost:8877/sign \
  -H 'Content-Type: application/json' \
  -d '{
    "subjectDid": "did:web:localhost",
    "intent": {
      "action": "submit_claim",
      "target": "claim:HC-001",
      "resource": "https://insurance.example.com/claims/HC-001"
    },
    "validSeconds": 300
  }'

The response is the full signed Verifiable Credential. Pipe it into your Python or TypeScript verifier (configured with trusted_roots / trustedRoots pointing at the sidecar's public key, fetched from GET http://localhost:8877/.well-known/did.json) to close the loop.

Step 3 - When you are ready to publish

Three things change when you graduate to production:

  1. Replace did:web:localhost with the DID anchored at your real domain.
  2. Run the sidecar on your service network (not localhost) and front it with mTLS or your platform's internal-call auth.
  3. Verifiers stop using trustedRoots and resolve the DID over HTTPS instead.

The signing code in your agent does not change. Only the URL the sidecar exposes and the DID string change.

Why a sidecar?

The Identity Sidecar pattern keeps the private signing key out of the LLM's process. The LLM emits a tool-call object; the orchestration layer (your Python or TypeScript code) asks the sidecar to sign on the agent's behalf; the sidecar returns a credential bound to the action.

This makes prompt-injection key-exfiltration impossible: even if the LLM is jailbroken to leak its context, the key is not in that context. The local-dev sidecar gives you the exact same isolation boundary on your laptop that you will have in production.

Guide

Swift Quickstart

Add the VouchCore Swift package and run a canonicalize-and-verify loop on iOS or macOS. A thin wrapper over the one Rust core.

Install

VouchCore ships through Swift Package Manager from its own repository, vouch-protocol/vouch-swift (SwiftPM resolves a package from the repository root). The native code is a prebuilt XCFramework hosted on the swift-v0.1.0 release, so you do not need a Mac toolchain to build the Rust core yourself.

In Xcode use File then Add Package Dependencies and paste https://github.com/vouch-protocol/vouch-swift.git, or add it to your Package.swift:

swift
.package(url: "https://github.com/vouch-protocol/vouch-swift", from: "0.1.0"),
// then depend on the product:
.product(name: "VouchCore", package: "vouch-swift"),

Supports iOS 13+ and macOS 12+.

VouchCore is listed on the Swift Package Index, where you can browse the generated documentation and the platform compatibility matrix.

Canonicalize and verify

Everything runs on device. The Vouch facade gathers the lower-level UniFFI functions behind a discoverable surface:

swift
import VouchCore

// RFC 8785 (JCS) canonicalization. Byte-identical to every other Vouch SDK.
let canon = try Vouch.canonicalize(#"{"b":1,"a":2}"#)   // {"a":2,"b":1}

// Verify a Data Integrity proof (eddsa-jcs-2022) on a signed credential.
let ok = try Vouch.verifyProof(signedCredentialJson, publicKey: publicKey)

// Proof plus validity window in one call.
let result = try Vouch.verify(signedCredentialJson, publicKey: publicKey, now: "2026-04-26T10:02:00Z")

Vouch.generateEd25519() returns a key pair and Vouch.sign(...) attaches the proof. VouchCore is a thin layer over the canonical Rust core via UniFFI, so a credential verified on iOS matches the exact bytes from every other SDK.

Guide

JVM (Java and Kotlin) Quickstart

One Gradle coordinate, then canonicalize and verify from Java or Kotlin over the shared Rust core.

Install

kotlin
// build.gradle.kts
dependencies { implementation("io.github.vouch-protocol:vouch-core:0.1.0") }

The host native library is bundled inside the jar, so it loads with no extra setup.

Java

The Vouch class is a thin JNA layer over the core's C ABI. Binary values are base64 strings; credentials and proofs are JSON strings:

java
import com.vouchprotocol.core.Vouch;

String canon = Vouch.canonicalize("{\"b\":1,\"a\":2}");   // {"a":2,"b":1}
String kp = Vouch.generateEd25519();                       // {seed_b64, public_b64, multikey, did_key}
String signed = Vouch.sign(credentialJson, seedB64, didKey + "#key-1", "2026-04-26T10:00:00Z");
boolean ok = Vouch.verifyProof(signed, publicB64);

Kotlin

Kotlin can call the same Java class, or use the generated UniFFI binding bundled in the module, which takes native ByteArray keys instead of base64. Both delegate to the canonical Rust core, so the JVM verifies with the exact same bytes as every other SDK.

Guide

.NET Quickstart

dotnet add package, then canonicalize and verify from C# over the shared Rust core.

Install

bash
dotnet add package VouchProtocol.Core

Canonicalize, sign, verify

The static Vouch class is a P/Invoke wrapper over the canonical Rust core. Binary values are base64 strings; credentials and proofs are JSON strings:

csharp
using VouchProtocol.Core;

string canon = Vouch.Canonicalize("{\"b\":1,\"a\":2}");   // {"a":2,"b":1}
string kp = Vouch.GenerateEd25519();
string signed = Vouch.Sign(credentialJson, seedB64, didKey + "#key-1", "2026-04-26T10:00:00Z");
bool ok = Vouch.VerifyProof(signed, publicB64);

On error the core returns null and the wrapper throws a VouchException; the native string is freed for you. .NET verifies with the exact same bytes as every other SDK.

Guide

C and C++ Quickstart

Link the C bindings shipped with the core. Every returned string is freed with vouch_string_free.

What you get

These are the C bindings shipped with the core, not a reimplementation. The canonical Rust core exposes a plain C ABI through a cbindgen header. The package gives you include/vouch_core.h, a prebuilt lib/libvouch_core_uniffi.so, an examples/example.c with a Makefile, and a CMakeLists.txt. Anything that can call C links against it, including C++ and .NET P/Invoke.

Build

bash
make run     # compiles example.c against ../lib and runs it
# flags: -I../include  -L../lib -lvouch_core_uniffi

Canonicalize and verify in C

Every value crossing the ABI is a NUL-terminated UTF-8 string: JSON for credentials and proofs, base64 for binary. Returned strings are heap allocated and must be freed with vouch_string_free. On error a function returns NULL and writes a message into err_out:

c
#include "vouch_core.h"

char *err = NULL;
char *canon = vouch_canonicalize("{\"b\":1,\"a\":2}", &err);   // {"a":2,"b":1}
vouch_string_free(canon);

char *res = vouch_verify_proof(signed_credential_json, public_key_b64, &err);  // "true"/"false"
if (res) vouch_string_free(res); else vouch_string_free(err);

The header also exposes vouch_sign, vouch_verify, delegation, dual-proof ML-DSA-44 verify, and BitstringStatusList revocation. A credential verified from C matches the exact bytes of every other SDK.

Guide

Browser and Node Quickstart (WebAssembly)

npm install the WASM core, initialize it once, then canonicalize and verify in the browser or Node.

Install

bash
npm install @vouch-protocol-official/core-wasm

This is the canonical Rust core compiled to WebAssembly. Binary values are base64 strings; credentials and proofs are JSON strings.

Browser

js
import init, * as core from '@vouch-protocol-official/core-wasm';
await init(); // fetches the .wasm next to the module

core.canonicalize('{"b":1,"a":2}');   // {"a":2,"b":1}
const kp = JSON.parse(core.generateEd25519());
const signed = core.sign(JSON.stringify(myCredential), kp.seed_b64, kp.did_key + '#key-1', '2026-04-26T10:00:00Z');
const ok = core.verifyProof(signed, kp.public_b64);   // true

Node.js (ESM)

There is no fetch in Node, so pass the wasm bytes to init. Key generation and ML-DSA signing also need a CSPRNG; under Node ESM make Web Crypto global first (verification does not need it):

js
import init, * as core from '@vouch-protocol-official/core-wasm';
import { readFileSync } from 'fs';
import { webcrypto } from 'node:crypto';
if (!globalThis.crypto) globalThis.crypto = webcrypto;
await init({ module_or_path: readFileSync(new URL('@vouch-protocol-official/core-wasm/vouch_core_wasm_bg.wasm', import.meta.url)) });

With Next.js App Router, call init() in a client component before using the API. The WASM build verifies with the exact same bytes as every other SDK.

Guide

The Agent Trust Index

An open benchmark that scans public AI agents and scores whether each one can prove its identity. The first sweep found 98.7 percent cannot.

What it is

The Agent Trust Index is an open benchmark. It scans public AI agents and scores a single question for each: can this agent prove who it is? Not whether it is good, safe, or useful, just whether it has a cryptographic identity (a did:web) that resolves to a document carrying a real public key. It measures adoption of provable identity in the wild, not a self-declared registry field.

The first sweep

The first sweep drew its agents from the public Model Context Protocol registry on 10 June 2026:

  • 11,680 unique agents scanned
  • 157 publish a resolvable did:web identity, about 1.3 percent
  • 98.7 percent cannot prove who they are at all
  • 69 of those 157 also carry a usable public key, a full grade A

The handful that can prove themselves are mostly finance and oracle agents, which fits: the agents that handle money are the first to bother with identity.

How scoring works

Each agent is scored out of 100: 60 points for a resolvable identity, 40 points for that identity carrying a usable public key. A is 90 or above, then B, C, D, and F below 40. An agent with nothing scores zero. The 88 agents that resolve a DID but carry no usable key land around a C.

How the extra signals are checked

vouch grade <domain> and the web grader also report post-quantum, revocation, and agent-card signals. Each is reported only when the evidence checks out, with a reason beside it (CLI text, and --json under signals.reasons).

  • Post-quantum: a well-formed ML-DSA-44 public key (1312 bytes) controlled by the DID and listed in assertionMethod.
  • Revocation: a BitstringStatusList service whose https endpoint returns a BitstringStatusListCredential issued by the same DID, inside its validity period, with a decodable encodedList and an eddsa-jcs-2022 proof that verifies against an assertionMethod key.
  • Agent card: verified when the card's vouchCredential is issued by the domain's DID, bound to the card URL, and verifies; declared when the card only names a DID; no otherwise.

The score stays 60 for the DID and 40 for the key. Fix lines say what was found. Fetches are https only, to public addresses, with redirects re-checked and size and time limits.

The full method is published at /agent-trust-index/methodology. The data is real and the scan is reproducible.

Part II

Identity & Signing

Manage your agent's identity and keys, sign with post-quantum crypto, and build delegation chains.

Guide

Managing DIDs and Keys

did:web vs did:key, where keys live, how to rotate.

did:web vs did:key

did:web resolves over HTTPS to a DID Document at https://{domain}/.well-known/did.json (or a path-based variant). Good for production agents owned by an organization; the domain anchors trust.

did:key contains the public key inside the identifier itself. Self-resolving, no infrastructure. Good for ephemeral or fully decentralized agents.

Both are well-established DID methods. Vouch supports both natively.

Key storage

The Python SDK uses your platform's secure key store by default (Keychain on macOS, DPAPI on Windows, secretstore on Linux). For server deployments, use the KMS abstraction at vouch/kms.py:

  • AWS KMS (via boto3)
  • GCP KMS (via google-cloud-kms)
  • Azure Key Vault
  • Local encrypted file with optional passphrase

Key rotation

vouch/kms.py exposes RotatingKeyProvider. Configure the rotation window:

python
from vouch.kms import RotatingKeyProvider, KeyConfig
from datetime import timedelta

provider = RotatingKeyProvider(
  backend="aws-kms",
  key_id="alias/vouch-agent",
  rotation_period=timedelta(days=90),
)

The DID Document publishes both the current and the previous keys during the overlap window, so in-flight credentials remain verifiable.

Guide

Signing with Post-Quantum Crypto

How to make your signatures safe today and ready for the day quantum computers break Ed25519.

Install dependencies

Python:

bash
pip install vouch-protocol

(pqcrypto is bundled by default. It provides ML-DSA-44 via the PQClean reference and ships prebuilt wheels for all mainstream Python + platform combinations, so no compiler is needed.)

TypeScript:

bash
npm install @noble/post-quantum

Go:

The Cloudflare circl dependency is already transitive in the sidecar.

Sign

Python:

python
from vouch import Signer, generate_identity

keys = generate_identity("agent.example.com")
signer = Signer(private_key=keys.private_key_jwk, did=keys.did)
signed = signer.sign_hybrid(intent={
    "action": "submit_claim", "target": "claim:HC-001",
    "resource": "https://insurance.example.com/claims/HC-001",
})

TypeScript:

ts
import { Signer } from '@vouch-protocol-official/sdk';

const signer = await Signer.fromDidWithHybrid('did:web:agent.example.com');
const signed = await signer.signHybrid(credential);

Go sidecar: pass --hybrid when starting the daemon.

What the wire format looks like

The credential's proof field is an array of two Data Integrity proofs:

json
{
  "proof": [
    {
      "type": "DataIntegrityProof",
      "cryptosuite": "eddsa-jcs-2022",
      "verificationMethod": "did:web:agent.example.com#key-ed25519",
      "proofPurpose": "assertionMethod",
      "proofValue": "z<base58btc(ed25519_sig)>"
    },
    {
      "type": "DataIntegrityProof",
      "cryptosuite": "mldsa44-jcs-2024",
      "verificationMethod": "did:web:agent.example.com#key-mldsa44",
      "proofPurpose": "assertionMethod",
      "proofValue": "u<base64url-nopad(mldsa44_sig)>"
    }
  ]
}

This is a Data Integrity proof set. Each proof is computed over the same document with only its own proof configuration, so each proof verifies on its own, and both must verify for the credential to be accepted.

Note the proof value encodings: eddsa-jcs-2022 uses base58btc multibase (the value starts with z), and mldsa44-jcs-2024 uses base64url-nopad multibase (the value starts with u), the encoding the W3C Quantum-Resistant Cryptosuites specification defines. Decode by the multibase prefix.

Credentials issued before this alignment keep verifying. The earlier mldsa44-jcs-2026 identifier and the earlier composite hybrid-eddsa-mldsa44-jcs-2026 proof, whose single proofValue concatenated the two signatures, are both accepted on verification.

Verifier modes

  • Classical-only verifier iterates the proof array and validates the eddsa-jcs-2022 proof. Useful for a verifier that does not yet support ML-DSA-44, and it stays correct because that proof stands on its own.
  • Post-quantum-only verifier validates the mldsa44-jcs-2024 proof the same way.
  • Vouch Protocol verification validates both proofs in the set and accepts the credential when both pass.

In Python, vouch.verify(credential, mldsa44_public_key=...) verifies the whole proof set. If you leave the key out and the issuer's DID document does not publish one, verification raises MissingMLDSA44KeyError. In TypeScript, pass mldsa44PublicKey to Verifier.verify.

DID Document layout

An agent using the post-quantum profile publishes both keys in its DID Document:

json
{
  "id": "did:web:agent.example.com",
  "verificationMethod": [
    { "id": "...#key-ed25519", "type": "Multikey", "publicKeyMultibase": "z6Mk..." },
    { "id": "...#key-mldsa44", "type": "Multikey", "publicKeyMultibase": "z87..." }
  ]
}

The verifier picks the appropriate verification method based on the credential's cryptosuite.

Size and performance

PropertyEd25519 onlyPost-quantum proof set
Signature size64 bytes2,484 bytes
Credential size (typical)~700 B~3.2 KB
Sign time (M2)~50µs~3ms
Verify time (M2)~150µs~3ms

Credentials carrying the proof set exceed typical HTTP header size limits, so transmit them in the request body (Specification §13.4).

Guide

Building Permission Chains

When a human delegates to an agent that delegates to a sub-agent: how to track each step cryptographically.

Why chains

When a human principal delegates to an agent that delegates to a sub-agent, you need a verifiable audit trail. The delegation chain answers: who authorized this action, and what was the scope at each step?

See it in the browser: the interactive demos show a delegation chain whose caveats block an out-of-envelope action two hops down, and an irreversible action you can veto during a challenge window.

Three rules

  1. Each link is a signed Vouch credential where the issuer is the subject of the previous link.
  2. No link may be broader than the previous one on action, target, resource, time, rate, or policy. You cannot delegate authority you do not have.
  3. The chain must terminate at a principal (typically a human, or a system root).

Build a chain in Python

Each credential chains under its parent with parent_credential=, which appends a delegation link and enforces resource narrowing automatically:

python
from vouch import Signer

principal = Signer(private_key=principal_priv_jwk, did="did:web:principal.example.com")
agent = Signer(private_key=agent_priv_jwk, did="did:web:agent.example.com")
sub_agent = Signer(private_key=sub_agent_priv_jwk, did="did:web:sub-agent.example.com")

# Principal delegates broad authority to the agent.
principal_link = principal.sign(
  intent={"action": "*", "target": "*", "resource": "claims"},
  valid_seconds=3600,
)

# Agent narrows and re-delegates to the sub-agent.
agent_link = agent.sign(
  intent={"action": "read", "target": "claim:HC-001", "resource": "claims/HC-001"},
  valid_seconds=300,
  parent_credential=principal_link,
)

# Sub-agent signs its actual action under the chain.
action = sub_agent.sign(
  intent={"action": "read", "target": "claim:HC-001", "resource": "claims/HC-001"},
  valid_seconds=60,
  parent_credential=agent_link,
)

For the one-line path, the principal can issue the grant with vouch.delegate(..., to=agent_did) and the agent's tools can be wrapped with vouch.protect([...], parent=grant). A child credential can only be issued by the delegate its grant names, and only within the grant.

Verify

python
import vouch

ok, passport = vouch.verify(action)

Each link carries the signed grant it came from. The verifier checks every grant's signature, that it names the next delegate, that it is current, and that no step is broader than the one before it. Numeric limits narrow by name: a max* limit can only be lowered and a min* limit can only be raised, and policy.maxSpend caps the amount of every action under the grant. A dimension a link leaves out is inherited from its parent. For grantors that are not did:key, pass trusted_roots= or key_resolver=.

Guide

One Identity Across Your Devices

Use the same identity on many devices without ever copying your private key: per-device keys, delegation, revocation, and recovery.

The idea

Each device makes its own key and keeps it local. Your root identity signs a scoped permission slip (a delegation grant) for each device. A verifier ties any device's action back to your trusted root. Lose a device and you revoke it; lose all of them and you rebuild the root from recovery shares. What moves between devices is authority, never key material.

See it in the browser: the interactive demos show a device acting on a delegated grant, getting revoked, and a root rebuilt from a threshold of Shamir shares.

Enroll a device

Each device mints its own key. The root delegates a scope to that device's DID.

python
from vouch import Agent, enroll_device

root = Agent("alice.example")
trusted_roots = {root.did: root.public_key_jwk}

phone = Agent()  # a did:key minted on the phone
grant = enroll_device(
    root,
    device_did=phone.did,
    action="charge",
    target="api.bank",
    resource="https://api.bank/invoices",
)

Sign and verify

The device signs with its own key, chained under the grant. A verifier checks the whole chain back to the trusted root.

python
from vouch import verify_delegated_chain

action = phone.sign(
    action="charge", target="api.bank",
    resource="https://api.bank/invoices/42", parent_credential=grant,
)
result = verify_delegated_chain([grant, action], trusted_roots=trusted_roots)
assert result.ok

Revoke a lost device

Track devices with a DeviceRegistry and revoke one when it is lost. Its actions stop verifying; other devices are unaffected.

python
from vouch import DeviceRegistry

registry = DeviceRegistry()
registry.enroll(phone.did, grant)
registry.revoke(phone.did)

result = verify_delegated_chain(
    [grant, action], trusted_roots=trusted_roots, revoked=registry.is_revoked
)
assert not result.ok

Recover the root

Split the root into shares so any threshold rebuild it. Distribute the shares to guardians or separate locations. Fewer than the threshold reveal nothing.

python
from vouch import split_identity, recover_identity, Signer

# Splitting needs the root's key, so create the root with allow_key_export=True.
root = Agent("alice.example", allow_key_export=True)
shares = split_identity(root, threshold=2, shares=3)

recovered = recover_identity([shares[0], shares[2]], did=root.did)
signer = Signer.from_keypair(recovered)

Every SDK (Python, TypeScript, Go, JVM, .NET, C, Swift) exposes the same helpers. See the runnable example in examples/cross_device_identity.py.

Guide

Threshold Signing With Multiple Custodians (FROST)

Split a signing key among several custodians so any threshold of them can sign together, with the full key never existing whole.

The idea

FROST(Ed25519) threshold signing splits a key among several custodians so that any threshold of them can produce a signature together, without the full private key ever existing whole at any point, not even during signing. The result is a standard Ed25519 signature, so it verifies exactly like any other Vouch credential. Every SDK (Python, TypeScript, Go, JVM, .NET, C, Swift) binds the same audited frost-ed25519 core (the Zcash Foundation's RFC 9591 implementation), so every language produces byte-identical results from one implementation.

This is distinct from root-identity recovery above: recovery reconstructs a key once, for a deliberate restore. Threshold signing never reconstructs the key at all, and is meant for live, repeated signing.

See it in the browser: the interactive demo shows any threshold of custodians signing together, with the same signature verifying regardless of who signed.

Generate a threshold identity

A dealer mints max_signers key shares and a group public key, such that any min_signers of them can sign together. This mints a fresh threshold-native identity; it does not convert an existing single-key Ed25519 identity into one.

python
from vouch import threshold

generated = threshold.generate_key(min_signers=2, max_signers=3)
# generated.shares: distribute one KeyShare to each custodian
# generated.group_public_key: the identity's public key

Sign with a threshold of custodians

ThresholdSigner runs the full commit / sign-share / aggregate ceremony in one call, for a coordinator that holds enough shares to sign. Pass it straight to Signer.from_backend and the rest of the Signer, and every verifier, stays unaware a threshold ceremony produced the signature.

python
from vouch import Signer, ThresholdSigner

threshold_signer = ThresholdSigner(generated.shares[:2], generated.group_public_key)

signer = Signer.from_backend(
    did="did:web:agent.example",
    public_key=generated.group_public_key.public_key_jwk,
    sign=threshold_signer.sign,
)
credential = signer.sign(action="read", target="t", resource="https://x/y")

Verify

Nothing changes on the verifying side. The aggregated signature is a standard Ed25519 signature, so any Vouch verifier checks it exactly like a single-key credential:

python
from vouch import Verifier

valid, _ = Verifier.verify(credential, public_key=generated.group_public_key.public_key_jwk)
assert valid

A true multi-device ceremony, where custodians never share a coordinator process, calls threshold.commit, threshold.sign_share, and threshold.aggregate directly on each device, passing commitments and shares over the network instead of holding every share in one ThresholdSigner.

Guide

Anchoring Identity to a Root of Trust

Make Vouch Protocol the authority for agent identity: pin one root, recognize issuers, and verify any agent by walking a short chain back to the root.

Why a root of trust

A self-issued Vouch Protocol credential anchors to whatever the agent claims about itself: a domain with did:web, or a public key with did:key. That proves the same key signed, but it does not say who stands behind the agent, what model it runs, or who owns it.

The Root of Trust layer adds that authority. A verifier pins one root up front. The root recognizes issuers. A recognized issuer binds an agent's DID to real attributes. A verifier then confirms any agent by walking a short chain back to the single root it already trusts, with no external certificate authority and no central per-agent lookup.

Your agent's own vouch init identity is unchanged. This is an additive layer; reach for it when a verifier wants identities backed by a named authority.

The three credentials

All three are ordinary Verifiable Credentials with the same eddsa-jcs-2022 proof used everywhere else in Vouch Protocol.

  1. Root of Trust (VouchRootOfTrust): self-issued by the root, so it describes itself. The verifier pins the root DID.
  2. Recognized-issuer (RecognizedIssuerCredential): issued by the root. Names an issuer, its recognizedActions (issueAgentIdentity, issueRobotIdentity), and a recognizedIn pointer back to the root.
  3. Agent identity (AgentIdentityCredential): issued by a recognized issuer, where the issuer differs from the subject. Binds the agent's DID to attributes (owner, model, capability class).

Build a chain in Python

python
from vouch.root_of_trust import (
  generate_did_key_identity, build_root_of_trust,
  build_recognized_issuer, build_agent_identity, verify_identity_chain,
)
from vouch import Signer

# Stand up a root (self-issued).
root_keys = generate_did_key_identity()
root = Signer.from_keypair(root_keys)
root_cred = build_root_of_trust(root, name="Example Machine Identity Root")

# The root recognizes an issuer.
issuer_keys = generate_did_key_identity()
issuer = Signer.from_keypair(issuer_keys)
recognized = build_recognized_issuer(
  root, issuer_did=issuer.did, recognized_actions=["issueAgentIdentity"],
)

# The recognized issuer vouches for an agent's identity.
agent_keys = generate_did_key_identity()
identity = build_agent_identity(
  issuer, subject_did=agent_keys.did,
  attributes={"owner": "Example Inc.", "model": "claims-assistant-2",
              "capabilityClass": "financial-read"},
)

Verify against the pinned root

python
result = verify_identity_chain(
  identity, recognized,
  trusted_root=root.did,        # the ONE DID this verifier trusts
  root_credential=root_cred,    # optional self-consistency check
)
assert result.ok
print(result.agent_did, result.issuer_did, result.root_did)
print(result.attributes)

The walk confirms the recognition is signed by the pinned root and grants the required action, then that the identity is signed by that recognized issuer. Pass an action_credential too and it also confirms the agent signed its own action. On failure the result carries a structured reason showing which link broke.

Offline and revocation

When the root, issuer, and agent all use did:key, the whole chain verifies with no network, since each did:key carries its public key in the identifier. For did:web issuers, resolve keys over the network or pin them ahead of time.

Both the recognized-issuer and identity credentials accept an optional credentialStatus (BitstringStatusList). Revoke a recognized issuer to withdraw its authority to vouch for new agents; revoke a single identity to retire one agent. The verifier checks the status during the walk.

From the command line

Four subcommands drive the lifecycle:

  • vouch root init self-issues a root and mints its key.
  • vouch root recognize issues a recognized-issuer credential.
  • vouch root issue-identity issues an agent identity as a recognized issuer.
  • vouch root verify-chain walks an agent identity back to a pinned root.

Anyone can run vouch root init and publish the root DID for verifiers to pin. The layer ships in Python, TypeScript, Rust, and Go with a byte-identical wire format, so a chain can span languages and still verify.

Enroll once, then verify against a root

For the everyday case, two commands wrap the whole flow so verifying an action also verifies the agent identity behind it, not the action alone.

vouch agent enroll is the local self-host path: a recognized issuer you hold attests an agent DID and writes a portable identity bundle to a file. A bundle staples together the pieces a verifier needs, the agent identity credential, the recognized-issuer credential that proves the issuer is recognized by a root, and optionally an action credential, so you can hand off a single file.

bash
# Attest an agent DID and write a bundle. The issuer must already hold a
# recognition (from 'vouch root recognize') proving a root recognizes it.
vouch agent enroll \
  --agent-did did:key:z6MkAgent... \
  --attr owner="Example Inc." --attr model=claims-assistant-2 \
  --recognition recognition.json \
  --out identity-bundle.json

# Omit --agent-did to mint a fresh did:key agent identity on the spot.

vouch agent verify pins one root DID and checks the whole bundle against it, offline for did:key:

bash
vouch agent verify --bundle identity-bundle.json --root did:key:z6MkRoot...
# The root DID can also come from the VOUCH_TRUSTED_ROOT environment variable.

Under the hood build_identity_bundle packages the pieces and verify_bundle verifies them, so one check confirms the agent identity against the pinned root as well as any bundled action.

Part III

Production Deployment

How to run Vouch reliably at scale: the sidecar, your KMS, revocation registries, metrics, rate limits.

Guide

Deploying the Vouch Sidecar

Run the Vouch signing daemon in production: container, key provisioning, health checks, scaling.

Build container

The Go binary is statically linked; you can put it in a scratch image.

dockerfile
FROM golang:1.22 AS build
WORKDIR /src
COPY . .
RUN go build -o /vouch-sidecar ./go-sidecar/cmd/vouch-sidecar

FROM scratch
COPY --from=build /vouch-sidecar /vouch-sidecar
ENTRYPOINT ["/vouch-sidecar"]

Key provisioning

Three options in order of recommendation:

  1. Cloud KMS - mount KMS credentials, configure the sidecar with the key alias
  2. Init container - provision keys via Vault or AWS Secrets Manager, write to a tmpfs volume
  3. Direct env var - acceptable for development only

Health check

GET /health returns 200 OK with a JSON body indicating ready state and last successful signature.

Observability

The sidecar emits structured JSON logs on stdout. For metrics, run it alongside the Python verifier's Prometheus exporter, or use the OpenTelemetry exporter (--otel-endpoint) for distributed tracing.

Scaling

The sidecar is stateless. Horizontally scale by running multiple instances behind a load balancer. Each instance needs access to the same KMS key (or its own replica of the agent's key for hot-standby).

Guide

Connecting Your KMS

How to keep production signing keys in AWS, GCP, Azure, or an encrypted local file.

AWS KMS

python
from vouch.kms import RotatingKeyProvider

provider = RotatingKeyProvider(
  backend="aws-kms",
  key_id="alias/vouch-agent-prod",
  region="us-east-1",
)

Requires boto3 and IAM permissions kms:Sign and kms:GetPublicKey on the key.

GCP KMS

python
provider = RotatingKeyProvider(
  backend="gcp-kms",
  key_id="projects/my-proj/locations/global/keyRings/vouch/cryptoKeys/agent",
)

Requires google-cloud-kms and the roles/cloudkms.signer IAM role.

Azure Key Vault

python
provider = RotatingKeyProvider(
  backend="azure-kv",
  key_id="https://vouch-kv.vault.azure.net/keys/agent/abc123",
)

Requires azure-keyvault-keys and the Key Vault Crypto Officer role.

Local file (development only)

python
provider = RotatingKeyProvider(
  backend="local-file",
  key_id="/etc/vouch/agent.jwk",
  passphrase=os.environ["VOUCH_KEY_PASSPHRASE"],
)
Guide

Tracking Agent Reputation

How to score, decay, and slash reputations across a fleet of agents using Memory, Redis, or Kafka.

What the engine does

vouch/reputation.py (711 lines) tracks an integer reputation score per DID. The score is shaped by:

  • Action deltas: success +1, failure -2, slash and boost configurable
  • Exponential decay toward baseline (default base=50, rate 0.1/day, kicks in after 7 days of inactivity)
  • Tier classification:
  • - exceptional for score ≥ 90
  • - trusted for ≥ 75
  • - neutral for ≥ 50
  • - cautionary for ≥ 25
  • - untrusted otherwise

Memory backend (dev)

python
from vouch.reputation import ReputationEngine, MemoryReputationStore

engine = ReputationEngine(store=MemoryReputationStore())

Redis backend (single-region production)

python
from vouch.reputation import RedisReputationStore
engine = ReputationEngine(store=RedisReputationStore(url="redis://prod:6379/0"))

Kafka backend (event-sourced)

python
from vouch.reputation import KafkaReputationStore
engine = ReputationEngine(store=KafkaReputationStore(
  bootstrap_servers="kafka:9092",
  topic="vouch-reputation-events",
))

Reputation events are appended to the topic. Downstream services can replay the topic to reconstruct state, derive analytics, or feed into a downstream auditor.

HTTP backend (cross-org)

python
from vouch.reputation import HTTPReputationStore
engine = ReputationEngine(store=HTTPReputationStore(
  base_url="https://reputation.consortium.example/v1",
  api_key=os.environ["REPUTATION_API_KEY"],
))

For consortium deployments where reputation is shared across organizations.

Scope note

The Specification says specific reputation scoring algorithms are non-normative; the shipped engine is a reference implementation. Implementers MAY swap in their own algorithm by implementing the ReputationStoreInterface.

Guide

Proving an Agent Track Record

Commit a verdict before its outcome, settle it later, and get a record that cannot be backdated or cherry-picked.

What it is

Identity proves who acted. Outcome evidence proves that an agent's verdict, prediction, or recommendation was fixed before its result was known, so a track record cannot be backdated or cherry-picked. It ships as vouch.accountability.

Two credential types:

  • OutcomeCommitmentCredential: the call, committed and signed before the outcome. It carries a salted SHA-256 digest of the claim, so the call can stay private until settlement yet is provably fixed.
  • OutcomeAttestationCredential: the settlement, signed by whoever observed the result, which can be a neutral third party. It reveals the call and binds the real outcome back to the commitment.

Commit the verdict before the outcome

python
from vouch import Signer, generate_identity
from vouch.accountability import commit_outcome, verify_commitment

keys = generate_identity("agent.example.com")
agent = Signer(private_key=keys.private_key_jwk, did=keys.did)

commitment, secret = commit_outcome(
    agent,
    claim={"asset": "XYZ", "direction": "up", "horizon": "2026-07-01"},
    settlement={
        "method": "market-settlement",
        "locator": "https://example.com/markets/42",
        "resolutionCriteria": "settled price at expiry versus strike",
    },
    private=True,  # publish only the digest; keep secret to settle later
)

Keep secret (the call and its salt). You need it to settle a private commitment.

Settle it once the result is known

python
from vouch.accountability import attest_outcome, verify_attestation

attestation = attest_outcome(
    settler,  # a Signer; can be a neutral third party
    commitment=commitment,
    outcome={"result": "up", "evidence": "https://example.com/markets/42/settle"},
    secret=secret,
    matches=True,
)

ok, subject = verify_attestation(
    attestation,
    settler_keys.public_key_jwk,
    commitment=commitment,
    committer_public_key=agent_keys.public_key_jwk,
)

Verification recomputes the fingerprint from the revealed call, confirms it matches the commitment, and rejects any settlement timestamped before the commitment. A winning call cannot be minted with hindsight, and a losing one is a visible gap rather than a silent absence.

Where it sits

This is the per-verdict evidence layer underneath reputation. Vouch reputation aggregates settled attestations and other signed receipts into a score anyone can recompute, covered in Evidence-Backed Reputation below. Full demo: python examples/accountability_demo.py. Defensive disclosure: PAD-071.

Guide

Evidence-Backed Reputation

Compute an agent reputation from signed receipts with a public function, so anyone can recompute it instead of trusting a server.

What it is

Reputation is a verifiable aggregate of signed, interaction-bound receipts, keyed to the agent DID and computed by a public deterministic function. A consumer trusts the signatures and the math, not a server's stored number.

The signals (objective first)

The relying party the agent acted on signs the result of an action (a StateReceipt), a settled prediction signs whether it came true (an OutcomeAttestationCredential), and an authority signs a violation (a PenaltyReceipt). A human ReviewCredential counts only when bound to proof the rater used the agent, and carries low weight.

How it works

A ReputationLedger verifies each receipt before admitting it and keeps them in a Merkle log, so a consumer can recompute the score from the receipts and inclusion proofs rather than trust the registry signed snapshot. evaluate_reputation gates a decision against a policy of minimum composite, per-dimension minimums, and freshness. build_reputation_proof proves the agent clears a threshold without revealing its score, and apply_resolution drops a receipt an arbiter has ruled invalid.

Demo

Run python examples/reputation_demo.py for the full path: receipts to ledger to signed snapshot to policy gate to threshold proof to dispute. The formats and the aggregation function are open; a hosted registry is a separate commercial layer.

Guide

Revoking an Entire Agent

When a key is compromised or an agent is decommissioned: invalidate every credential it ever signed in one operation.

When to use DID-level revocation

DID-level revocation invalidates all credentials ever issued under a given DID. Use it when:

  • A signing key is suspected compromised
  • An agent is being decommissioned
  • An organizational principal needs to break the entire chain of credentials it ever authorized

For revoking individual credentials without affecting the rest of an agent's history, use BitstringStatusList instead (see Credential Status). The two mechanisms compose: many production deployments run both.

Backends

Memory and Redis ship today. The RevocationStoreInterface is abstract so custom backends (HTTP remote registries, distributed key-value stores) are straightforward.

python
from vouch.revocation import RevocationRegistry, RedisRevocationStore

registry = RevocationRegistry(store=RedisRevocationStore(url="redis://prod:6379/1"))

# Revoke a DID
await registry.revoke(
  did="did:web:compromised-agent.example.com",
  reason="key_compromise",
  revoked_by="did:web:security-team.example.com",
)

# Check status
is_revoked = await registry.is_revoked("did:web:compromised-agent.example.com")

How the verifier uses it

The verifier consults the revocation registry on every verification. If the issuing DID is revoked, the credential fails with reason issuer_revoked. Cache TTL is configurable (default 60 seconds) to balance freshness with verifier throughput.

Guide

Revoking Individual Credentials

How to revoke or suspend a single credential without invalidating everything else the agent ever signed.

What this gives you

BitstringStatusList (vc-bitstring-status-list) lets an issuer revoke or suspend an individual credential without invalidating other credentials issued by the same DID. It's the right tool when one specific action needs to be retracted but the rest of the agent's history should remain valid.

Vouch ships a cross-language reference implementation:

  • Python: vouch.status_list and vouch.status_list_fetcher
  • TypeScript: @vouch-protocol-official/sdk exports StatusList, buildStatusListCredential, buildStatusListEntry, verifyStatus
  • Go: go-sidecar/signer exports StatusList, BuildStatusListCredential, BuildStatusListEntry, VerifyStatus

All three share a single canonical encoding (gzip + base64url multibase, 131,072-bit minimum bitstring) and a cross-language test vector at test-vectors/bitstring-status-list/.

Issuer flow

The issuer maintains one or more StatusList instances (one per status purpose; typically one for revocation and optionally one for suspension). Each new credential is assigned the next available bit index in the list. To revoke a credential, the issuer flips its bit, re-signs the BitstringStatusListCredential, and republishes it at its stable URL.

python
from vouch import (
  Signer, StatusList, FilesystemStatusListStore,
  build_status_list_credential, build_status_list_entry,
  generate_identity,
)

# Load or create the status list. Persisted state survives restarts.
store = FilesystemStatusListStore("/var/lib/vouch/status-1.json")
try:
  status_list = store.load()
except FileNotFoundError:
  status_list = StatusList(status_list_id="https://issuer.example/status/1")

keys = generate_identity("issuer.example")
signer = Signer(private_key=keys.private_key_jwk, did=keys.did)

# ---- Issue a credential with a credentialStatus entry ----
index = status_list.allocate_index()
store.save(status_list) # persist the new cursor

# Pass the status entry to sign so the proof covers it.
signed_credential = signer.sign(
  intent={"action": "submit_claim", "target": "claim:HC-001",
      "resource": "https://insurance.example/claims/HC-001"},
  credential_status=build_status_list_entry(
    status_list_credential="https://issuer.example/status/1",
    status_list_index=index,
  ),
)

# ---- Later, revoke that credential ----
status_list.revoke(index)
store.save(status_list)

# Re-sign and republish the status list credential at its stable URL.
status_credential = build_status_list_credential(
  issuer_did="did:web:issuer.example",
  status_list=status_list,
)
signed_status_credential = signer.sign(status_credential)

Verifier flow

Verifiers fetch the published status list credential and look up the credential's bit. The StatusListFetcher provides an in-memory TTL cache, conditional GETs, and HTTPS enforcement.

python
from vouch import StatusListFetcher, verify_status

fetcher = StatusListFetcher(cache_ttl_seconds=300)

status_credential = fetcher.get(
  signed_credential["credentialStatus"]["statusListCredential"]
)

is_revoked = verify_status(
  credential_status=signed_credential["credentialStatus"],
  status_list_credential=status_credential,
)

On verification failure, set force_refresh=True so the verifier bypasses cached state and picks up the latest list. This is the recommended way to handle stale caches.

Why persistence matters

StatusList keeps two pieces of state: the bitstring (which bits are set) and the allocation cursor (next_index, the next unused index). The bitstring is recoverable from the published encodedList, but the cursor is NOT. Without persisting the cursor, an issuer restart would re-allocate already-used indices and silently overwrite prior revocations.

to_state_dict() returns a JSON-serializable dict carrying both:

json
{
 "version": 1,
 "status_list_id": "https://issuer.example/status/1",
 "status_purpose": "revocation",
 "length": 131072,
 "next_index": 1024,
 "encoded_list": "uH4sIAAAAAAAC_-3Z..."
}

FilesystemStatusListStore is a reference store with atomic writes (temp file + rename). For production, swap in Redis (SET status:1 <state-json>), Postgres (one row, UPDATE under SELECT FOR UPDATE), or S3 (with ETag-based optimistic concurrency). The state-dict API is backend-agnostic.

TypeScript and Go

The TypeScript and Go APIs mirror Python. Examples:

typescript
import {
  StatusList, buildStatusListCredential, buildStatusListEntry,
  verifyStatus, buildVouchCredential,
} from '@vouch-protocol-official/sdk';

const statusList = new StatusList({ statusListId: 'https://issuer.example/status/1' });
const index = statusList.allocateIndex();

const credential = buildVouchCredential({
  issuerDid: 'did:web:issuer.example',
  intent: { action: 'submit_claim', target: 'claim:HC-001',
       resource: 'https://insurance.example/claims/HC-001' },
  credentialStatus: buildStatusListEntry({
    statusListCredential: 'https://issuer.example/status/1',
    statusListIndex: index,
  }),
});
go
import "github.com/vouch-protocol/vouch/go-sidecar/signer"

sl, _ := signer.NewStatusList("https://issuer.example/status/1", "", 0)
idx, _ := sl.AllocateIndex()

entry, _ := signer.BuildStatusListEntry(signer.BuildStatusListEntryOptions{
  StatusListCredential: "https://issuer.example/status/1",
  StatusListIndex:   idx,
})

// Pass via SignOptions.CredentialStatus to Signer.Sign.

TypeScript and Go callers fetch the published status credential using their platform's HTTP client (fetch() / net/http.Get()) and call verifyStatus / VerifyStatus with the result.

Cross-language interop

Python and TypeScript produce byte-identical encoded output (both use zlib's DEFLATE encoder). Go's compress/flate produces a valid DEFLATE stream that decodes to the same bitstring; BitstringStatusList §4.2 requires equivalence of the decompressed bitstring, not the gzip envelope, so all three implementations interop cleanly. The canonical test vector at test-vectors/bitstring-status-list/vector.json is exercised by all three test suites.

Sizing

The protocol minimum bitstring length is 131,072 bits (16 KiB uncompressed; ~50 bytes compressed when empty). That holds 131,072 credentials per status list. For larger issuers, allocate a new status list as you approach exhaustion; the credentialStatus.statusListCredential URL on each credential identifies which list it belongs to.

Composition with DID-level revocation

BitstringStatusList and the DID-level revocation registry (vouch.revocation) compose cleanly:

  • DID-level: "this entire identity is compromised, kill everything." One operation, instant blanket effect.
  • Credential-level (BitstringStatusList): "this specific action was retracted, but the rest of this identity's history remains valid." Surgical.

A verifier that runs both consults the DID registry first (cheap), then the status list (HTTP fetch, cached). If either returns "revoked," the credential is rejected with a specific reason code.

Guide

Metrics & Observability

What Vouch emits to Prometheus and OpenTelemetry, plus what is worth alerting on.

Prometheus metrics

vouch/metrics.py exposes:

vouch_signatures_total      counter
vouch_verifications_total     counter
vouch_verification_success_rate  gauge
vouch_verification_latency_seconds histogram
vouch_cache_hits         counter
vouch_cache_misses        counter
vouch_credential_issuances    counter
vouch_reputation_lookups     counter
vouch_revocation_checks      counter

Mount the exporter on /metrics of your verifier service.

OpenTelemetry

Install the OTel extra:

bash
pip install 'vouch-protocol[otel]'

Then point at your collector via OTEL_EXPORTER_OTLP_ENDPOINT. Verifier spans include credential ID, DID, and outcome.

What to alert on

  • vouch_verification_success_rate dropping below 0.99 over a 5-minute window
  • vouch_verification_latency_seconds p99 exceeding your SLO (typical: 50ms with caching)
  • vouch_revocation_checks increasing without a corresponding rise in vouch_verifications_total (suggests a verifier loop is consulting the registry inefficiently)
Part IV

Framework Integrations

Wire Vouch into the framework you already use, or into your GitHub workflow.

Guide

Which AI Frameworks Vouch Plugs Into

Ready-made integrations for LangChain, LangGraph, CrewAI, Goose, AutoGPT, AutoGen, MCP, Vertex AI, and more.

Python integrations

All under vouch/integrations/:

FrameworkFileWhat it does
LangChainlangchain/tool.pyWraps a LangChain Tool so its inputs are signed before execution
LangGraphlanggraph.pySigns LangGraph tool calls and graph nodes across a graph
CrewAIcrewai/tool.pySame pattern for crew-style multi-agent flows
AutoGPTautogpt/commands.pyCommand integration for AutoGPT plugins
AutoGenautogen/tool.pyTool wrapper for AutoGen conversational agents
Streamlitstreamlit/seal.pyMedia-sealing UI helper for Streamlit apps
Vertex AIvertex_ai/tool.pyGoogle Vertex AI tool integration
Google ADKadk.pyAgent Development Kit integration
Google APIsgoogle.pyGeneric Sheets/Docs/Drive integration
n8nn8n.pyn8n workflow automation node
Hasurahasura/webhook.pyGraphQL webhook handler
MCPmcp/server.pyReference Model Context Protocol server
Goosegoose.pyRegisters the Vouch MCP server as an extension for Block's Goose agent
Amnesiaamnesia.pyWraps an Amnesia egress decision in a Verifiable Credential for a replayable audit trail

End-to-end examples are at examples/05_integrations/.

Standalone framework packages (new in v1.6.2)

Installable on their own, so the framework adapters no longer need the full SDK import path:

PackageInstallWhat it does
vouch-langchainpip install vouch-langchainA LangChain tool that signs each tool call before it leaves the agent
vouch-crewaipip install vouch-crewaiA CrewAI tool with supervisor-to-worker delegation that can only narrow authority
vouch-a2apip install vouch-a2aBinds an A2A (Agent2Agent) Agent Card to a Vouch identity so two agents can verify each other
vouch-openaipip install vouch-openaiSigns the tool calls an OpenAI agent makes, across the OpenAI SDK function calling (Chat Completions and the Responses API) and the OpenAI Agents SDK
vouch-mlflowpip install vouch-mlflowSigns an MLflow model artifact at registration time, bound to its content digest
vouch-safetensorspip install vouch-safetensorsEmbeds a credential in a .safetensors header, complementary to OpenSSF Model Signing

Each issues a verifiable credential per call, with optional delegation back to a human principal. The vouch-mcp server ships alongside them (see below).

TypeScript integrations

Currently one: packages/sdk-ts/src/integrations/amnesia.ts for the Amnesia egress-decision bridge.

Vouch Shield

Shield is the policy layer that decides whether a call may run. It ships inside the SDK in both languages, and a Vouch-protected MCP server consults it before running a tool. See the Shield guide below.

No framework? Use the standalone packages

The framework adapters above are conveniences, not requirements. If you are not on one of these frameworks, integrate Vouch directly.

The signing and verification core ships as an installable package in every major language: pip install vouch-protocol, npm i @vouch-protocol-official/sdk, plus Rust (vouch-core), JVM (io.github.vouch-protocol:vouch-core), .NET (VouchProtocol.Core), Swift (VouchCore), C, and WebAssembly. See the Tools page for the full list and install commands.

For a language-agnostic drop-in, three standalone services need no framework and no SDK:

  • `vouch-mcp` a Model Context Protocol server any MCP client (Claude Desktop, Cursor, any agent) can call to sign and verify credentials, scan for leaked keys, decode DIDs, delegate authority, gate actions, check trust, disclose AI origin, and score reputation.
  • `vouch-bridge` an HTTP server for media provenance: C2PA image signing, QR badge overlay, and audio watermarking.
  • `vouch-sidecar` the Go signing daemon that mints credentials over localhost for any language, keeping the key out of the model's process.
Guide

The Vouch Gatekeeper GitHub App

Block unsigned commits and enforce your team policy on every pull request, with one click to install.

What it does

Vouch Gatekeeper listens for pull_request.opened and pull_request.synchronize events. For each PR, it verifies commit signatures with GitHub's SSH/GPG infrastructure first, and falls back to the Vouch Registry if a commit is not signed via those mechanisms.

Zero-config policy

Org member with a signed commit = allow. That is the default; no configuration needed.

Custom policy

Add .github/vouch-policy.yml to your repo:

yaml
allowlist:
  - did:web:alice.example.com
  - did:key:z6Mk...
blocklist: []
require_signed_commits: true
require_co_authored_with_did: false

Install

GitHub App URL: github.com/apps/vouch-gatekeeper (see the live install in the repo's github-app/app-manifest.json).

The app auto-opens a PR on installation to add the protection badge to your README:

md
![Vouch Protected](https://api.vouch-protocol.com/api/badge/{owner}/{repo})

Architecture

FastAPI service (github-app/main.py, ~1000 lines). Webhook endpoint at /webhook, badge endpoint at /api/badge/{owner}/{repo}. Setup flow at /setup redirects through GitHub OAuth and back to /setup/callback.

Guide

Vouch Shield rules

Decide whether a DID may take an action on a resource, with the same rules in Python and TypeScript.

Shield matches on the same three fields a credential binds in its intent: an action, a target, and a resource. The policy asks the question the evidence answers.

Install

Shield ships inside the SDK, so there is nothing extra to install.

bash
pip install vouch-protocol
npm i @vouch-protocol-official/sdk

Write the rules

yaml
version: 2
rules:
  - did: did:web:agent.example.com
    allow:
      - { action: read_file, target: files, resource: "reports/**" }
deny_default: true

Ask it

python
from vouch.shield import Shield, ShieldConfig

shield = Shield(ShieldConfig(rules_path="rules.yaml"))
decision = shield.check(did, action="read_file", target="files", resource="reports/q3.txt")
if decision.allow:
    run_the_tool()
ts
import { parseRules } from '@vouch-protocol-official/sdk';
import { readFileSync } from 'node:fs';
import { parse as parseYaml } from 'yaml';

const rules = parseRules(readFileSync('rules.yaml', 'utf8'), 'rules.yaml', parseYaml);
const decision = rules.check(did, 'read_file', 'files', 'reports/q3.txt');
if (decision.allow) {
  runTheTool();
}

Glob semantics

A segment is the text between / separators. * matches exactly one segment and never crosses a /; ** matches any number, including zero, and a trailing /** also matches the bare prefix. So reports/** covers reports, reports/q3.txt, and reports/2026/q3.txt, but not secrets/keys.txt.

A resource with no / is a single segment, which is what lets public.* match a table name. . is a literal character.

Reasons you can alert on

A decision carries a stable reason string: allowed, unknown did, no matching rule, resource outside scope, invalid resource, or malformed rules. The difference between the middle two matters: one means you may not do this at all, the other means you may do this, but not there.

Fail closed

Resources are normalised before matching, so reports/../etc/passwd becomes etc/passwd and falls outside a reports/** rule. A path climbing above its own root is refused outright rather than clamped. A missing rules file, a malformed one, an unknown key inside a rule, or simply no match all deny.

That normalisation is lexical and cannot see a symlink, so a server mapping a resource onto a real path must also confine that path itself.

Both implementations are checked against the same shared decision vectors, so a rule means the same thing in either language.

Guide

A Vouch-protected MCP server

Change one import so every tool on your MCP server refuses to run without a credential that authorises the call.

An MCP server built this way will not run a tool unless the call arrives with a Vouch Credential that verifies, comes from an issuer you trust, authorises that exact call, and passes your rules.

Install

bash
pip install "vouch-protocol[mcp]"

Change one import

python
from vouch.mcp import FastMCP          # replaces: from mcp.server.fastmcp import FastMCP

mcp = FastMCP("files")

@mcp.tool(resource=lambda args: args["path"])
def read_file(path: str) -> str:
    return open(path).read()

That is the whole integration. Every tool registered on this server is protected by default. The wrapper adds a required credential argument to each tool's schema and strips it before your function runs, so your function body is unchanged.

Write the rules

Rules match the same three fields a credential binds: action, target, and resource.

yaml
version: 2
rules:
  - did: did:web:agent.example.com
    allow:
      - { action: read_file, target: files, resource: "reports/**" }
deny_default: true

In a resource pattern, * matches exactly one path segment and ** matches any number. So reports/** covers reports/q3.txt and reports/2026/q3.txt, but not secrets/keys.txt. Paths are normalised first, so reports/../etc/passwd cannot slip through.

Configure and run

bash
export VOUCH_RULES=rules.yaml
export VOUCH_TRUSTED_ISSUERS=did:key:z6Mk...
export VOUCH_TARGET=files

python3 server.py

Without VOUCH_RULES and VOUCH_TRUSTED_ISSUERS the server refuses to start. It never starts unprotected.

What you see per call

One line per decision, on stderr:

ALLOW  did:key:z6Mk...  read_file  reports/q3.txt
DENY   did:key:z6Mk...  read_file  secrets/keys.txt  resource outside scope
DENY   did:key:z6Mk...  read_file  reports/q4.txt    credential does not match request

The reasons are stable strings you can alert on.

Resource binding

By default a credential authorises one call with one exact set of arguments, so a credential minted for one file will not open another. The resource= argument in the example above deliberately loosens that to the path alone, which is what lets a rule glob over directories. Treat that as a policy decision worth making on purpose.

Opting a tool out

python
@mcp.tool(unprotected=True)
def health() -> str:
    return "ok"

This logs a warning when the tool is registered and on every call. Anything reachable without a credential should be something you are happy for anyone to call.

Why the server and not the model

A model can be talked out of consulting a policy. A tool server cannot: it asks for a credential, checks the signature itself, applies its own rules, and runs nothing if any of that fails.

Working examples live in examples/mcp_server/ and examples/mcp_server_sqlite/ in the repository.

Part V

CLI Reference

Every command, every flag, with copy-pasteable examples.

Guide

The vouch Command Reference

Every subcommand of the vouch CLI, what it does, and a copy-pasteable example.

The vouch command ships with the vouch-protocol Python package. It groups into five areas: identity, git, media, scan, and attribution. A global -v / --verbose flag works on any command.

Identity and tokens

vouch init

Generate a new agent identity (a did:vouch DID plus an Ed25519 keypair). By default it prompts for a passphrase, saves the encrypted identity to your local keystore, and prints the public key to put in your vouch.json.

  • --domain <D> domain to base the DID on (defaults to example.com)
  • --env print the identity as export VOUCH_DID / VOUCH_PRIVATE_KEY instead of saving to the keystore

vouch sign "<message>"

Sign a message and print a Vouch-Token. With no key flags it loads your stored identity (prompting for the passphrase if encrypted); otherwise it reads VOUCH_PRIVATE_KEY / VOUCH_DID from the environment.

  • <message> the message to sign (positional)
  • --json parse the message as a JSON payload instead of wrapping it as a string
  • --key <JWK> private key as JWK JSON
  • --did <DID> agent DID
  • --header prefix the output with Vouch-Token:

vouch verify <token>

Verify a Vouch-Token. With a public key it checks the signature; without one it validates structure only and warns the signature was not verified.

  • <token> the token to verify (positional)
  • --key <JWK> public key as JWK JSON
  • --json output as JSON

Git

vouch git init

Export your Vouch identity to an SSH signing key, configure git to sign commits (commit.gpgsign=true, gpg.format=ssh), upload the key to GitHub, and optionally install a commit-trailer hook and README badge.

  • --no-trailer skip the prepare-commit-msg trailer hook
  • --no-badge skip the README badge prompt

vouch git status

Show the current Vouch git signing setup: SSH key and fingerprint, the relevant git config, and whether the commit hook is installed.

vouch git verify [commit]

Verify commit signatures match their Vouch-DID trailers. With no argument it checks recent commits; commits without a trailer are skipped.

  • [commit] a specific commit hash (optional positional)
  • -n, --count <N> number of recent commits to verify (default: 10)
  • --strict exit non-zero if any commit fails

Media

vouch media sign <image>

Sign an image. Native Vouch signing by default (no certificates), writing a _signed copy plus a sidecar.

  • <image> path to the image (positional)
  • -o, --output <path>, -n, --name <name>, -e, --email <email>, --did <DID>, --key <JWK>, --title <title>
  • --pro mark the credential PRO (otherwise FREE)
  • --c2pa use the C2PA industry standard instead of native signing

vouch media verify <image>

Verify an image's signature. --json for JSON, --c2pa to verify a C2PA manifest instead.

Scan

vouch scan [path]

Scan a file or directory for Vouch-shaped private key material (the OSS detection stage of PAD-058). A missing path exits with status 2.

  • [path] file or directory (default: current directory)
  • --json findings as JSON
  • --exit-nonzero-on <critical|high|medium|low> exit non-zero at or above this severity (default: critical)

Attribution

vouch attribute records per-region human/AI code authorship and produces a signed manifest (PAD-061). Subcommands: record, hook, finalize, blame, verify; most accept --session <id>.

  • vouch attribute record <path> record a single AI edit
  • vouch attribute hook read a Claude Code PostToolUse event from stdin and record the edit
  • vouch attribute finalize sign the manifest for the session
  • vouch attribute blame <path> show per-line authorship (AI / human / prior)
  • vouch attribute verify verify a manifest's signatures and region completeness

Helper binaries

Separate executables, run directly (not as vouch subcommands):

  • vouch-mcp Model Context Protocol server, exposes Vouch signing and verification to MCP-aware agents
  • vouch-bridge local media HTTP server for the media flow
  • vouch-sidecar Go Identity Sidecar. Install with go install github.com/vouch-protocol/vouch/go-sidecar/cmd/vouch-sidecar@latest
Part VI

State Verifiability Runtime

Hands-on quickstart for the Heartbeat Protocol, trust entropy decay, behavioral attestation, canary commitments, validator quorum, and authority freshness.

Guide

Heartbeat Quickstart

Stand up a heartbeat-renewing agent against a validator in under ten minutes.

The State Verifiability runtime ships in the Python SDK today. This quickstart wires the four primitives together: trust entropy, behavioral attestation, canary commitments, and validator quorum.

Install

bash
pip install vouch-protocol

Agent side: build a heartbeat session

python
from vouch import HeartbeatSession, HeartbeatScheduler, BehavioralCollector
from vouch.behavioral_attestation import ewma_drift_scorer
import asyncio
import httpx

session = HeartbeatSession(subject_did="did:web:agent.example.com", signer=signer)
session.collector = BehavioralCollector(intent_drift_scorer=ewma_drift_scorer(alpha=0.3))

# As the agent runs, record its activity
session.record_action(b"submit_claim:HC-001")
session.collector.record_api_call("https://api.example.com/orders", tokens=120)
session.collector.record_resource_access("order:42")

Submit each heartbeat to the validator

python
VALIDATOR_URL = "https://validator.example.com/heartbeat"

async def submit(request):
    async with httpx.AsyncClient(timeout=5.0) as client:
        resp = await client.post(VALIDATOR_URL, json=request.to_dict())
        resp.raise_for_status()
        return resp.json()  # the new SessionVoucher

scheduler = HeartbeatScheduler(
    session=session,
    interval_seconds=60,
    submit_callback=submit,
)
scheduler.start()

# ... agent runs as normal ...

await scheduler.stop()

The scheduler pulls the current behavioral digest from the collector, advances the canary commit/reveal chain, and includes the running Merkle root of actions performed since the last heartbeat along with their leaf hashes. The session's signer signs each request. The validator's response is a fresh SessionVoucher with decayed-but-renewed trust.

Validator side: accept and renew

python
from vouch import HeartbeatValidator, MemoryHeartbeatStore

validator = HeartbeatValidator(
    validator_did="did:web:validator.example.com",
    initial_trust=1.0,
    decay_lambda=0.01,
    voucher_valid_seconds=120,
    scope=["agent_actions"],
    store=MemoryHeartbeatStore(),  # swap for RedisHeartbeatStore in production
    key_resolver=resolve,          # did -> key, for subjects that are not did:key
)

def handle_heartbeat(request_dict):
    result = validator.validate(request_dict)
    if result.ok:
        return result.session_voucher
    return {"error": "rejected", "reasons": result.reasons}

The validator checks the schema, the agent's signature, the request time, the action Merkle root, behavioral digest structure, canary chain integrity, and interval-index monotonicity. A broken canary chain or stale interval index returns a structured rejection, so the agent does not get a new voucher and its existing one expires. A session that misses more than the configured number of intervals lapses until it is reset.

Trust entropy: gate actions by current trust

Each SessionVoucher carries initialTrust and decayLambda. The effective trust at time t is:

trust(t) = initialTrust * exp(-decayLambda * (now - issuedAt_seconds))

Gate sensitive actions by checking the current trust:

python
from vouch import compute_trust_at, check_trust_threshold
from vouch.trust_entropy import (
    TRUST_THRESHOLD_HIGH_STAKES,    # 0.9
    TRUST_THRESHOLD_MEDIUM_STAKES,  # 0.75
    TRUST_THRESHOLD_LOW_STAKES,     # 0.5
)
from datetime import datetime, timezone

now = datetime.now(timezone.utc)

if check_trust_threshold(session_voucher, TRUST_THRESHOLD_HIGH_STAKES, at_time=now):
    allow_financial_transfer()
elif check_trust_threshold(session_voucher, TRUST_THRESHOLD_MEDIUM_STAKES, at_time=now):
    allow_phi_read()
elif check_trust_threshold(session_voucher, TRUST_THRESHOLD_LOW_STAKES, at_time=now):
    allow_status_query()
else:
    reject_action()

Set your heartbeat interval to less than half the trust half-life so renewal stays ahead of decay. Half-life is ln(2) / decay_lambda.

Validator quorum: M-of-N approval

A single validator is a single point of failure. For regulated deployments, require multiple validators with different responsibilities to approve each heartbeat:

python
from vouch import HeartbeatQuorum, QuorumValidator, ROLE_POLICY, ROLE_BEHAVIORAL, ROLE_BUDGET

quorum = HeartbeatQuorum(
    validators=[
        QuorumValidator(validator=policy_validator,     role=ROLE_POLICY),
        QuorumValidator(validator=behavioral_validator, role=ROLE_BEHAVIORAL),
        QuorumValidator(validator=budget_validator,     role=ROLE_BUDGET),
    ],
    threshold=2,
)

result = quorum.validate(heartbeat_request_dict)
if result.ok:
    voucher = result.session_voucher
    # voucher.issuer lists all approving validator DIDs

Trust parameter aggregation is configurable. Defaults: initial_trust takes the minimum, decay_lambda takes the maximum, scope is the intersection of all approving validators' scopes.

Canary commitments: detect a silent failure

The heartbeat carries a fresh canary commitment plus the prior commitment's reveal. If the agent skips a beat or sends a wrong reveal, the chain breaks and no subsequent heartbeat can resume it. Silent failure becomes loud.

The HeartbeatSession and HeartbeatValidator manage this automatically. To use the primitive directly:

python
from vouch import CanaryChain, CanaryVerifier

chain = CanaryChain()
msg = chain.next_heartbeat()
# msg.commitment is what to send this interval
# msg.reveal is the previous secret (None on first interval)

verifier = CanaryVerifier()
ok = verifier.observe(msg.commitment, msg.reveal)
if not ok:
    revoke_session_voucher()

Validator state is small (one string per agent), so it survives restarts via last_commitment persistence in your chosen HeartbeatStoreInterface backend.

What's not in this quickstart

  • TypeScript and Go ports of the runtime modules: data formats are cross-language; the orchestration is Python-only today.
  • Concrete persistence backends beyond MemoryHeartbeatStore (Redis, Postgres, S3): ship in the commercial Pro tier.
  • Custom drift scorers beyond mean_drift_scorer, max_drift_scorer, ewma_drift_scorer: subclass BehavioralCollector to add your own.

See PAD-016 for the full Heartbeat Protocol disclosure and PAD-022 for the rate-limiting companion.

Guide

Authority Freshness

Refuse a still-time-valid voucher the moment the authority behind it changes state, and pick the tier that fits the action.

Time-decay trust answers one question: how long ago was this voucher issued. Authority Freshness adds the other two: what state is the authority in right now, and how much does this particular action cost if you get it wrong.

freshness(action) = f(elapsed time, authority state version, consequence)

The case it is built for is a treasury or trading agent. Its mandate is suspended for fraud one second after a perfectly valid SessionVoucher was minted. The time-decay trust on that voucher is still nowhere near the threshold, so on elapsed time alone the transfer goes through. Authority Freshness collapses the acceptable window to now.

Step 1 - The authority publishes its state

The authority signs an AuthorityState credential holding a counter that only ever goes up, plus its current status. Every authority-relevant transition (a fraud signal, a suspended mandate, an exposure breach, an incident) bumps the counter and republishes.

python
from vouch import Signer, sign_authority_state

authority = Signer(private_key=authority_private_key_jwk, did="did:web:treasury.example.com")

state = sign_authority_state(
    authority,
    authority_epoch=6,          # was 5; the suspension bumped it
    status="suspended",         # active | suspended | incident | exposure_breached | revoked
    valid_seconds=300,
)
# state is signed and ready to publish.

If the authority's key lives outside the process, in a secure element, a sidecar, a cloud KMS, or a quorum, pass a backend Signer here and the same call works. To build the credential and attach the proof yourself, build_authority_state returns the unsigned credential for data_integrity.build_proof.

active is the only status under which an action that calls for state freshness may proceed. It is a plain VC Data Model 2.0 credential signed with eddsa-jcs-2022, so it canonicalizes to identical bytes in every SDK.

Step 2 - The verifier tracks the highest counter it has seen

A verifier learns the current counter from a status-list refresh or over the heartbeat channel, and keeps the highest value per authority. Verifying the published credential gives you both fields:

python
from vouch import verify_authority_state

ok, passport = verify_authority_state(state, authority_public_key)
if ok:
    last_seen_epoch = passport.authority_epoch   # 6
    current_status = passport.status             # "suspended"

Step 3 - Gate the action on its consequence tier

The tiers are the same routine, sensitive, critical vocabulary Vouch Protocol already uses for bounded-staleness revocation, so a deployment carries one consequence vocabulary rather than two.

TierWhat it does
routineTime-decay only. Authority Freshness adds nothing.
sensitiveRefuse a voucher minted under a counter lower than the highest one seen. Enforced locally.
criticalThe same counter rule, plus a live M-of-N co-sign read at action time.

The gate is folded into the one composed trust check, so you pass the tier and the counters and get a single verdict back:

python
from vouch.trust_check import verify_agent_call
from vouch import CONSEQUENCE_SENSITIVE

verdict = verify_agent_call(
    credential,
    public_key=caller_key,
    session_voucher=voucher,            # minted under authorityEpoch 5
    voucher_public_key=validator_key,   # the validator that signed the voucher
    trust_threshold=0.9,
    consequence=CONSEQUENCE_SENSITIVE,
    last_seen_authority_epoch=6,        # the suspension already bumped it
)

verdict.ok                # False
verdict.trust_ok          # True: time-decay still passes
verdict.authority_reason  # "authority_epoch_stale:seen=6,voucher=5"

routine is the default. verify_agent_call also verifies the voucher's proof, validity window, and subject before it uses the trust value. When you pass no trust_threshold, the threshold follows the tier: 0.5 for routine, 0.75 for sensitive, 0.9 for critical. The voucher's own counter is read from credentialSubject.authorityEpoch unless you pass voucher_authority_epoch yourself.

If you want the gate on its own, without identity and trust folded in, call it directly:

python
from vouch import evaluate_authority_freshness

v = evaluate_authority_freshness(
    tier="sensitive",
    voucher_epoch=5,
    last_seen_epoch=6,
)
v.allow   # False
v.reason  # "authority_epoch_stale:seen=6,voucher=5"

An unknown tier coerces to critical, and a missing counter on either side fails closed with authority_epoch_unknown:voucher=?,seen=9. The reason codes are byte-identical across every binding, so an audit log reads the same whichever SDK wrote it, and they are pinned by the shared interop vector in test-vectors/authority-state/.

Local check vs. live check

Be clear with yourself about which of your actions needs a network call:

  • routine and sensitive are enforced locally. Comparing the two counters is comparing two integers the verifier already holds. Nothing is fetched at action time, which is what makes the tier usable on a disconnected verifier.
  • critical is the honest limit of a local check. When the acceptable window is near zero, a cached counter is not good enough, because the authority could have changed state between the last refresh and this action. So the verifier trusts no cached counter and demands a live co-sign from an M-of-N quorum, produced at action time and bound to the action by a nonce.

Step 4 - The live co-sign for critical actions

The verifier challenges with a nonce, the quorum signs the authority's current state, and the verifier checks it and feeds the result into the gate. The quorum has to be reachable and willing to sign at that instant, which is what actually reads the authority's state at the moment of the action.

python
from vouch import build_live_authority_cosign, verify_live_authority_cosign
from vouch import CONSEQUENCE_CRITICAL
import uuid

nonce = uuid.uuid4().hex        # the verifier's challenge

# Quorum side: wire threshold_signer.sign here so the signature is a FROST
# M-of-N aggregate over Ed25519.
cosign = build_live_authority_cosign(
    authority_did="did:web:treasury.example.com",
    authority_epoch=6,
    status="active",
    nonce=nonce,
    sign=threshold_signer.sign,
)

# Verifier side.
res = verify_live_authority_cosign(
    cosign,
    group_public_key,
    expected_nonce=nonce,
    max_age_seconds=30,
)

verdict = verify_agent_call(
    credential,
    public_key=caller_key,
    session_voucher=voucher,
    voucher_public_key=validator_key,
    consequence=CONSEQUENCE_CRITICAL,
    last_seen_authority_epoch=6,
    live_cosign_ok=res.ok,
)

The aggregated co-sign is an ordinary Ed25519 signature, so the verifying side needs no threshold-signing code of its own. verify_live_authority_cosign rejects a replayed nonce, a co-sign older than max_age_seconds (30 by default), a future-dated one, and any status other than active.

Across the SDKs

The AuthorityState credential, the counter rule, and the tier evaluation ship in the Rust core and in the Python, TypeScript, and Go bindings, all signed with eddsa-jcs-2022 and all pinned by one shared interop vector. The names follow each language's conventions: build_authority_state and evaluate_authority_freshness in Python and Rust, buildAuthorityState and evaluateAuthorityFreshness in TypeScript, BuildAuthorityState and EvaluateAuthorityFreshness in Go. The live co-sign builder and verifier ship in the Python SDK.

Choosing a tier

  • Read-only queries, status checks, telemetry: routine.
  • Anything that writes, spends inside a budget, or touches regulated data: sensitive. It costs you one integer comparison.
  • Moving funds, an irreversible external commitment, a physical maneuver: critical, and make sure your quorum is actually reachable on the path where you enforce it.

See the Authority Freshness design note for the full write-up, and try it as the verifier in the authority freshness demo.

Part VII

Accountable Autonomy

Five modules that bound and record what an already-authorized agent does: reasoned actions, deliberation windows, executable caveats, inference provenance, and an append-only transparency log.

Guide

The Accountable-Autonomy Runtime

Make an authorized agent state its reason, wait out a veto, stay inside its envelope, prove its output, and land in a public log.

Identity and delegation prove who acted and under what authority. They do not, on their own, bound what an already-authorized agent may do, slow down an irreversible action, prove why the agent acted, or make the record public. Five Python SDK modules add exactly that. Each is an ordinary eddsa-jcs-2022 Verifiable Credential, so it verifies across the language SDKs, and each has a runnable example in the repo and a live section on the interactive demos.

Reasoned Action Proofs

vouch.reasoning has the agent state its justification before acting, tie each reason to a real artifact by that artifact's hash, and escrow the justification before execution. An auditor proves the reasoning was not fabricated (evidence_unresolved, evidence_hash_mismatch), not rewritten (justification_digest_mismatch), and committed before the action (escrow_after_execution).

python
from vouch.reasoning import build_justification, evidence_anchor, sign_reasoned_action, verify_justification

just = build_justification(intent, [evidence_anchor("user asked", ref="msg:1", evidence=user_message)])
cred = sign_reasoned_action(agent, intent=intent, justification=just)
ok, subject = verify_reasoned_action(cred, agent_pub)
good, reason = verify_justification(just, subject, resolver=lookup)

See examples/reasoned_action_demo.py and the reasoned-action demo.

Proof of Deliberation

vouch.deliberation gates irreversible actions. The agent commits and broadcasts a signed intent with a challenge window and named objectors, waits out the window, and survives any veto before a verifier accepts the execute credential. The agent cannot shorten the window (challenge_window_not_elapsed) or clear its own veto (vetoed). Reversible actions run with no delay. See examples/deliberation_demo.py and the deliberation demo.

Executable Caveats

vouch.caveats attaches live conditions to a delegation link ("only for shipped orders", "under the lifetime spend", "business hours"). Caveats accumulate down the chain and cannot be dropped by a descendant (the verifier requires the chain to root at the grantor, else unrooted_capability), and every verifier must evaluate every accumulated caveat. A standard caveat library evaluates identically across languages; a custom module-hash caveat is the escape hatch. See examples/caveats_demo.py and the caveats demo.

Inference Provenance

vouch.provenance binds an output to a fingerprint of the model weights and a Merkle root over the retrieved context, plus the sampler settings. An auditor re-fetches the sources to reproduce the context root (context_root_mismatch on a substituted context) and re-runs the model on the same seed to byte-compare the output (output_mismatch, weights_mismatch). See examples/provenance_demo.py and the provenance demo.

Action Transparency

vouch.transparency submits consequential actions to an append-only RFC 6962 Merkle log that signs its size and root as a Signed Tree Head. A verifier demands an inclusion proof that an action is in the log (inclusion_failed), and a monitor demands a consistency proof that an older tree head is a strict prefix of a newer one (consistency_failed, tree_shrank), so the log cannot omit or rewrite an action. See examples/transparency_demo.py.

How they compose

None of these verify an agent's mind. Together they make harm hard to hide even for a misaligned agent: it must state a reason on the record, wait out a window a human can veto, stay inside an authority that cannot be broadened, against a decision that is reproducible, in front of a public append-only log.

Guide

Event-Triggered Intent Recheck

Close the gap between two heartbeats by re-locking and signing the agent's intent at the moment a sensitive action runs.

The gap a heartbeat leaves open

A heartbeat proves an agent is still running. It does not prove the agent still means to do what it is about to do. Vouch Protocol renews an agent session on a fixed interval, so there is a window between two heartbeats where nothing is re-checked. Someone who knows the interval could line up a sensitive action to land in that gap, riding on an intent that was locked in earlier.

Event-triggered intent recheck (the secondary seal) closes this. When a sensitive action is about to run, the agent locks its current intent again at that moment and signs it, rather than leaning on the last heartbeat's assurance.

What the verifier checks

A verifier accepts the action only when the intent seal was made after the most recent heartbeat and recently enough for how sensitive the action is. Consequence tiers 0 to 4 map to a freshness requirement, and the high and critical tiers require a fresh seal. A seal made too early is rejected with a stable reason string, intent_seal_stale. Routine, low-consequence actions are unaffected, so ordinary work does not pay for the extra seal.

How it fits

The recheck lives in vouch.reasoning / vouch.intent_recheck (and the Rust core reasoning.rs). It composes with the existing Reasoned Action Proofs and Heartbeat Protocol, and it adds no new cryptography: it reuses the eddsa-jcs-2022 signing already there. Think of it as the adversarial mirror of authority freshness: authority freshness asks whether the grant is still current, and the secondary seal asks whether the intent is still current.

Availability

Event-triggered intent recheck ships in the Python SDK, the Go sidecar, and the core (Rust and WASM), with shared cross-language interop vectors. The native bindings (Swift, Kotlin/JVM, .NET, C), and the idiomatic TypeScript wrapper are on the roadmap for this feature.

Part VIII

Pacing Profile

Verification primitives for proving a party held to an agreed pace of autonomous system development.

Guide

The Pacing Profile

Eleven Python modules that make a pace commitment checkable: compute census, autonomy depth, pre-registration, red lines, and more.

The Pacing Profile (vouch.pacing, Python) is a set of verification primitives for proving that a party held to an agreed pace of autonomous system development, to a party that cannot see inside. Every record is a Vouch Protocol credential with an eddsa-jcs-2022 proof, so it verifies the same way as any other credential.

What each module answers

  • census and restraint: did anyone exceed a compute ceiling? Proved over an enrolled device population whose completeness is checkable.
  • recursion: how many autonomous steps sit between an artifact and the nearest human decision?
  • prereg: what was a step meant to do, and how will it be judged? Both are fixed before it runs.
  • custody: does the operator's compute account agree with the provider's?
  • pace: a threshold-signed decay rate that slows every outstanding grant without revoking any.
  • fuse: an interval that grows with the size of a capability step and cannot be shortened with parallel compute.
  • redline: were the safety thresholds fixed before the results were known?
  • oversight: a committed ratio between compute and attested oversight work.
  • load_auth: an authorization bound to the exact weights, re-checked while they stay loaded.
  • dissent: a sealed, dated registration of a concern, released on a declared condition.
  • disclosure: rivals commit first and reveal together, so nobody goes first.

Example: commit red lines before the results

python
from vouch import Signer, generate_identity
from vouch.pacing import (
    Threshold, commit_policy, publish_policy, open_threshold, verify_open,
    measurement_record, check_ordering,
)

def principal(domain):
    kp = generate_identity(domain=domain)
    return kp, Signer(private_key=kp.private_key_jwk, did=kp.did)

operator_kp, operator = principal("operator.example.com")
evaluator_kp, evaluator = principal("evaluator.example.org")

# 1. Commit the thresholds and publish the commitment at log index 100.
policy = commit_policy([
    Threshold("cyber", "cyber-uplift", ">=", 0.40, "halt"),
    Threshold("autonomy", "autonomy-days", ">=", 30.0, "narrow"),
])
published = publish_policy(operator, policy, log_index=100)

# 2. An evaluator records a result later, at log index 140.
result = measurement_record(
    evaluator, measurement="cyber-uplift", value=0.52,
    subject_of_measurement="model-x", log_index=140,
)

# 3. Open one threshold. An empty list means it verifies.
reveal = open_threshold(policy, "cyber")
print(verify_open(reveal, published, operator_kp.public_key_jwk))

# 4. The policy was committed before the result, by log index.
print(check_ordering(published, result, operator_kp.public_key_jwk, evaluator_kp.public_key_jwk))

Both checks print an empty list, which means they passed. The verify functions return the reasons a check fails.

Where to read more

See the Pacing Profile design document and PAD-125 to PAD-135 in docs/disclosures/.

Part IX

AI Assistants

Install and use the Claude Skill, OpenAI Custom GPT, Gemini Gem, and the Vouch Assistant on this website.

Guide

Installing the Claude Skill

Drop-in skill that teaches Claude Code the Vouch SDK shapes, DID conventions, and integration patterns.

Install (recommended): the marketplace

Add the Vouch marketplace once, then install the plugin:

/plugin marketplace add vouch-protocol/vouch
/plugin install vouch-protocol@vouch

Run /plugin to confirm it is enabled. The skill loads automatically when you mention Vouch topics, so there is nothing else to do.

Install (manual)

Prefer to drop it in by hand? Copy the skill folder into your skills directory.

git clone https://github.com/vouch-protocol/vouch
cp -r vouch/claude-skill/skills/vouch-protocol ~/.claude/skills/vouch-protocol

Restart Claude Code and run /skills. You should see vouch-protocol listed.

What triggers it

The skill loads when your prompt mentions vouch-protocol, did:web, eddsa-jcs-2022, mldsa44-jcs-2024, BitstringStatusList, SessionVoucher, Heartbeat Protocol, or natural-language variants like "sign a credential with Vouch" or "verify a Vouch credential."

What's inside

The plugin lives at claude-skill/: SKILL.md (the skill) under skills/vouch-protocol/, a .claude-plugin/plugin.json manifest, and a reference/ folder covering the language SDKs, the credential format, delegation, post-quantum, revocation, state verifiability, integrations, and troubleshooting.

Updating

If you installed from the marketplace:

/plugin marketplace update vouch

If you installed manually, pull the repo and re-copy the folder. The skill versions with the protocol, so update whenever Vouch ships a new cryptosuite or SDK shape.

Customising for your team

Fork the claude-skill/ folder and edit references to add your DID prefix, your verifier hostname, your team's action vocabulary. Update SKILL.md's description so it triggers on your terminology too.

What if I use Claude Desktop or the web app

Skills are a Claude Code (CLI) feature. On Desktop or the web app, paste the contents of SKILL.md and the relevant reference/*.md files into your project's Custom Instructions.

Guide

Building the OpenAI Custom GPT

Configuration to build your own Vouch Protocol Assistant in ChatGPT.

We do not host a shared Custom GPT. Build your own from the configuration in openai-gpt/ in the repo.

Build steps

1. Open https://chatgpt.com/gpts/editor and click Create. 2. Switch to the Configure tab. 3. Paste each field from its file: - Name ← name.txt - Description ← description.txt - Instructions ← instructions.md (the whole file) - Conversation starters ← one line per starter from conversation-starters.md 4. Upload all files in openai-gpt/knowledge/ to the Knowledge section. 5. Enable Web Browsing and Code Interpreter. Leave DALL-E off. 6. Optionally add Actions: paste actions.yaml, configure auth per actions-auth.md. This lets the GPT call the hosted Vouch Assistant to sign for you. 7. Save as "Only me" first. Test in the preview pane. Promote to "Anyone with the link" or "Public" when you are satisfied.

Why we publish the config instead of a shared GPT

Custom GPTs are tied to one OpenAI account, change owner with acquisitions, and cannot be forked. Publishing the source of truth in the repo lets your team build a version it controls, audits, and updates.

Updating

When Vouch ships a new SDK shape or cryptosuite, pull the latest openai-gpt/ from the repo. In the GPT editor, replace the knowledge files (the builder deduplicates by filename) and bump the version note in the Instructions.

Guide

Creating the Gemini Gem

Configuration to build your own Vouch Protocol Helper in Google Gemini.

Build steps

Gemini Advanced or Google AI Pro for the full ten-file corpus; the free tier supports a smaller attachment.

  1. Open https://gemini.google.com/gems/create.
  2. Click New Gem.
  3. Paste gemini-gem/name.txt, description.txt, and instructions.md.
  4. Upload all files in gemini-gem/knowledge/.
  5. Add the prompts from examples.md as the Gem's Examples.
  6. Click Preview and run a test prompt.
  7. Save & share (Private / Anyone with the link / Workspace org).

Workspace integration

Because Gems live inside Gemini, they automatically have access to Google Workspace tools. The Vouch Gem is instructed to:

  • Confirm before creating any Doc, Sheet, or email.
  • Use Google Search when you ask about current GitHub state.

Free tier vs Advanced

Free tier: trim the corpus to four files (overview.md, quickstart.md, credential-format.md, troubleshooting.md). Gemini Advanced and Workspace plans support the full ten-file corpus and long context.

Sharing inside your Workspace org

In the Gem's Save dialog, choose "Visible to anyone in [your org]". Workspace admins can install Gems for all users from the admin console.

Guide

Running the Vouch Assistant locally

Three processes: dev sidecar, agent backend, chat widget. Browse to localhost:3200.

The chat helper on vouch-protocol.org is open source under website-agent/ in the repo. You can self-host it.

Three processes, three terminals

1. Dev sidecar (ephemeral Ed25519 key, dev only)

bash
cd ~/vouch-protocol/website-agent/backend
python -m vouch_agent.dev_sidecar --did did:web:agent.example.com --port 8877

2. Agent backend (FastAPI + RAG + signer client)

bash
cd ~/vouch-protocol/website-agent/backend
cp ../.env.example ../.env
# edit ../.env to add your LLM key
uvicorn vouch_agent.main:app --host 127.0.0.1 --port 8000

3. Chat widget (standalone Next.js harness)

bash
cd ~/vouch-protocol/website-agent/standalone
npm install
npm run dev    # http://localhost:3200

Open http://localhost:3200. The status strip shows backend OK, sidecar OK, and the number of knowledge chunks indexed.

Pick an LLM provider

The backend supports three:

# Anthropic (default)
export VOUCH_LLM_PROVIDER=anthropic
export ANTHROPIC_API_KEY=sk-ant-...

# OpenAI
export VOUCH_LLM_PROVIDER=openai
export OPENAI_API_KEY=sk-...

# Google Gemini
export VOUCH_LLM_PROVIDER=gemini
export GEMINI_API_KEY=...

Or set them in website-agent/.env (auto-loaded on backend start).

The hosted assistant's DID, A2A endpoint and agent card

The hosted Vouch Protocol Assistant uses the DID did:web:agent.vouch-protocol.com. It resolves to https://agent.vouch-protocol.com/.well-known/did.json, which the assistant serves itself from its sidecar's key. Verify a credential it signed with vouch.verify(credential).

Other agents can reach it over A2A:

  • POST /a2a takes a JSON-RPC 2.0 message/send request with text parts. It answers through the same retrieval and model path as the chat, with the same 4000-character limit. The reply's signed Vouch credential is in metadata.vouchCredential. No actions are reachable here.
  • GET /.well-known/agent-card.json returns the signed A2A agent card. It is signed with vouch.integrations.a2a.sign_agent_card at sidecar startup, is valid for 90 days, and lists https://agent.vouch-protocol.com/a2a as its URL.

If you self-host, set VOUCH_A2A_URL to your own A2A endpoint. The DID resolves once your hostname reaches the app over HTTPS, so it needs a DNS record and a TLS certificate.

Production deployment

For production, replace the dev sidecar with the Go sidecar (vouch-sidecar) backed by KMS, and run the agent backend behind a reverse proxy with TLS. The backend is self-contained; everything else (LLM provider, sidecar URL, CORS allow-list) is environment-driven.

Guide

Choosing a sidecar tier

Go for production, Python or TypeScript for lightweight self-hosting, Python `dev_sidecar` for local development.

Three reference sidecars ship with the protocol. They are not interchangeable in production. Pick by use case, not language preference.

Tier table

TierLanguageUse caseKey storage
ProductionGo (go-sidecar/)Audited, regulated, high-throughputKMS / HSM / file
LightweightPython (vouch.sidecar.*)Self-hosted Python stacksFile or env
LightweightTypeScript (packages/sdk-ts/sidecar/)Self-hosted Node stacksFile or env
DevelopmentPython dev_sidecarLocal dev onlyEphemeral, in-memory

Rule of thumb: if your auditor will ask about the sidecar, run the Go one.

Why the lightweight tier is lightweight on purpose

The sidecar is security-critical, so smaller code surface is safer. The Python and TS sidecars intentionally omit:

  • Post-quantum signing (the eddsa-jcs-2022 plus mldsa44-jcs-2024 proof set)
  • KMS / HSM integration
  • Sensitive-mode JWE wrapping
  • Heartbeat session validation
  • Multi-tenancy

When you need any of those, switch to the Go sidecar. The wire format is identical, so the client only changes one environment variable.

Cross-language equivalence

All three sidecars expose the same HTTP API:

  • GET /health: liveness probe
  • GET /did: the sidecar's DID
  • GET /.well-known/did.json: DID Document (optional)
  • POST /sign: sign an intent, return a Vouch credential

A shared contract test suite at test-vectors/sidecar-contract/ verifies that each implementation accepts and rejects the same inputs and emits semantically equivalent credentials.

Switching tiers

The HTTP API is identical:

bash
export VOUCH_SIDECAR_URL=http://localhost:8877

The agent code does not change. What changes is the DID (production agents use a real did:web on your domain) and the key material (production loads from KMS).

Part X

Conformance

Test whether an implementation, an SDK, fork, or port, produces byte-correct protocol output and supports the required feature sets, graded L1 to L3.

Guide

Test your conformance level

Run the reference conformance runner against your implementation and read the highest level it passes.

What conformance checks

Conformance grades an implementation in three cumulative levels. A level is achieved only when every check at that level and all lower levels passes.

  • L1 Credential: RFC 8785 JCS canonicalization, eddsa-jcs-2022 sign and verify, the validity window (an expired credential is rejected), and nonce replay resistance.
  • L2 Structural-Security: everything in L1, plus BitstringStatusList revocation, delegation narrowing on every dimension, the Identity Sidecar allow and deny behaviour, and a hash-linked audit trail.
  • L3 State Verifiable plus Post-Quantum: everything in L2, plus the post-quantum proof set (an eddsa-jcs-2022 proof and an mldsa44-jcs-2024 proof over the same document), the Heartbeat renewal chain, and an M-of-N validator quorum.

Robotics is a separate profile, Robotics Conformant, not part of L1 to L3.

Run the self-test

bash
python -m vouch.conformance

It runs the checks in-process against the SDK and prints a per-check pass or fail, then the highest fully-passing level:

L1
  [PASS] canonicalization: 13 vectors
  [PASS] sign_verify: round-trip and tamper rejection
  ...
Highest fully-passing level: L3

The verified badge (coming)

The self-test proves conformance to yourself. A hosted verifier is coming that issues fresh random challenges, re-checks every response server-side with the canonical core, and mints a signed VouchConformanceCredential unique to your implementation. Because it recomputes every expected answer, a pass cannot be faked by replaying the public test vectors, and anyone can re-verify Vouch's signature and re-run the challenges. Until it is live, the conformance page carries a self-declaration and shows what a verified pass earns.

Part 11

Robotics: getting started

Pick a language and run the robot identity sign-and-verify loop in your dev env. The six capabilities are byte-identical across every SDK, so a robot credential signed in one verifies in all the others.

Guide

Robotics Quickstart (Python)

Mint a hardware-attested robot identity and verify it, entirely in your dev env.

Install

bash
pip install vouch-protocol

Mint and verify a robot identity

A robot self-issues its identity with its own key; a hardware root (a TPM or secure element) signs a binding tying that key to the device. In development, SoftwareRootOfTrust stands in for the TPM.

python
from vouch.keys import generate_identity
from vouch.signer import Signer
from vouch.robotics import identity

robot = Signer.from_identity(generate_identity(domain="robot.example.com"))
root = identity.SoftwareRootOfTrust(kind="TPM")        # production uses the real TPM

cred = identity.mint_robot_identity(robot, root,
    make="Acme Robotics", model="AR-7", serial="SN-000123",
    owner="did:web:owner.example.com")

ok, subject = identity.verify_robot_identity(cred, robot.public_key())
assert ok and subject["make"] == "Acme Robotics"

Verification checks both the credential proof and the hardware attestation, so an identity copied to different hardware fails. From here, the other five capabilities (provenance, capability, handshake, blackbox, passport) follow the same import-and-call shape; see the Robotics: capabilities guides.

Guide

Robotics Quickstart (TypeScript)

The same robot identity loop in TypeScript, for Node or the browser.

Install

bash
npm install @vouch-protocol-official/sdk

Mint and verify a robot identity

ts
import { Signer, generateIdentity } from '@vouch-protocol-official/sdk';
import { SoftwareRootOfTrust, mintRobotIdentity, verifyRobotIdentity } from '@vouch-protocol-official/sdk';

const robot = await Signer.fromIdentity(generateIdentity('robot.example.com'));
const root = new SoftwareRootOfTrust('TPM');

const cred = await mintRobotIdentity(robot, root, {
  make: 'Acme Robotics', model: 'AR-7', serial: 'SN-000123',
  owner: 'did:web:owner.example.com',
});

const { ok, subject } = verifyRobotIdentity(cred, robot.publicKey());

Function names are camelCase; everything else matches the Python and Go SDKs byte for byte.

Guide

Robotics Quickstart (Go)

The robot identity loop in Go, the language of the Identity Sidecar.

Get the module

bash
go get github.com/vouch-protocol/vouch/go-sidecar

Mint and verify a robot identity

go
root, _ := robotics.NewSoftwareRoot(seed, "TPM")
cred, _ := robotics.MintRobotIdentity(robotSigner, root, robotics.MintOptions{
    Make: "Acme Robotics", Model: "AR-7", Serial: "SN-000123",
    Owner: "did:web:owner.example.com",
})
ok, subject := robotics.VerifyRobotIdentity(cred, robotSigner.PublicKeyEd25519())

Go uses PascalCase and an options struct; the credential bytes are identical to Python and TypeScript.

Guide

Robotics Quickstart (Swift, Kotlin, JVM, .NET, C, WebAssembly)

The robotics surface over the shared core, JSON in and JSON out, for the wrapper languages.

The robotics capabilities are implemented once in the Rust core and exposed through the same UniFFI and WebAssembly wrappers as the rest of Vouch. The wrapper functions are JSON-in / JSON-out: keys cross as bytes, everything else as a JSON string, and binary fields (the hardware attestation, the config hash) cross as multibase strings.

Browser and Node (WebAssembly)

js
import init, { roboticsMintIdentity, roboticsVerifyIdentity } from '@vouch-protocol-official/core-wasm';
await init();

const params = JSON.stringify({
  robotDid: 'did:web:robot.example.com', make: 'Acme Robotics', model: 'AR-7',
  serial: 'SN-000123', rootKind: 'TPM', rootPublicMultibase: rootMultibase,
  attestation: attestationMultibase, validFrom: new Date().toISOString(),
});
const credJson = roboticsMintIdentity(seedBytesB64, params);
const subjectJson = roboticsVerifyIdentity(credJson, robotPublicKeyB64);  // "null" if invalid

Swift, Kotlin/Java, .NET, C and C++

The same functions are generated for each platform from the core's UniFFI interface and C header. The names match the WebAssembly build (roboticsMintIdentity, roboticsVerifyIdentity, roboticsBuildScope, roboticsCheckAction, roboticsBuildHello, and so on), and every capability is present. Pass the same JSON params and key bytes; a credential built here verifies in Python, TypeScript, and Go.

Part 12

Robotics: capabilities

One guide per robotics capability: what it is, the problem it closes, how it works, the API, a worked example, and exactly what verification checks.

Guide

Hardware-rooted identity

Bind a robot identity to a TPM or secure element so it cannot be cloned to other hardware.

A RobotIdentityCredential binds a robot's software identity key to a physical hardware root of trust, alongside its make, model, serial, owner, and lifecycle history.

The problem it closes: a software-only identity in a config file can be copied to a cloned robot. Hardware rooting makes the identity non-transferable: it is provably tied to one piece of silicon.

How it works: the robot self-issues the credential with its own Ed25519 key. The hardware root signs a binding, the JCS canonical bytes of {key, robotDid}, embedded as hardwareRoot.attestation. Verification checks two independent signatures: the credential proof and the hardware attestation.

python
from vouch.robotics import identity

root = identity.SoftwareRootOfTrust(kind="TPM")        # production uses the real TPM
cred = identity.mint_robot_identity(robot_signer, root,
    make="Acme Robotics", model="AR-7", serial="SN-000123",
    owner="did:web:owner.example.com")
ok, subject = identity.verify_robot_identity(cred, robot_signer.public_key())

Security boundary: verification fails closed on a wrong type, an invalid proof, a missing or non-Ed25519 hardware key, or an attestation that does not match the binding. An attacker who swaps in their own hardware key and re-signs the credential still fails, because the attestation no longer matches {key, robotDid}.

Guide

Model and config provenance

Prove which model, weights, safety policy, and config a robot ran, even after an OTA update.

A ModelProvenanceAttestation records the vision-language-action model name, weights hash, safety policy, and a hash of the running configuration.

The problem it closes: after an incident, logs alone cannot prove what software and safety policy were running. Provenance makes it cryptographic, and it survives over-the-air updates.

How it works: the vla block carries modelName, weightsHash, safetyPolicy, and a configHash (the multibase SHA-256 of the JCS-canonical config, reproducible by any verifier). On an OTA update the robot re-signs a new attestation with a supersedes link to the previous one, forming a chain.

python
from vouch.robotics import provenance

att = provenance.build_provenance_attestation(signer, robot_did=robot_did,
    model_name="openvla-7b", weights_hash="u...",
    safety_policy="did:web:authority#policy-v3",
    config={"temperature": 0.0, "max_torque": 12.5, "guardrails": ["no_humans_zone"]})
ok, subject = provenance.verify_provenance_attestation(att, signer.public_key(), config)

Security boundary: verification fails on a wrong type, an invalid proof, or, when a config is supplied, a configHash that does not reproduce. A robot running a different config than the one attested is detectable by anyone holding the expected config.

Guide

Physical capability scope

Force, speed, near-humans, zone, and shift-window limits, checked before each actuation.

A PhysicalCapabilityScope credential carries physical limits, max force, max speed, a tighter cap near humans, allowed zones, and shift windows, that a controller checks before every actuation.

The problem it closes: a permission like "operate the arm" says nothing about how hard or how fast. Physical scope makes the bound enforceable and makes delegated authority shrink-only.

How it works: a controller calls the check function with a proposed action and gets back whether it is allowed plus a reason for each violated dimension. Delegation is governed by an attenuation rule: a child scope is valid only if every numeric cap is less than or equal to the parent, every zone is a subset, and every window fits inside a parent window.

python
from vouch.robotics import capability

scope = cred["credentialSubject"]["physicalScope"]
res = capability.check_physical_action(scope,
    capability.PhysicalAction(speed_mps=1.5, near_humans=True))
# res.ok is False: the near-humans speed cap is 0.5 m/s

Security boundary: the runtime check rejects an action exceeding any granted dimension (an absent dimension is unconstrained by design). attenuates(parent, child) is the escalation guard: a child that raises a cap, drops a cap, adds a zone outside the parent set, or widens a window is rejected.

Guide

Robot-to-robot handshake

Two robots from different fleets authenticate and agree a bounded cooperation session.

A three-message exchange (HELLO, ACCEPT, CONFIRM) by which two robots in different trust domains authenticate each other and agree a bounded cooperation session.

The problem it closes: when robots from different fleets meet and must cooperate, each needs to know the other is who it claims and agree on a safe, limited set of shared actions, with no central broker.

How it works: the initiator signs a HELLO proposing a scope and a fresh nonce. The responder verifies the HELLO signature, checks the initiator's did:web domain against its trust policy, and signs an ACCEPT whose boundedScope is the intersection of the proposed scope and what the responder offers, never the union. The initiator verifies the ACCEPT, confirms the nonce echoes its HELLO, and signs a CONFIRM.

python
from vouch.robotics import handshake

policy = handshake.TrustPolicy(trusted_domains={"robot-a.example.com"})
hello = handshake.build_hello(a_signer, proposed_scope=["lift", "carry", "scan"])
accept = handshake.build_accept(b_signer, hello, a_signer.public_key(), policy,
    offered_scope=["carry", "scan", "weld"])
ok, session = handshake.verify_accept(accept, b_signer.public_key(),
    expected_nonce=hello["nonce"])
# session.scope == ["carry", "scan"]  (the intersection)

Security boundary: the responder signs an acceptance only if the HELLO signature verifies and the initiator's domain passes the policy. The session scope is the intersection of both offers, so neither side can widen the other's grant. The nonce binds the acceptance to its HELLO, and a tampered message fails verification.

Guide

Black box and kill switch

An encrypted, tamper-evident flight recorder, and a verifiable emergency stop.

Two related capabilities ship together.

The black box is an append-only, AES-256-GCM-encrypted, hash-linked flight recorder. Each entry encrypts its payload under a 32-byte key; the chain is tamper-evident without the key (any altered field breaks its entryHash, any reorder breaks prevHash), and the payloads open only with the key. An auditor can prove nothing was changed without being able to read the contents.

The kill switch is a verifiable emergency stop. A KillSwitchCredential proves who issued the stop, over what scope, and why. With an attested-authority allowlist, verification rejects any issuer not on the list.

python
from vouch.robotics import blackbox

log = blackbox.BlackBoxLog(key)                       # 32-byte AES key
entry = log.append("motion", {"speed": 1.5, "joint": "elbow"})
assert blackbox.verify_blackbox_chain(log.entries()).ok
payload = log.open_entry(entry)                       # only the key holder can read this

stop = blackbox.build_killswitch_credential(authority, target=robot_did,
    reason="human in path", scope=["arm", "drive"])
ok, subject = blackbox.verify_killswitch_credential(stop, authority.public_key(),
    trusted_authorities={authority.did})

Security boundary: chain verification fails on a seq gap, a broken prevHash link, or a recomputed entryHash that does not match. Decryption fails under the wrong key. The kill switch fails on a wrong type, an invalid proof, or an issuer that is not an attested authority.

Guide

Scannable passport

A signed passport in a QR or NFC tag that anyone can verify offline.

A compact, signed RobotPassport encoded into a vouch-passport: URI for a QR code or NFC tag, so anyone can check a robot's owner, authorized actions, certification, and current standing offline, with no network call.

The problem it closes: a person standing in front of a robot needs to know it is legitimate and what it is allowed to do, often with no connectivity.

How it works: the passport credential carries the robot's identity summary and a status (active, suspended, or decommissioned). encode_passport serializes the JCS-canonical credential into a deterministic multibase payload behind the vouch-passport: scheme, so a scanner verifies the signature locally.

python
from vouch.robotics import passport

p = passport.build_passport(signer, robot_did=robot_did, make="Acme Robotics",
    model="AR-7", owner="did:web:owner.example.com",
    authorized_actions=["lift", "carry"], certification="ISO-10218")
uri = passport.encode_passport(p)                     # "vouch-passport:u..."
ok, summary = passport.verify_passport(passport.decode_passport(uri), signer.public_key())

Security boundary: verification is fully offline (the verifier supplies the issuer key). An expired passport fails. A suspended or decommissioned passport still verifies but the status is surfaced, so a scanner refuses cooperation rather than treating it as silently inactive. A tampered passport or a wrong type is rejected.

Guide

Living trust heartbeat

A robot heartbeats with a signed motion summary; trust holds only while it stays fresh and in-envelope.

A RobotHeartbeatCredential makes robot trust living: the robot periodically self-signs a summary of what it physically did, and a verifier trusts it only while a fresh, in-envelope heartbeat keeps arriving.

The problem it closes: an identity or capability credential, minted once, stays valid until something revokes it. A robot that drifted, was tampered with, or went dark should lose trust on its own.

How it works: a MotionCollector records each commanded motion (force, speed, near-humans, zone) and produces a motion digest of the interval (peak force, peak speed, peak speed near humans, zone breaches, breach count, and a withinEnvelope flag) by checking each sample against the signed PhysicalCapabilityScope. is_live returns true only when the heartbeat is recent (within a grace window of the declared interval) and the digest reports withinEnvelope.

python
from vouch.robotics import liveness

col = liveness.MotionCollector(scope=scope["physicalScope"])
col.record(force_n=12.0, speed_mps=0.4, near_humans=True, zone="cell-3")
hb = liveness.build_robot_heartbeat(robot_signer, session_id="sess-1",
    interval_index=0, motion_digest=col.digest(), interval_seconds=30)
ok, subject = liveness.verify_robot_heartbeat(hb, robot_signer.public_key())
live = liveness.is_live(hb)                            # fresh AND in-envelope

Security boundary: verify_robot_heartbeat fails closed on a wrong type, an invalid proof, or a malformed digest. is_live returns false on a stale heartbeat, an envelope breach, or a future-dated heartbeat beyond one interval of clock skew, so neither going dark nor exceeding the envelope leaves a robot trusted.

Guide

Credential revocation

Surgically revoke one robot credential via a status list, or kill a whole robot identity at the DID level.

Robot credentials get the same two-level revocation as the rest of Vouch: a surgical per-credential status, and a whole-DID kill.

The problem it closes: the kill switch stops one running robot locally, but a compromised capability grant or a leaked identity key needs to be invalidated for every verifier, rather than stopped once.

How it works: attach_credential_status adds a BitstringStatusList credentialStatus entry to a robot credential and re-signs it; flipping the bit in the published status list revokes it, and check_credential_status reports the result. For key compromise or a captured robot, the existing RevocationRegistry (re-exported from vouch.robotics) revokes the robot DID wholesale.

python
from vouch.robotics import revocation

cred = revocation.attach_credential_status(scope_cred, robot_signer,
    status_list_credential="https://fleet.example/status/1", status_list_index=42)
revoked = revocation.check_credential_status(cred, status_list_cred)   # bit lookup

reg = revocation.RevocationRegistry(check_remote=False)
await reg.revoke(robot_did, reason="hardware captured")               # whole-DID kill

Security boundary: check_credential_status returns true only when the credential's status entry matches the fetched list (id and purpose) and the bit is set; the caller verifies the status list credential's own proof first. A robot DID is an ordinary DID, so the registry and the .well-known distribution path apply unchanged.

Guide

Accountable safety record

A tamper-evident incident ledger plus a portable signed record of a robot safety standing.

A SafetyEventLog is an append-only, hash-linked ledger of a robot's safety events, and a RobotSafetyRecordCredential is the portable signed summary that travels with the robot.

The problem it closes: a robot's safety history lives in scattered, mutable logs that an owner can quietly edit. Insurers, regulators, and new owners need a record they can trust without trusting the operator's word.

How it works: each safety event (incident, near-miss, manual override, kill-switch trigger, envelope breach) is appended with a severity and hash-linked to the previous entry, so the chain is tamper-evident (verify_safety_log). build_safety_record summarizes a stretch of the ledger into counts by event type and by severity, the period, and the ledger head hash that anchors it.

python
from vouch.robotics import safety_record

log = safety_record.SafetyEventLog()
log.append("near_miss", severity="low", details={"zone": "cell-3"})
log.append("envelope_breach", severity="high")
rec = safety_record.build_safety_record(authority_signer, robot_did=robot_did,
    summary=log.summarize())
ok, subject = safety_record.verify_safety_record(rec, authority_signer.public_key())

Security boundary: verify_safety_log detects any altered or removed entry (the hash chain breaks). The record summary is anchored to the ledger head, so a summary that understates the log no longer matches its chain. verify_safety_record fails closed on a wrong type, an invalid proof, or a malformed summary.

Guide

Perception provenance

Sign what a robot sensor captured so it can prove what it saw and a substituted frame is detectable.

A PerceptionProvenanceCredential lets a robot prove what its sensors captured: the robot signs, at capture time, a record binding the frame's hash, the sensor, the modality, and the time to its DID.

The problem it closes: a robot acts on what its sensors report, and that evidence is exactly what gets spoofed or disputed after the fact. Signing the frame's provenance at capture makes "this is what I saw" verifiable, and makes a substituted or edited frame detectable.

How it works: hash_frame computes the multibase SHA-256 of the raw frame. A PerceptionLog hash-links each frame-provenance record into an append-only chain (the same chain the black box uses), so the sequence of perceived frames is tamper-evident. build_perception_attestation signs an attestation for a frame, optionally carrying the log head to anchor a whole segment. Only frame hashes are stored, never the raw frames.

python
from vouch.robotics import perception

log = perception.PerceptionLog()
entry = log.record(sensor_id="cam-front", modality="camera", frame=frame_bytes)
att = perception.build_perception_attestation(robot_signer, robot_did=robot_did,
    sensor_id="cam-front", modality="camera", frame_hash=entry["frameHash"],
    log_head=log.head())
ok, subject = perception.verify_perception_attestation(att, robot_signer.public_key(),
    frame=frame_bytes)                                # recomputes and compares the hash

Security boundary: verify_perception_attestation fails closed on a wrong type, an invalid proof, an unknown modality, or, when the frame is supplied, a hash that does not reproduce. verify_perception_log detects any altered or dropped frame in the chain. The open layer signs frame hashes in software, so it proves authorship and integrity of the recorded frame, not that the frame is a live hardware capture.

Guide

Offline delegation lease

A short-lived, scope-bounded grant a disconnected robot verifies and acts on with no network call.

A DelegationLeaseCredential is a self-contained grant of authority a robot can verify and act on entirely offline, for places with no connectivity.

The problem it closes: a robot in a warehouse aisle, a field, or a tunnel cannot call home to check whether it is still allowed to do something. A lease bounds what it may physically do for a fixed, short window, and it carries everything needed to verify that, so the robot needs no network.

How it works: build_delegation_lease issues a lease bounding a physical capability scope (force, speed, near-humans, zones) with a validFrom and a short validUntil. verify_delegation_lease checks the signature, that the window is current, and, when a parent scope is supplied, that the lease attenuates it. Leases nest, each sub-grant only narrowing the one above, which forms the open cross-vendor chain.

python
from vouch.robotics import build_delegation_lease, verify_delegation_lease, lease_permits, PhysicalAction

lease = build_delegation_lease(authority_signer, robot_did=robot_did, lease_id="shift-42",
    scope={"maxForceN": 80.0, "allowedZones": ["cell-3"]}, valid_seconds=3600)
ok, subject = verify_delegation_lease(lease, authority_signer.public_key())   # offline
allowed = lease_permits(subject, PhysicalAction(force_n=10.0, zone="cell-3"), lease)

Security boundary: verification is fully offline. An expired or not-yet-valid lease fails. A sub-lease that widens any dimension of its parent (more force, a new zone, a wider window) is rejected by the attenuation check, so authority can only narrow down a chain, never grow.

Guide

Trust at the disconnected edge, including space

Authenticate, delegate, and revoke with no live connection home, in space or anywhere disconnected, with revocation that is honest about time.

In orbit, on the lunar surface, deep underground, or under water, a round trip to a home server is impossible or too slow to be part of a real-time trust decision. Because a Vouch credential verifies offline against pre-distributed anchors, two nodes can authenticate each other and exchange authority at the edge with no connection home. Space is the most demanding instance of this; the same primitives serve any disconnected robot, so a satellite constellation and an underground mine use one mechanism.

The problem it closes: legacy centralized security assumes a live path to a registry to check an identity or a revocation. At the edge that path does not exist. Vouch moves the whole trust decision to the node.

What runs offline today, all built on primitives already covered above:

  • Offline mutual authentication. Two nodes in different trust domains run the three-message handshake (HELLO, ACCEPT, CONFIRM) and agree a bounded session whose scope is the intersection of what each side offers. See the handshake guide.
  • Authority that travels. A short-lived, scope-bounded delegation lease (above) and a scannable passport let a node prove what it may do and act on it while out of contact.
  • Provenance at capture. Signed perception provenance binds each sensor frame's hash to the node's key, so a substituted frame is detectable.

One honest caveat: offline trust is *enabled* by distributing trust anchors during a contact window, not by removing that step. There is no trust with no prior root; "spontaneous discovery with zero configuration" is a myth, because the anchors are the configuration. What Vouch removes is the live round trip at decision time.

The genuinely hard part is revocation, which is a freshness problem, not a signature problem: a disconnected verifier holds a status-list snapshot of unknown age, so a credential revoked after the last sync still looks valid. vouch.status_list.evaluate_freshness closes this by weighing the snapshot's age against the consequence of the action and failing closed when the view is too old.

python
from vouch.status_list import evaluate_freshness, CONSEQUENCE_CRITICAL

# snapshot = the BitstringStatusListCredential synced at last contact (or None)
verdict = evaluate_freshness(tier=CONSEQUENCE_CRITICAL, snapshot=snapshot, now=now)
if verdict.allow and not revoked_bit:
    ...  # authorize

Default staleness budgets (overridable per deployment): routine 30 days (a telemetry beacon), sensitive 24 hours (a data handoff), critical 1 hour (a physical maneuver). Security boundary: the gate fails closed on every ambiguous state, an unknown tier is treated as critical, a snapshot past its own validUntil or with a malformed validFrom is treated as absent, and an absent snapshot allows only routine. A known revocation always denies, independent of freshness. A complementary presenter-side proof of freshness (a relay-issued FreshnessToken bound to a monotonic network epoch, which resists clock drift) is specified as the dual mechanism.

Run the whole thing: examples/disconnected_exchange_demo.py completes an offline exchange over a simulated high-latency link with the socket layer disabled, so nothing can phone home. The full design is in docs/dtn-bounded-staleness-revocation.md.

The complete portfolio (disclosed PAD-106 to PAD-124) ships as open-layer modules, each an eddsa-jcs-2022 credential or a deterministic verifier predicate, with hardware acquisition (ranging, TPM, orbital propagators) left to the platform:

  • vouch.robotics.freshness: presenter freshness token bound to a network epoch, plus a graded trust-decay weight (PAD-107, 119)
  • vouch.robotics.presence: channel-geometry (range/Doppler) proof of presence (PAD-108)
  • vouch.robotics.geoscope: ephemeris/geometric-scoped authority with shrink-only regions (PAD-109)
  • vouch.robotics.quorum_trust: swarm-consensus quarantine, quorum-of-orbits update acceptance, offline threshold key continuity (PAD-110, 111, 116)
  • vouch.robotics.dtn_revocation: conditional dead-man revocation and a carried validity witness (PAD-112, 120)
  • vouch.robotics.localization: triangulated proof-of-location, kinematic-plausibility filtering, narrow-beam presence (PAD-113, 114, 121)
  • vouch.robotics.edge_trust: attested time-quality, connectivity-scaled autonomy envelope, integrity-risk authority narrowing (PAD-115, 117, 118)
  • vouch.robotics.perception_consensus: Byzantine sensor agreement, mutual-attestation mesh standing (PAD-122, 123)
  • vouch.robotics.bundle: DTN Bundle Protocol custody and credential/freshness binding (PAD-124)

Real hardware plugs in through vouch.robotics.hardware: typed sensor Protocols (NavigationSource, RangeSensor, DopplerSensor, PointingSource, ClockSource, EpochSource, IntegrityMonitor), Simulated* reference implementations, and capture/verify-live adapters that feed the predicates unchanged. See examples/hardware_seam_demo.py and the driver skeleton examples/hardware_drivers/. Two predicates ship production algorithms rather than the conservative reference bound: kinematic plausibility does real two-body orbital propagation (vouch.robotics.orbital), and the carried non-revocation witness uses a dynamic sparse-Merkle accumulator (vouch.robotics.accumulator).

Guide

Physical quorum

A cryptographic two-person rule: M of N attested approvers must sign off before a high-consequence action.

A physical quorum requires several independent approvals before a robot performs a high-consequence action, such as applying large force near a person or an irreversible move.

The problem it closes: some actions are serious enough that no single authority should be able to order them alone. A quorum makes the two-person rule cryptographic rather than procedural.

How it works: each approver signs a PhysicalActionApprovalCredential over the same action id and robot. verify_action_authorization counts the DISTINCT valid approvers from an attested approver set and authorizes the action only when at least the threshold number have approved.

python
from vouch.robotics import build_action_approval, verify_action_authorization

approvals = [build_action_approval(a, action_id="weld-7", robot_did=robot_did) for a in approvers]
authorized, who = verify_action_authorization(approvals, action_id="weld-7", robot_did=robot_did,
    approver_keys=approver_public_keys, threshold=2)

Security boundary: only distinct approvers from the attested set count, so one approver cannot reach the threshold by signing twice. Approvals for a different action or robot, from outside the approver set, with an invalid proof, out of date, or carrying a reject decision are all ignored.

Guide

Lifecycle and decommissioning

Cryptographically accountable ownership transfer, key rotation, and retirement for a robot over its whole life.

A robot is commissioned, resold, repurposed, and eventually scrapped. This makes each of those transitions verifiable: a chain of custody, a key history, and an end-of-life record.

The problem it closes: a robot outlives its first owner, and today there is no cryptographic way to prove who owns it now, which keys it has used, or that it was properly retired.

How it works: build_ownership_transfer lets the current owner hand the robot to a new owner, and linking each transfer forms a chain that verify_custody_chain walks. build_key_rotation lets the current key authorize a successor, forming a key history (verify_key_history). build_decommission retires the robot, after which a verifier should refuse to trust it.

python
from vouch.robotics import build_ownership_transfer, build_key_rotation, build_decommission

transfer = build_ownership_transfer(seller_signer, robot_did=robot, to_owner=buyer_did)
rotation = build_key_rotation(robot_signer, robot_did=robot, new_key_multibase=new_key)
retired  = build_decommission(authority_signer, robot_did=robot, reason="end of service life",
                              final_disposition="recycled")

Security boundary: a transfer verifies only when its issuer is the current owner, so no one but the owner can hand the robot on. A key rotation must be signed by the key it rotates from, so the chain of trust is unbroken. A decommission can be restricted to an attested authority set. The open layer records these as plain signed credentials; a verifier decides how strictly to enforce them.

Guide

Regulatory conformance

Map a robot credentials to safety and AI regulations, check coverage, and sign an attestation an auditor can consume.

A conformance profile is a machine-checkable mapping from a robot's Vouch credentials to the clauses of a public safety or AI regulation. Instead of a static certificate on paper, conformance becomes something a verifier can check from the credentials the robot actually holds.

The problem it closes: regulators and operators need to know a robot meets ISO 10218, ISO/TS 15066, the EU Machinery Regulation, the EU AI Act, or UL 3300, and today that lives in documents no machine can check.

How it works: check_conformance(credentials, profile_id) walks the named profile and reports, for each requirement, whether the presented credentials satisfy it, citing the clause. An assessing party then signs an attestation over that report.

Each requirement also declares how well-sourced its clause reference is, and the report totals them under citations: verified-primary (the clause text was read from the official published source), unverified-secondary (the clause number comes from secondary sources), or descriptive (a topic name an assessor cannot look up). No built-in profile is verified-primary today; the four UL 3300 requirements are descriptive. The summary travels inside the signed attestation, so CONFORMS never reads as more authoritative about the regulation than its sources are.

python
from vouch.robotics import check_conformance, build_conformance_attestation

report = check_conformance([identity, provenance, scope, safety_record], "eu-ai-act-high-risk")
print(report["conforms"], report["satisfiedCount"], "/", report["totalCount"])
print(report["citations"])   # {'verified-primary': 0, 'unverified-secondary': 4, 'descriptive': 0}

attestation = build_conformance_attestation(assessor_signer, robot_did=robot, report=report)

Built-in reference profiles: iso-10218, iso-ts-15066, eu-machinery-2023-1230, eu-ai-act-high-risk, and ul-3300.

Security boundary: the report is deterministic, so any language reproduces it from the same credentials. The attestation embeds the report and binds it by digest, so verify_conformance_attestation rejects a report that was altered after signing. The profiles are a reference crosswalk, not legal advice; a deployment confirms each mapping against the current regulation text for its market.

Guide

Post-quantum signing

Sign robot credentials with a classical proof and a post-quantum proof so they stay unforgeable across a robot decade-long life.

A robot fielded today runs for ten to twenty years, longer than classical Ed25519 is expected to stay safe. This signs robot credentials under the post-quantum profile so a robot identity signed now cannot be forged once a quantum computer arrives.

The problem it closes: a long-lived robot signed with a classical-only key could have its identity forged decades into its service life, when the classical signature no longer holds.

How it works: sign_pq attaches a proof set, an eddsa-jcs-2022 proof and an mldsa44-jcs-2024 proof over the same document, each verifiable on its own. verify_robot_credential verifies a robot credential whether it carries a classical proof or the post-quantum proof set, detected from the credential, so a fleet moves to post-quantum gradually. migrate_to_pq re-signs a fielded robot's classical credential under a post-quantum key.

python
from vouch.robotics import sign_pq, verify_robot_credential, mint_robot_identity

identity = sign_pq(mint_robot_identity(robot, root, make="Acme", model="AR-7", serial="SN-1"), robot)
ok = verify_robot_credential(identity, robot_ed25519_public_key,
                             mldsa44_public_key=robot.public_key_mldsa44_multikey())

Security boundary: a post-quantum credential passes only when both proofs in the set validate, so it is at least as strong as the classical signature and stays safe once classical signatures do not. Verifying it needs the ML-DSA-44 public key. The open layer is software signing, backward-compatible verification, and a software re-sign migration; managed post-quantum key custody and fleet migration are commercial.

Guide

Robotics from the C, C++, .NET, JVM, and Swift SDKs

Verify and integrate robot credentials from the wrapper SDKs through a curated VouchRobotics surface over the same Rust core.

The reference SDKs (Python, TypeScript, Go, and the Rust core) carry the full robotics surface. The C, C++, .NET, JVM (Java and Kotlin), and Swift wrappers expose a curated consumer surface over the same core, the same way they expose the agent operations, so an application in those languages can verify and integrate robot credentials without leaving its stack.

The curated surface: verify_robot_credential (verify a classical proof or the post-quantum proof set, auto-detected), mint_identity and verify_identity, check_conformance with build_conformance_attestation and verify_conformance_attestation, verify_passport, check_action, and sign_pq. In .NET, JVM, and Swift these are a VouchRobotics class; in C++ a vouch::robotics namespace.

csharp
using VouchProtocol.Core;

bool ok = VouchRobotics.VerifyRobotCredential(credentialJson, ed25519PublicB64);
string report = VouchRobotics.CheckConformance(credentialsJson, "eu-ai-act-high-risk");

Output is byte-identical to the reference SDKs, so a robot credential produced in one language verifies in every other. The producer-side operations (handshakes, the black box, physical quorum, the liveness heartbeat) stay in the reference SDKs; a wrapper application that needs one of those calls a reference SDK or a service built on it.

Guide

Cross-embodiment identity continuity

Let one accountable AI agent move between robot bodies with a verifiable continuity chain, and detect a fork if it is ever in two bodies at once.

An AI agent, a mind with its own Vouch identity, can run on one robot body today and a different body tomorrow. This makes that continuous and accountable.

The problem it closes: as agent minds get decoupled from bodies, there is no cryptographic way to prove that the accountable agent on body B is the same one that was on body A, or to stop the same mind running on two bodies at once.

How it works: build_embodiment binds the agent to a body and that body's hardware root for a period, signed by the agent's own key. Each embodiment names the body it left (fromBody), so verify_continuity_chain walks the links, confirms every one is signed by the same agent key, and returns the current body. check_no_fork confirms no two embodiments place the agent in different bodies with overlapping active windows. It is the inverse of the ownership custody chain: there one body passes between owners, here one mind passes between bodies.

python
from vouch.robotics import build_embodiment, verify_continuity_chain, check_no_fork

a = build_embodiment(agent, agent_did=agent_did, body_did="body-a", body_hardware_root="uA", valid_seconds=3600)
b = build_embodiment(agent, agent_did=agent_did, body_did="body-b", body_hardware_root="uB", from_body="body-a")
ok, current_body = verify_continuity_chain([a, b], agent_public_key)
no_fork, _ = check_no_fork([a, b])

Security boundary: the whole chain is signed by one persistent agent key, so a link signed by any other key breaks the continuity, and re-binding to each body's hardware root ties the mind to real hardware at each step. This is the open layer, signed credentials and software verification; managed key custody and fleet migration are commercial.

Guide

Physical custody handoff

Trace a task or object as it passes between human and robot actors, and localize damage to the hop responsible.

A physical task or object passes across a chain of actors, human and robot: a person picks an item, hands it to a robot, that robot hands it to another robot. This makes each handoff accountable.

The problem it closes: when a shared physical workflow crosses people and machines, an incident (a lost tote, a damaged item, a mis-delivery) has no cryptographic way to point at the exact hop and actor responsible.

How it works: build_handoff records that a receiving actor accepted custody of a task from a releasing actor, signed by the receiver, so the party taking responsibility signs for it. Each receiver becomes the next releaser, so verify_handoff_chain walks the chain and holder_at returns who held the task at a given time. A condition attested at each handoff lets locate_condition_change name the hop where a physical state change happened.

python
from vouch.robotics import build_handoff, verify_handoff_chain, holder_at, locate_condition_change

h1 = build_handoff(robot_a, task_id="tote-42", from_actor=picker_did, to_actor=robot_a_did, condition="intact")
h2 = build_handoff(robot_b, task_id="tote-42", from_actor=robot_a_did, to_actor=robot_b_did, condition="damaged")
ok, current_holder = verify_handoff_chain([h1, h2], {robot_a_did: a_key, robot_b_did: b_key})
change = locate_condition_change([h1, h2])   # responsible holder is robot A

Security boundary: each handoff is signed by the receiver, so an actor attests its own acceptance of custody, and the chain is only valid when each receiver is the next releaser. This is the open layer of signed credentials and software verification; managed logistics custody orchestration and fleet tracking are commercial.

Guide

Infrastructure access

Give a robot bounded, revocable, offline-verifiable access to physical infrastructure like doors, elevators, and chargers.

A robot in a warehouse, hospital, or building needs to open doors, call elevators, dock at chargers, and operate machines. This gives it a bounded, revocable, auditable way to do so.

The problem it closes: physical access today is a shared credential (a badge, a key, a fixed code) that cannot be scoped to one robot, one resource, and one time window, and leaves no attributable record of who did what.

How it works: the operator signs an InfrastructureAccessGrant with build_access_grant, naming the resource, the permitted operations, an optional zone, and a time window. The robot signs an InfrastructureAccessRequest for one operation with build_access_request. The resource runs authorize_access offline and allows the operation only when the grant verifies under the operator key and is in window, the request verifies under the robot key, the grant and request name the same robot and resource, and the operation is permitted. attenuates_grant confirms a sub-grant only narrows what it inherits.

python
from vouch.robotics import build_access_grant, build_access_request, authorize_access

grant = build_access_grant(operator, robot_did=robot_did, resource="door-3", operations=["open", "close"], zone="cell-3", valid_seconds=3600)
request = build_access_request(robot, robot_did=robot_did, resource="door-3", operation="open")
result = authorize_access(grant, request, operator_key, robot_key)   # result.ok is True

Security boundary: the grant is signed by the operator and the request by the robot, so the pair is a tamper-evident, attributable record and the decision is made offline at the resource. This is the open layer of signed grants and requests, offline authorization, and shrink-only attenuation; hardware-enforced actuation at the resource and managed fleet access-policy orchestration are commercial.

Guide

Fused-sensor provenance

Bind a robot's fused world model to the exact sensor frames that produced it, so a manipulated fusion result or a dropped input is detectable.

A robot rarely acts on a single frame. It fuses camera, lidar, and radar into one world model, an object set, an occupancy grid, or a pose, and acts on that. This binds the fused output to the exact inputs that produced it.

The problem it closes: perception provenance signs individual frames, but the thing a robot acts on is the fusion of many frames. A manipulated fusion result, or a fused output that quietly dropped or swapped an input, has no signed record tying the output back to its true inputs.

How it works: build_fused_attestation signs a FusedPerceptionAttestation binding the fused output's hash to the ordered list of input frame hashes, a digest over those inputs, and a fusion method identifier. verify_fused_attestation checks the proof and reproduces the input digest, so the attestation commits to exactly those inputs and that output. verify_fusion_inputs checks each named input against the robot's signed perception log and returns any that were never recorded.

python
from vouch.robotics import build_fused_attestation, verify_fused_attestation, verify_fusion_inputs, hash_frame

inputs = [hash_frame(cam), hash_frame(lidar), hash_frame(radar)]
att = build_fused_attestation(robot, robot_did=robot_did, fusion_method="occupancy-grid-v1", input_frame_hashes=inputs, fused_output=world_model)
ok, subject = verify_fused_attestation(att, robot_key, fused_output=world_model)
inputs_ok, missing = verify_fusion_inputs(att, perception_log.entries())

Security boundary: the robot signs the binding of a fused output to its inputs, and the input digest makes the set of inputs tamper-evident. This is the open layer of software-signed provenance reusing the perception frame hashes; hardware sensor attestation and managed sensor-fusion orchestration are commercial.

Guide

Wear and degradation

A robot signs its own wear over time and automatically narrows its capability envelope as it degrades.

A robot does not stay as capable as it left the factory: actuators wear, joints develop backlash, sensors drift out of calibration, and error rates creep up. This lets a robot attest its own degradation and operate inside a tighter envelope as it ages.

The problem it closes: a robot's physical limits are usually the static caps it shipped with, and there is no signed, verifiable link between how worn a robot is and how much it is still allowed to do.

How it works: build_wear_attestation signs a RobotWearAttestation carrying a normalized wear level (0 for as-new, 1 for fully worn) and optional metrics, bound to the robot's identity. Each attestation links to the previous one by its proof, so verify_wear_chain walks a tamper-evident wear history. attenuate_for_wear derives a physical scope whose force and speed caps are scaled down by the wear level, and the result is a valid attenuation of the original.

python
from vouch.robotics import build_wear_attestation, verify_wear_chain, attenuate_for_wear

w1 = build_wear_attestation(robot, robot_did=robot_did, wear_level=0.1)
w2 = build_wear_attestation(robot, robot_did=robot_did, wear_level=0.3, prev_proof=w1["proof"]["proofValue"])
ok, latest = verify_wear_chain([w1, w2], robot_key)
narrowed = attenuate_for_wear(full_scope, latest["wearLevel"])   # caps scaled to 0.7 of original

Security boundary: the robot signs its wear state and derives the narrowed scope credential in software. Firmware-level enforcement of the narrowed envelope and managed predictive-maintenance modeling are commercial.

Guide

Halos safety-evidence

A robot running a certified safety stack signs a tamper-evident record of what it did, bound to its identity and the certified configuration, verifiable without reading the payloads.

A robot may run a certified functional-safety stack such as NVIDIA Halos. The certification shows the stack is safe by design. This records what a specific robot actually did and binds that record to the robot's identity and the certified configuration it ran on.

The problem it closes: a design-time safety certification produces no signed, verifiable account of a specific robot's events in service, and a plain log can be altered, truncated, or detached from the robot.

How it works: SafetyEventRecorder writes each safety event, tagged by its source (the safety monitor, the event integrator, the decision maker, and the sensor pipeline, plus emergency stops and operator actions), into the encrypted, hash-linked black-box. build_safety_evidence has the robot sign a HalosSafetyEvidenceCredential sealing the black-box head and entry count, bound to its identity and the certified stack elements (the compute module, the safety operating system version, and the safety-application set). verify_safety_evidence checks the robot's proof and, when given the entries, that the chain is intact, its length matches the sealed count, and its head matches the sealed head, so a tampered, truncated, extended, or reordered record is rejected.

python
from vouch.robotics import SafetyEventRecorder, build_safety_evidence, verify_safety_evidence

rec = SafetyEventRecorder(blackbox_key)
rec.record("SAIM", "camera_blockage_cleared", {"cam": 2})
rec.record("SDM", "slow_stop", {"reason": "out_of_distribution"})
ev = build_safety_evidence(robot, halos_stack={"igxSom": "...", "halosCore": "...", "blueprint": ["SAIM", "SEI", "SDM"]}, window={"from": t0, "to": t1}, recorder=rec)
ok, subject = verify_safety_evidence(ev, robot_key, entries=rec.entries())

Security boundary: the open layer is the recorder and the signed evidence credential, composing the existing black-box and robot-identity primitives. The entries stay encrypted, so integrity, completeness, attribution, and configuration verify without the black-box key.

Guide

Regulatory evidence pack

A robot assembles its signed credentials into a machine-checked evidence pack across all five built-in regulatory profiles, with one verifiable conformance attestation per profile.

A robot facing the EU AI Act, ISO 10218, ISO/TS 15066, the EU Machinery Regulation 2023/1230, or UL 3300 assembles the credentials it already holds into one evidence pack, and the conformance checker maps them onto each regulation clause by clause.

The problem it closes: proving regulatory conformance today means assembling documents by hand, and a claimed control cannot be checked against what the robot actually presents; a machine-checkable mapping makes the same credential set verifiable evidence under five regimes at once.

How it works: the pack carries the hardware-rooted identity, the model provenance attestation, the physical capability scope, a safety record anchored to the tamper-evident ledger, a heartbeat whose MotionCollector motion digest proves the last interval stayed inside the envelope (ISO/TS 15066 continuous monitoring), and perception provenance for a captured frame (UL 3300 sensing integrity). check_conformance reports each clause as satisfied or names the exact gap, build_conformance_attestation signs a point-in-time attestation per profile binding the full report by digest, and verify_conformance_attestation checks it offline. The full flow runs in Python, TypeScript, Go, and Rust with byte-identical report digests; the Swift, JVM, .NET, and C++ wrappers verify packs through their curated surface.

python
from vouch.robotics import check_conformance, build_conformance_attestation, verify_conformance_attestation

for pid in ["eu-ai-act-high-risk", "iso-10218", "iso-ts-15066", "eu-machinery-2023-1230", "ul-3300"]:
    report = check_conformance(credentials, pid)
    print(pid, report["conforms"], report["citations"])
    att = build_conformance_attestation(assessor, robot_did=robot_did, report=report)
    ok, subject = verify_conformance_attestation(att, assessor_key)

What CONFORMS does and does not say: it means the evidence covers the clauses this profile maps, which is a weaker claim than compliance with the regulation. Every report carries a citations summary of how well-sourced its clause references are, and so does the signed attestation. The ISO standards and UL 3300 are paywalled and the EU texts were read from a third-party reproduction, so no built-in requirement is verified-primary today; docs/robotics-conformance-crosswalk.md records the specific doubts, clause by clause.

Security boundary: the open layer is the declarative profiles, the deterministic checker, and the signed point-in-time attestation, demonstrated end to end in examples/robotics_ai_act_evidence_pack.py. Hosted continuous monitoring, maintained and certified profiles, and auditor evidence portals are commercial.

Guide

VLA accountability loop

A VLA-driven robot verifies model provenance before autonomy, gates every planned action against its signed physical scope, and black-boxes every decision.

A robot handing control to a vision-language-action model (such as Gemini Robotics ER 2) composes three primitives into one accountable control loop: provenance on load, a pre-actuation scope gate, and a tamper-evident black box.

The problem it closes: a VLA planner is a black box that can propose anything, and without a loop around it there is no proof of which model was in control, no enforced physical bound on what it tried, and no trustworthy record of what was allowed or denied.

How it works: on load, the robot verifies the signed ModelProvenanceAttestation for the exact weights, safety policy, and config it is about to run, and refuses autonomy otherwise. Before each actuation, check_physical_action evaluates the planner's proposed action against the signed PhysicalCapabilityScope, so an over-speed motion near a human or a move outside an allowed zone is denied rather than attempted, with the reasons recorded. Every decision, allowed or denied, is appended to the encrypted, hash-linked BlackBoxLog; verify_blackbox_chain later proves the decision record is unaltered, and altering even one entry is detected.

python
from vouch.robotics import check_physical_action, BlackBoxLog, verify_blackbox_chain

ok, _, _ = load_model_with_provenance(robot, robot_did, robot_key)  # no provenance, no autonomy
result = check_physical_action(scope, proposed_action)
blackbox.append("actuation_allowed" if result.ok else "actuation_denied", {"reasons": result.reasons})
chain_ok, error = verify_blackbox_chain(blackbox.entries())

Security boundary: the open layer is the three composed primitives and the runnable loop in examples/robotics_vla_accountability_loop.py (with TypeScript, Go, and Rust ports, and the check_action gate in every wrapper SDK). The gate needs no cooperation from the model: a denied action never actuates. Hosted fleet dashboards over black-box records are commercial.

Part 13

Community

Contribute to the protocol and earn a signed Vouch Verified Contributor credential.

Guide

Become a Vouch Verified Contributor

Land a merged pull request and receive a real, signed Verified Contributor credential, published to a certificate page and the contributors list.

What it is

When you land a merged pull request on the repository, an automated workflow mints a Vouch Verified Contributor credential for you. It is a real Verifiable Credential, not a decorative image: the project signs it with its own protocol.

What you receive

  • A certificate page at vouch-protocol.org/c/<your-handle>/<pr>.
  • A listing on the contributors page.
  • A comment on your pull request with the badge, a copy-paste snippet, and the full credential inline.

The credential

  • Signed with the eddsa-jcs-2022 cryptosuite, the same default format every Vouch SDK produces.
  • Issued by did:web:vouch-protocol.com:contributors, chained back to the project root identity did:web:vouch-protocol.com.
  • The subject is the author of the merged commits, so credit stays correct even when a maintainer relays a contribution for someone else.

Verify it

Because it is a normal Vouch credential, anyone can verify it with the SDK or the hosted verifier:

python
from vouch import Verifier

is_valid, passport = Verifier.verify_credential(credential, public_key=issuer_public_jwk)
print(is_valid, passport.subject_did)

Getting started

New to the project? Pick up a good first issue. The badge is offered, never required.