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 application's rules decide which AI agentAn AI system that doesn't just answer once but works toward a goal in a loop — taking actions, reading the results, and deciding what to do next.Full definition → 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.
AI agent — An AI system that doesn't just answer once but works toward a goal in a loop — taking actions, reading the results, and deciding what to do next.
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.