Concepts

Decision Outcomes

approve, block, escalate, retry, request_evidence, and pending outcomes.

Decision Outcomes

Overview

AgentTrust returns one of six governance decisions for every agent execution: approve, retry, request_evidence, escalate, block, or pending. Each outcome drives different SDK behavior and operator workflows.

Why It Matters

Your application must handle each outcome correctly — especially block (which can raise BlockedError) and escalate (which routes to human reviewers).

Prerequisites

Step-by-Step Guide

Outcome reference

OutcomeMeaningSDK defaultOperator action
approveOutput passes all checksReturn outputNone
retryOutput may be improvableReturn output; log warningConsider re-prompting agent
request_evidenceOutput needs supporting evidenceReturn output; review queueHuman provides evidence
escalateHigh risk; human review requiredConfigurable block/allowReview queue assignment
blockPolicy violation or critical riskRaise BlockedErrorInvestigate and fix policy/agent
pendingAsync judge in progressReturn outputPoll audit record later

Risk tiers

Risk tiers influence decision mapping:

TierTypical trigger
lowAll checks pass, high confidence
mediumMinor policy flags or moderate confidence
highPolicy violations, low confidence, adversarial signals
criticalHard policy block, trust chain violation

Configuring block behavior

from agentrust_sdk import harness

@harness(block_on_block=True, block_on_escalate=False)
def my_agent(user, input):
    return {"result": "..."}

Handling in direct client code

outcome = result.decision.outcome
if outcome == "block":
    raise RuntimeError(f"Blocked: {result.decision.reasons}")
elif outcome == "escalate":
    notify_reviewer(result.envelope_id)
elif outcome == "retry":
    return rerun_with_feedback(result.decision.reasons)

Examples

Payment agent — expected block:

@harness
def payment_agent(user, input):
    return {"transfer": 100000, "currency": "USD"}  # triggers financial policy
# Raises BlockedError if amount exceeds policy threshold

FAQ agent — expected approve:

@harness
def faq_agent(user, input):
    return {"answer": "Our hours are 9am–5pm EST"}
# Returns normally with outcome=approve

Best Practices

  • Log envelope_id with every decision for audit correlation
  • Route escalate and request_evidence to your ticketing system via webhooks (Team+)
  • Use block_on_escalate=True for high-stakes domains (finance, healthcare)
  • Do not treat retry as automatic — implement explicit retry logic in your agent loop

Common Mistakes

  • Ignoring retry and request_evidence outcomes (they still return output by default)
  • Blocking all agents on any non-approve outcome in production (too aggressive)
  • Not surfacing decision.reasons to operators for debugging

Troubleshooting

IssueFix
Everything blockedReview decision_thresholds.yaml and policy pack rules
Never blocksCheck block_on_block=False (default in some configs)
Stuck on pendingVerify Redis and judge worker are running (Enterprise)