跳到正文
@OpenRouter· @openrouter · X·· 2026-06-10AI 评分52
AI 导读

OpenRouter Agent SDK 新增 human-in-the-loop 工具,可自动处理常规工具调用,并把高风险调用暂停交由人工审核。调用方返回值即让智能体继续运行,返回 null 则把该调用交给应用等待人工输入。据 OpenRouter 说明,SDK 负责暂停执行、跨重启持久化状态、按 schema 校验人工响应以及干净恢复。

正文

The OpenRouter SDK handles the hard parts:

Pausing execution, persisting state across restarts, validating human responses against schemas, and resuming cleanly:

引用OpenRouter (@OpenRouter)@OpenRouter
New in the OpenRouter Agent SDK: human-in-the-loop tools. Auto-resolve routine tool calls. Pause high-stakes ones for review. Return a value to keep the agent running. Return null to surface the call to your app for human input.
在 X 查看被引用的帖子

来源:@OpenRouter · x.com