HITL 人工审批隔离工作流
智能体隔离栈的第三层:危险工具调用被挂起并交由人工审核,执行前由人批准或中止。
完整 FlowZap 代码
将以下 FlowZap 代码复制并粘贴到您的 FlowZap 账户的项目中,即可查看此模板图。
agent { # Agent
n1: circle label:"Dangerous Tool Call"
n2: rectangle label:"Request Human Approval"
n5: diamond label:"Human Approved?"
n6: rectangle label:"Execute Tool Safely"
n7: rectangle label:"Abort Operation"
n8: circle label:"Done"
n1.handle(right) -> n2.handle(left)
n2.handle(bottom) -> human.n3.handle(top) [label="approval request"]
n5.handle(right) -> n6.handle(left) [label="approved"]
n6.handle(right) -> n8.handle(left)
n7.handle(right) -> n8.handle(left)
n5.handle(bottom) -> n7.handle(bottom) [label="Rejected"]
}
human { # Human Reviewer
n3: rectangle label:"Review Tool Call and Context"
n4: rectangle label:"Return Decision"
n3.handle(right) -> n4.handle(left)
n4.handle(top) -> agent.n5.handle(bottom) [label="decision"]
}
安装 MCP 包npm install -g flowzap-mcpMCP 文档