Principle:ANative Lab EvoAgentX Human In The Loop
| Knowledge Sources | |
|---|---|
| Domains | HITL, Workflow, Agents |
| Last Updated | 2026-10-21 00:00 GMT |
Overview
Pattern for integrating human judgment into automated agent workflows via approval checkpoints, input collection, and execution interception.
Description
Human-in-the-Loop (HITL) is the practice of inserting human decision points into an otherwise automated agent workflow. A HITL manager mediates between the workflow and a human operator: when a workflow node with an interceptor agent is reached, the interceptor calls the manager to request human approval (or rejection) before the target agent's action executes. This enables human oversight of critical decisions, safety checks, and guided corrections without halting the entire workflow.
Usage
Use this principle when human oversight is needed at specific points in a workflow:
- Pre-execution approval: Require human approval before an action runs (`mode=PRE_EXECUTION`)
- Post-execution review: Review results after an action completes (`mode=POST_EXECUTION`)
- User input collection: Collect structured input from the user mid-workflow
- Interaction types: APPROVE_REJECT, REVIEW_EDIT_STATE, REVIEW_TOOL_CALLS, MULTI_TURN_CONVERSATION
Theoretical Basis
The HITL pattern intercepts the execution flow:
# Abstract pattern (not real implementation)
class HitlInterceptor:
async def execute(self, target_action, hitl_manager):
response = await hitl_manager.request_approval(
target_action, inputs, interaction_type, mode
)
if response.decision == APPROVE:
return target_action.execute(inputs)
else:
raise RejectedByHuman(response.feedback)
Key properties:
- Interception: A special agent node intercepts another agent's execution
- Async blocking: The workflow blocks until the human responds (with timeout)
- Auto-approval: When HITL is inactive, all requests are auto-approved
- CLI interaction: Human input is collected via CLI prompts
- Node placement: HITL agents must be the only agent in their WorkFlowNode