The SBAR Handoff Template
def build_handoff_summary(situation: dict) -> dict:
"""
Structured handoff using SBAR framework.
Reviewer should be able to decide in < 2 minutes.
"""
return {
# SITUATION: What's happening right now
"situation": {
"summary": situation["one_line_summary"],
"escalated_by": "Automated refund agent",
"escalated_at": utcnow(),
"escalation_reason": situation["trigger"],
},
# BACKGROUND: What the agent knows
"background": {
"customer": {
"id": situation["customer_id"],
"name": situation["customer_name"],
"tier": situation["customer_tier"],
"history_summary": situation["customer_history_summary"], # 2 sentences max
},
"order": {
"id": situation["order_id"],
"amount": situation["order_amount"],
"status": situation["order_status"],
"date": situation["order_date"],
},
"request": {
"requested_amount": situation["refund_requested"],
"reason": situation["refund_reason"],
"policy_limit": 500.00,
"amount_over_limit": situation["refund_requested"] - 500.00
}
},
# ASSESSMENT: Agent's analysis
"assessment": {
"confidence": situation["confidence"],
"policy_status": "EXCEEDS_AUTO_LIMIT",
"customer_notes": situation.get("customer_notes"),
"agent_reasoning": situation["why_escalated"]
},
# RECOMMENDATION: Agent's best guess
"recommendation": {
"suggested_action": "approve_exception",
"reasoning": (
f"Customer is {situation['customer_tier']} tier with "
f"{situation['tenure_years']} years of account history. "
f"Amount is ${situation['refund_requested'] - 500:.2f} over limit. "
f"Prior refund history: {situation['prior_refunds']}."
),
"confidence_in_recommendation": "medium"
},
# OPTIONS: Clear choices with consequences
"decision_options": [
{
"option": "approve_full",
"label": f"Approve full ${situation['refund_requested']:.2f}",
"consequence": "Refund processed immediately. Audit log entry created.",
"requires": "manager_authorization"
},
{
"option": "approve_partial",
"label": "Approve up to $500 (policy limit)",
"consequence": "Partial refund processed. Customer informed of remaining balance.",
"requires": "standard_authorization"
},
{
"option": "deny",
"label": "Deny refund",
"consequence": "Customer notified with policy explanation. Agent closes case.",
"requires": "standard_authorization"
}
],
# VERIFICATION: Source material for reviewer
"source_documents": [
situation.get("order_record_url"),
situation.get("original_request_transcript")
]
}
Decision Recording
def record_review_decision(
handoff_id: str,
reviewer_id: str,
decision: str,
reasoning: str,
correction: dict = None
) -> dict:
"""
Capture reviewer decision for:
1. Audit trail
2. Calibration feedback
3. Agent continuation
"""
record = {
"handoff_id": handoff_id,
"reviewer_id": reviewer_id,
"decision": decision,
"reasoning": reasoning,
"decided_at": utcnow(),
"correction": correction, # If reviewer modified agent's data
"agent_was_right": decision == "approve_full" # For calibration
}
# Feed to calibration system
calibration_system.record_outcome(
confidence_tier=handoffs[handoff_id]["assessment"]["confidence"],
agent_recommendation=handoffs[handoff_id]["recommendation"]["suggested_action"],
reviewer_decision=decision,
agent_was_right=record["agent_was_right"]
)
# Resume agent with decision
return resume_agent(handoff_id, record)
Key Takeaways
- SBAR structure: Situation, Background, Assessment, Recommendation
- < 2 minute decision time — if it takes longer, the handoff is too complex
- Source document included — reviewer verifies, not just reads extracted data
- Recommendation from agent — reviewer confirms or overrides, not starts from scratch
- Decision recording feeds calibration — handoffs improve the system over time