HITL
Prerequisites
1. Create an Agent with HITL Enabled
curl -X POST "$BACKEND_URL/agents/" \
-H "X-API-Key: $AIP_MASTER_API_KEY" \
-H "Content-Type: application/json" \
-d @agent_payload.json{
"name": "hitl_approval_agent",
"instruction": "Whenever an action needs approval, call the custom_tool first.",
"type": "config",
"framework": "langchain",
"version": "1.0",
"tools": ["<TOOL_ID_FROM_UPLOAD>"],
"agent_config": {
"hitl_enabled": true,
"lm_provider": "openai",
"lm_name": "gpt-4.1"
},
"tool_configs": {
"<TOOL_ID_FROM_UPLOAD>": {
"hitl": {
"timeout_seconds": 180
}
}
}
}2. Run the Agent and Watch for HITL Pauses
3. Resolve a HITL Request
4. Optional: List Pending HITL Requests
5. Optional Cleanup
Last updated
Was this helpful?