← Docs

👤 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

ParamMethodTypeDescription
agentNamePOSTstringAgent identifier
taskDescriptionPOSTstringWhat the agent wants to do
statePOSTobjectSerialized agent state (returned on approve)
webhookUrlPOSTstringURL to POST when human acts
actionPOST /resumestring"approve" or "reject"