Human-in-the-Loop Tools for the Agent SDK
Blog post from OpenRouter
The Agent SDK has introduced a fourth tool type called human-in-the-loop (HITL) tools, which allow agents to automatically handle routine calls and pause for human intervention when necessary, controlled by a single hook. These tools can auto-resolve or escalate calls based on input, with the decision logic centralized in the onToolCalled function. Depending on the input, HITL tools either continue the process automatically or pause for human review, with the application resuming the loop once a human decision is made. An optional onResponseReceived hook can transform and process human input before it is passed to the model. This approach is useful for scenarios where decisions depend on data, such as dollar thresholds or compliance checks, streamlining the integration of human judgment into automated processes without scattering logic across application code. The SDK manages state tracking and hook dispatch, requiring minimal code from developers, and provides a cookbook recipe for implementing these tools along with documentation and support through an API key and community feedback on Discord.
No tracked trend matches for this post yet.
Use this post, company, and trend context to find content marketing opportunities, perform competitive analysis, or address product feature gaps via the Plushcap MCP server or the Plushcap API.