The Open Truth Engine

Verity
The open truth engine for agent decision verification.

Verity records every settlement decision — the inputs, the rules, the evidence, the outcome — and makes it deterministically replayable by anyone. Given the same inputs and the same rules, replay always produces the same result. Not a claim. Mathematical proof.

License: MIT|Version: v0.1.0|By: Agentra Labs
CAPTUREHASHRECORDREPLAYVERIFY
The Problem

Agents can settle.
But can they prove it?

When an autonomous agent completes work and receives payment, something important is missing: a tamper-proof record of why the outcome resolved the way it did.

Without that record, disputes have no ground truth. Audits have no replay. Enterprises cannot govern what they cannot inspect.

Verity is that record.

SystemWhat it records
Payment logsAmount, status, timestamp
Audit logsWho did what, when
BlockchainTransaction hash, balance change
VerityDecision inputs, rules, evidence, outcome, deterministic replay
VerityReceipt

Every decision.
Complete. Replayable.

Before execution begins, Verity captures the complete decision context. After execution, it records the outcome and links the full chain. If you replay this receipt with the same inputs and the same rules, you get the same outcome. Every time. That is the invariant.

verity_id — unique receipt identifier

settlement_id — which settlement this governs

policy_version — which rules were in effect

input_state — everything the system knew

evidence[] — what was evaluated

outcome — SUCCESS / FAIL / UNKNOWN / DISPUTED / REVERSED

replay_hash — deterministic fingerprint

chain_hash — link to prior receipt

Rust Crates

Five crates.
One responsibility each. Composable.

cargo add

verity-kernel

Canonical types, integer-only money arithmetic, deterministic serialization. The foundation every other crate depends on. Money is always integer minor units. No float arithmetic anywhere.

MoneyBasisPointscanonical_hash()CanonicalTimestamp
5 states

verity-outcomes

The outcome state machine. Five outcomes: SUCCESS, FAIL, UNKNOWN, DISPUTED, REVERSED. Explicit transitions only. UNKNOWN is a first-class state — the system never pretends certainty it does not have.

SUCCESSFAILUNKNOWNDISPUTEDREVERSED
hash chains

verity-integrity

Hash chains, Merkle trees, inclusion proofs. Every receipt links to the prior receipt in that agent's chain. A broken chain is detected immediately.

chain_hashmerkle_rootinclusion_proof()verify_chain()
reversals

verity-finality

Finality classes and reversal journals. A Stripe settlement is reversible. A USDC on-chain settlement is irreversible. Verity models this explicitly. Reversals are journaled — not edits.

FinalityClassReversalJournalis_reversible()journal_entry()
append-only

verity-ledgers

Append-only MoneyLedger and EvidenceLedger. No UPDATE. No DELETE. Enforced at the database trigger level. The past cannot be rewritten.

MoneyLedgerEvidenceLedgerappend()NO UPDATENO DELETE
Outcome States

Explicit states. No false confidence.

SUCCESS

Conditions met. Funds released.

FAIL

Conditions not met. Funds returned.

UNKNOWN

Verification ambiguous. Pre-declared resolution path executes.

DISPUTED

One party challenges. Deterministic arbitration engages.

REVERSED

Settlement was final. Now reversed via journal entry.

UNKNOWN is not an error. It is the honest answer when evidence is insufficient or a condition times out. The pre-declared resolution path handles it. No money sits in limbo.

Public Verification

The truth is public. No account required.

Paste any Verity receipt hash to verify it independently. No ZexRail account, no login, no trust required.

Anyone holding a receipt hash can verify it. This is how disputes get resolved, enterprises audit agent fleets, and regulators inspect autonomous commerce.

hash-chained receipt sequence

Architecture

Truth engine, not audit log.

Verity is not a database that records what happened after the fact. It captures the decision context before execution and finalizes the truth record after. The pre-execution capture is what makes replay possible.

If the engine crashes between capture and finalization, the orphaned record is detected on restart and completed. No decision is ever lost.

SettlementIntent created
Verity captures BEFORE execution
(outcome = UNKNOWN)
Settlement engine executes
Verity finalizes: UNKNOWN → SUCCESS / FAIL
VerityReceipt available for replay
Examples

Code in action.

Capturing a decision

capture.rs
let receipt = verity.capture(SettlementDecision {
    settlement_id: "stl_4b7c9e2f",
    input_state: current_state,
    rules: active_policy,
    evidence: vec![quality_score_ref, delivery_proof_ref],
})?;

Replaying a decision

replay.rs
let replayed = verity.replay(receipt.verity_id)?;
assert_eq!(receipt.outcome, replayed.outcome);
assert_eq!(receipt.replay_hash, replayed.replay_hash);
Implementations

Who uses Verity.

Agentra Rail

Reference implementation. Production settlement at scale.

ZexRail ships with Verity built in. Every settlement is automatically receipted and replayable. Get started →

Build your own

Any XAP-compatible system can run Verity. The crates are independent.

List your implementation
FAQ

Common questions.

Implemented by

ZexRailYour projectYour projectYour project
ZexRailYour projectYour projectYour project

Build verifiable agent systems.

Install the Rust crates, read the documentation, or verify a receipt right now.