Evaluation Walkthrough — End-to-End Golden Path

This walkthrough traces a single agent action through the complete ACGP governance pipeline: from cognitive trace to intervention decision. Every value is concrete — copy-paste any JSON into the conformance runner or SDK to verify.


Scenario

An AI trading agent (principal urn:acgp:agent:trading:prod:7f4c9d2a, display label agent-1, Governance Tier GT-3) wants to execute a stock purchase for $150,000. A governance steward evaluates the action against a financial services blueprint.

Common Evaluation Outcomes

  • evaluated — scorer ran and produced a normal contribution
  • degraded — fallback scorer or degraded mode was used
  • unavailable — scorer was unavailable
  • error — scorer failed closed
  • failed_evidence_policy — evidence gate failed before scorer execution; score is 0.0 and contributors are empty

failed_evidence_policy is not the same as a scorer crash. It indicates an admissibility failure before the scorer ran.


Step 1: Agent Emits a Cognitive Trace

The agent sends a TRACE message to the steward:

{
  "protocol": "acgp",
  "protocol_version": "1.0.0",
  "message_type": "TRACE",
  "message_id": "msg-trace-001",
  "timestamp": "2026-03-01T14:30:00Z",
  "sender_id": "trading-runtime-1",
  "receiver_id": "steward-1",
  "payload": {
    "trace_id": "trace-001",
    "action": {
      "name": "execute_trade",
      "parameters": {
        "symbol": "ACME",
        "quantity": 1000,
        "price": 150.00,
        "trade_value": 150000
      }
    },
    "reasoning": "Price momentum analysis indicates upward trend. Risk-adjusted return exceeds threshold.",
    "confidence": 0.82,
    "agent_id": "urn:acgp:agent:trading:prod:7f4c9d2a",
    "meta": {
      "agent_label": "agent-1"
    },
    "governance_tier": "GT-3"
  }
}

Key fields:

  • governance_tier: "GT-3" — determines which Governance Tier defaults apply
  • confidence: 0.82 — the agent's self-reported confidence
  • agent_id: stable governed principal identifier assigned by runtime or operator control
  • sender_id: runtime sender; it can differ from the governed principal identifier
  • action.parameters: includes trade_value for tripwire evaluation

Step 2: Blueprint Configuration

The steward loads a financial services blueprint:

name: financial-services-trading
version: 1.0.0
description: Governance for automated trading agents

scope:
  governance_tiers: ["GT-3", "GT-4"]
  tools: ["execute_trade", "place_order"]

scoring:
  thresholds:
    ok: 0.20
    nudge: 0.35
    escalate: 0.50
    # Risk > escalate -> block (implicit; halt is tripwire-only)

checks:
  - name: reasoning_quality
    weight: 0.30
    description: Quality and completeness of agent reasoning
  - name: confidence_calibration
    weight: 0.20
    description: Alignment between stated confidence and evidence
  - name: risk_assessment
    weight: 0.25
    description: Adequacy of risk evaluation
  - name: compliance_alignment
    weight: 0.15
    description: Regulatory and policy compliance
  - name: output_safety
    weight: 0.10
    description: Safety of proposed action

tripwires:
  - id: tw_large_trade
    when:
      hook: tool_call
      tool: execute_trade
      condition: "args.trade_value > 100000"
    on_fail: escalate
    severity: high
    message: "Trade value exceeds $100,000 threshold"

trust_debt:
  accumulation:
    flag: 1.0
    nudge: 0.5
    block: 3.0
    escalate: 2.0
  decay:
    decay_fraction: 0.05
    interval: per_evaluation
  thresholds:
    warning: 5.0
    critical: 10.0
    halt: 15.0

Note the nested scoring shape (scoring.thresholds.*) — this is the canonical v1.0 form.


Step 3: Tripwire Evaluation

Before CTQ scoring, the steward evaluates tripwires. The trace matches tw_large_trade:

  • Hook: tool_call on execute_trade
  • Condition: args.trade_value > 100000150000 > 100000true
  • Polarity: violation-when-true → tripwire fires
  • Action: on_fail: escalate

The tripwire result is recorded, but evaluation continues to CTQ scoring (escalation is the minimum intervention, not a halt).


Step 4: CTQ Check Scoring

The steward evaluates each check. Scores range from 0.0 (no risk) to 1.0 (maximum risk):

