Human-in-the-loop
Gate tool calls behind approval. Surface reviews to humans before execution.
#Gate a tool
import { makeTool } from '@agentskit/tools'
const deployTool = makeTool({
name: 'deploy',
description: 'Deploy to production',
schema: z.object({ service: z.string() }),
requiresConfirmation: true,
execute: async ({ service }) => deploy(service),
})Runtime pauses on invocation and emits
tool.awaiting-approval. Resume with chat.approve(toolCallId) or
chat.deny(toolCallId, reason).
#UI
- ToolConfirmation β drop-in React / Vue / etc.
#Patterns
- Auto-approve low risk: approve if cost under threshold; gate the rest.
- Review queue: persist
awaiting-approvalto a DB; humans approve from dashboard. - Double-sign: require two approvers; track via shared context.
#Related
Explore nearby
- PeerAgents
Everything that runs the loop β runtime, tools, skills, delegation, durable execution, topologies, background agents, HITL, self-debug.
- PeerRuntime
Execution engine for autonomous agents β runs a ReAct loop (observe, think, act) until final answer or step limit.
- PeerMulti-Agent Delegation
Coordinate multiple specialist agents from a parent agent using directed delegation.