Humatron provides out-of-the-box support for HITL through its MCP tools. You should configure your build to use HITL functionality before any high-risk action, such as making a purchase, sending important customer emails, deleting or publishing content, or disclosing data. In such cases, the AI worker must first obtain a human supervisor's approval. The AI worker can take action only after verifying that decision was approved. All HITL actions are stored in action log for audit and compliance purposes.
Note that HITL is not a prompt-only safeguard. Even if the AI worker receives malicious instructions or attempts to take action early, the properly configured AI worker will not perform the action without a valid HITL approval.
1. Define HITL Policy
Add a strict policy for each protected business operation to the
build role instructions (or
instance instructions). A JSON-like block makes the policy explicit. The DeepSeek agent logic will use this policy to construct HITL request and verify it. For example:
1{
2 "protected_tool": "buy_ticket",
3 "when": "Before every ticket purchase",
4 "application_policy": "Copy actions exactly. Do not call 'buy_ticket' until Humatron delivers a final HITL approval."
5 "audience": {
6 "any": true,
7 "approvers": [{ "email": "finance@company.com" }]
8 },
9 "body_template": "Approve ticket: {{from}} → {{to}}, {{date}}, {{price}}.",
10 "actions": [
11 { "key": "approve_economy", "label": "Approve economy", "style": "success" },
12 { "key": "approve_business", "label": "Approve business", "style": "warning" },
13 { "key": "reject", "label": "Reject", "style": "danger" }
14 ]
15}
The approve_economy, approve_business, and reject keys are part of your HITL protocol. Use the same keys in the build role instructions for the DeepSeek agent logic. Note that when and application_policy fields in this example must clearly specify when HITL approval is required. You can also add similar instructions elsewhere in build role instructions.
2. Let DeepSeek Agent Create HITL Request
The DeepSeek agent logic reads the policy and invokes built-in HITL Humatron MCP tool create_human_in_the_loop_request when necessary. For this tool invocation, it creates runtime JSON by copying the fixed audience and actions values and inserting the current values into body:
1{
2 "body": "Approve ticket: Moscow → Paris, 2026-10-10, $500.",
3 "audience": {
4 "any": true,
5 "approvers": [{ "email": "finance@company.com" }]
6 },
7 "expires_at": "2026-10-10T10:00:00Z",
8 "actions": [
9 { "key": "approve_economy", "label": "Approve economy", "style": "success" },
10 { "key": "approve_business", "label": "Approve business", "style": "warning" },
11 { "key": "reject", "label": "Reject", "style": "danger" }
12 ]
13}
3. Resuming The Workflow
Build's logic should periodically call get_human_in_the_loop_request_status tool to check the request status. The instructions for this protocol should be added to the build role instructions.
When approval decision has not been made yet, the response from this tool will be:
1{
2 "request_id": "<same request_id>",
3 "status": "pending",
4 "approvers": []
5}
When action is finally taken, or all required approvers have taken an action in case of audience.any is false, the response from this tool will follow this shape:
1{
2 "request_id": "<same request_id>",
3 "status": "done",
4 "approvers": [
5 {
6 "email": "<approver email>",
7 "selected_action_key": "<one of this request's action keys>",
8 "decided_at": "<timestamp>"
9 }
10 ]
11}
The build's instructions should contain necessary logic to resume the workflow based on the response from this tool.
Current HITL Limitation
Review-page message text quality and action-list accuracy depend on the LLM because the model translates the policy into the runtime HITL request. A strict policy substantially reduces errors but does not make the UI fully deterministic.