← Lesson
Handoff Is a First-Class Stop
Joeven
Run
Reset
Python loads on first run
def handoff(why, tried, pending=None): return { "stop": "handoff", "why": why, "tried": list(tried), "pending": pending, "user_msg": "A person will take this. You are not blocked on the model.", } print(handoff("unknown_intent", ["router"], None)["stop"]) print(handoff("policy", ["billing"], {"tool": "refund", "amount": 40})["pending"]) print("crash" in handoff("budget", ["search", "search"], None)["user_msg"])
Run to execute this in your browser. Nothing is sent to a server.