OpenRouter's human-in-the-loopRequiring a person's approval at specific points in an automated process, chosen so the irreversible steps are the ones a human sees.Full definition → tools let an ApplicationSoftware arranged so that a person can use it; in this course, the software around a model that accepts your request, prepares the context and shows the reply.Full definition →'s rules decide which agent calls need a person. In the tutorial's payment-approval example, a agent hookA script the harness runs automatically at a fixed point in an agent's loop — before a tool call, after an edit, on session start.Full definition → returns approval for amounts below $100 and pauses for human review at $100 or above. The application presents the pending call, collects a decision and returns it to resume the agent. This lets one approval workflow handle routine cases automatically while escalating specified cases. When every invocation must receive consent, the SDK's separate requireApproval option always pauses before execution. Tool lifecycle and comparison.
Terms in this piece · Glossary
human-in-the-loop — Requiring a person's approval at specific points in an automated process, chosen so the irreversible steps are the ones a human sees.
Application — Software arranged so that a person can use it; in this course, the software around a model that accepts your request, prepares the context and shows the reply.
agent hook — A script the harness runs automatically at a fixed point in an agent's loop — before a tool call, after an edit, on session start.
Function — A named block of instructions that takes inputs, called arguments, and hands back a result, called its return value.