Check Score Weight Weighted
reasoning_quality 0.15 0.30 0.045
confidence_calibration 0.25 0.20 0.050
risk_assessment 0.40 0.25 0.100
compliance_alignment 0.10 0.15 0.015
output_safety 0.05 0.10 0.005
Total 1.00 0.215

Aggregate risk score: 0.215


Step 5: Governance Tier Threshold Merge (ACGP-3 §7.3)

The agent is in Governance Tier GT-3. The GT-3 default thresholds are:

GT-3 defaults: ok=0.20, nudge=0.35, escalate=0.50, block=implicit above 0.50

The blueprint thresholds are:

Blueprint:     ok=0.20, nudge=0.35, escalate=0.50, block=0.65

Merge rule: effective = min(blueprint, governance_tier_defaults) per threshold:

Effective:     ok=0.20, nudge=0.35, escalate=0.50, block=implicit above 0.50

Governance Tier GT-3 is stricter on nudge, escalate, and block — its values win.


Step 6: Risk-to-Intervention Mapping

With the aggregate risk score of 0.215 and effective thresholds:

0.215 > 0.20 (ok threshold)  → not ok
0.215 ≤ 0.30 (nudge threshold) → nudge

CTQ-based intervention: nudge

But the tripwire fired with on_fail: escalate. The final intervention is the stricter of the two:

  • CTQ: nudge
  • Tripwire: escalate
  • Final: escalate

Step 7: Steward Emits INTERVENTION

{
  "protocol": "acgp",
  "protocol_version": "1.0.0",
  "message_type": "INTERVENTION",
  "message_id": "msg-intv-001",
  "timestamp": "2026-03-01T14:30:01Z",
  "sender_id": "steward-1",
  "receiver_id": "trading-runtime-1",
  "correlation_id": "msg-trace-001",
  "payload": {
    "decision": "escalate",
    "reasoning": "Trade value $150,000 exceeds $100,000 tripwire. Risk score 0.215 in nudge range, but tripwire escalation takes precedence.",
    "trace_id": "trace-001",
    "risk_score": 0.215,
    "tripwires_fired": ["tw_large_trade"],
    "flags": null
  },
  "security": {
    "checksum_alg": "sha256",
    "checksum": "..."
  }
}

Key observations:

  • decision: "escalate" — lowercase, as required by PATCH-21
  • flags: null — no orthogonal flag was raised (PATCH-04)
  • security.checksum — integrity-protected via RFC 8785 JCS (PATCH-05A)

Step 8: Flag Attachment and Trust Debt Update

No orthogonal flag was raised in this scenario, so flags remains null and the trust-debt update observes only the final primary decision (escalate). In the canonical flow, flag attachment happens before trust debt is updated.

The escalation adds debt per the accumulation config:

Previous debt:  0.0  (clean slate)
+ escalate:    +2.0
= Current debt: 2.0  (below warning threshold of 5.0)

After decay (decay_fraction 0.05, applied at next evaluation):

Decayed debt: 2.0 × 0.95 = 1.9

If trust debt crosses the configured review threshold, runtime handling can tighten immediately and Governance Tier review may be required even if the current trace's direct risk score remains moderate.


Wire Protocol Summary

This scenario produced two wire messages:

  1. TRACE (agent → steward): cognitive trace with action details
  2. INTERVENTION (steward → agent): governance decision

In a complete session, the sequence would also include: - SESSION_INIT: steward sends blueprint + config to agent at session start - EVAL: steward's internal evaluation record (for audit) - AUDIT: periodic audit summary


Verify It Yourself

from acgp import GovernanceSteward, CognitiveTrace, PostgresStateStorage

# Create steward
steward = GovernanceSteward.production(
  blueprint_file="financial-services-trading.yaml",
  state_storage=PostgresStateStorage(connection_string="postgresql://runtime/acgp"),
)

# Create trace
trace = CognitiveTrace(
    action="execute_trade",
    parameters={"symbol": "ACME", "quantity": 1000, "price": 150.0, "trade_value": 150000},
    reasoning="Price momentum analysis indicates upward trend.",
    confidence=0.82,
    agent_id="urn:acgp:agent:trading:prod:7f4c9d2a",
    meta={"agent_label": "agent-1"},
    governance_tier="GT-3",
)

# Evaluate
result = steward.evaluate(trace)
print(f"Decision: {result.decision}")  # → escalate
print(f"Risk score: {result.risk_score}")
print(f"Tripwires fired: {result.tripwires_fired}")