Overview
HITL (Human in the Loop) ensures the AI Agent obtains human confirmation before executing sensitive operations. Zeus provides Auto-Run modes and tool approval workflows, allowing users to flexibly control the Agent’s level of automation.Auto-Run Mode
Auto-Run mode controls the level of automation when the AI Agent executes tools.Three Modes
| Mode | Description | Use Case |
|---|---|---|
| Run Everything | Automatically execute all tools | High trust, simple tasks |
| Use Allowlist | Only auto-execute allowlisted tools | Partial trust |
| Ask Everytime | Ask the user every time | Sensitive operations |
Tool Approval UI
When a tool requires approval, the frontend displays an approval card containing the tool name, parameters, current status (pending / approved / rejected / running / completed), and approve/reject buttons.Approval Decision Logic
Approval decisions are based on the current Auto-Run mode:- Run Everything: All tools execute automatically, no approval needed
- Use Allowlist: Only allowlisted tools execute automatically; other tools require approval
- Ask Everytime: All tools require user approval
Data Persistence
User Auto-Run mode settings and tool allowlists are persisted via the database. Each user has independent configuration. The allowlist has a unique constraint on user and tool name to prevent duplicates.Trigger Conditions
HITL approval is triggered under the following conditions:- The tool is not in the allowlist
- Auto-Run mode is “Ask Everytime”
- The tool is marked as requiring confirmation
Interaction Flow
Interruption & Recovery
When a tool requires approval, the Agent’s execution is suspended and the state is persisted via the Checkpointer. After user approval, the Agent resumes execution from the breakpoint. User approval decision types:| Decision | Behavior |
|---|---|
approved | Execute tool (optionally with modified parameters) |
rejected | Skip execution; Agent receives rejection reason and will not retry |
modified | Execute with modified parameters (legacy compatibility) |
timeout | Automatic skip on timeout |