Protocol for verifiable computational experiments
K-Veritas records what an experiment or an AI agent did as signed evidence, so any reviewer can independently check what ran and who did it.
Core principles
Passivity
Observers monitor execution without mutating original experiment logic.
Data boundaries
Captured evidence focuses on metadata and telemetry, not proprietary datasets.
Environment integrity
Dependencies and runtime fingerprints are recorded to detect drift.
Integrity
Any change to a signed report makes it fail verification.
Data models
Experiment UUID, machine fingerprint, attestation token, project root
Command, duration, exit status, stdout and stderr hashes, run digest
Canonical data hash, RSA-PSS signature, nonce, timestamp, run anchors
Signing
payload = "{data_hash}:{nonce}:{signed_at}"
signature = RSA-PSS-SHA256(payload, salt=MAX, key=4096)The DataHash is a SHA-256 digest of the captured runs. The seal also binds a visual PDF hash and, at open disclosure, the code bundle hash. The server refuses to seal if any run differs from the digest it received when that run ended.
Metric capture
Your script prints one line per result, from any language. The whole output is hashed into the signed record, so each result stays tied to the run that produced it.
KV <name>=<number> [<name>=<number> ...] [step=<label>]Example (Python): print(f"KV accuracy={acc}")
Example (Bash): echo "KV loss=0.24"
Workflow
run
Runs any command. Starts a session if needed. Results are read from its output; the run's digest goes to the server when it ends.
seal
Signs the session into a report.
verify
Checks the signature, origin and run anchors.
Agent sessions
kveritas agent -- <command> records any agent from outside, whatever its framework. A system-call filter, installed before the agent starts and inherited by every process it launches, reports each command, file change and connection. The agent cannot turn it off.
genesis = sign(session, agent, operator)
entry[i].link = SHA-256(entry[i] with prev_link = entry[i-1].link)
witness = server receives entry[i].link as it is recorded
report entry = SHA-256(readable pages)
head = sign(last link)Each entry links to the one before it and reaches the server while the agent runs; the server refuses a seal that is missing an entry or whose chain differs. Verification rebuilds the chain, names any changed entry, flags processes that reached outside the session, and checks the agent's own labels against what it actually did. The format is open.