Outcome verification
Move from “what happened?” to “what happened, did it work, and was it worth it?” Every agent run can record an outcome — its status, HOW it was verified, and the business value it produced. Verified outcomes feed the agent's trust score and the cost-to-value analytics.
Record an outcome
await run.recordOutcome({
taskType: "supplier-analysis",
status: "success",
verificationMethod: "human_approval", // REQUIRED — never self-declared
businessValueEstimate: 1200, // optional, in valueCurrency (USD)
// costUsd defaults to the run's recorded model executions
});Warning
Outcome statuses
| Status | Meaning |
|---|---|
| pending | Recorded, not yet verified |
| success | Verified successful |
| partial_success | Partially achieved the expected outcome |
| failure | Verified failed |
| disputed | Verification contested |
| awaiting_human_review | Queued for a human decision |
| unverifiable | No verification path exists |
Verification methods
| Method | Meaning |
|---|---|
| deterministic | Programmatic check with a known expected result |
| api_confirmation | External API confirmed the effect |
| db_state | Database state matches the expected outcome |
| human_approval | A human reviewer signed off |
| secondary_agent | An independent agent verified the result |
| rules_engine | A rules engine validated the outcome |
| external_verifier | A third-party verifier attested |
| webhook | A customer-defined webhook confirmed |
Human review
Outcomes flagged for review appear on the Outcomes dashboard. Approval confirms a verified success; rejection marks failure. Both decisions append a hash-chained audit event and move the agent's trust score (approval +2, rejection −8).
// Ask for review at record time:
await run.recordOutcome({
taskType: "financial-transfer",
humanReviewRequired: true, // → status: awaiting_human_review
verificationMethod: "human_approval",
});
// A reviewer approves or rejects in the dashboard (or via API):
// PATCH /api/outcomes/:id/review { "decision": "approved" }Cost-to-value analytics
Because outcomes carry both cost (auto-derived from the run's model executions) and estimated business value, ProofLedger can answer: cost per successful outcome, cost per failed outcome, and value-to-cost ratio — per agent, per model, per task type.