👤 Human-in-the-Loop Gate
Pause your agent until a human approves or rejects. Agent sleeps, webhook wakes it up.
Create Checkpoint
curl -X POST https://www.agent-utils.com/api/checkpoint \
-H "x-api-key: au_your_key" \
-H "Content-Type: application/json" \
-d '{
"agentName": "deploy-agent",
"taskDescription": "Deploy v2.1 to production",
"state": {"branch": "main", "version": "2.1.0"},
"webhookUrl": "https://myapp.com/api/resume"
}'
Poll for Approval
# Agent polls until status changes from "pending"
curl https://www.agent-utils.com/api/checkpoint/{id} \
-H "x-api-key: au_your_key"
# Response (still waiting)
{"success":true,"data":{"status":"pending","state":null}}
# Response (approved — state released)
{"success":true,"data":{"status":"approved","state":{"branch":"main",...}}}
Resume (Human Action)
# Approve
curl -X POST https://www.agent-utils.com/api/checkpoint/{id}/resume \
-H "x-api-key: au_your_key" \
-H "Content-Type: application/json" \
-d '{"action": "approve"}'
# Reject
curl -X POST https://www.agent-utils.com/api/checkpoint/{id}/resume \
-d '{"action": "reject", "reason": "Not ready yet"}'
Parameters
| Param | Method | Type | Description |
|---|---|---|---|
| agentName | POST | string | Agent identifier |
| taskDescription | POST | string | What the agent wants to do |
| state | POST | object | Serialized agent state (returned on approve) |
| webhookUrl | POST | string | URL to POST when human acts |
| action | POST /resume | string | "approve" or "reject" |