Skip to content

Skill · aci · human-in-the-loop

Humans as tools

Make approval and missing information first-class tools (ask_human) with checkpoint and resume. Use for refunds, deploys, ambiguous tickets, HITL, or when the current design emails an operator and loses the run.

GET /api/canon/skills/human-in-the-loop?format=md

Factor 7. Approval is not a Slack side channel. Pause is an API. The blob survives the wait. LangGraph interrupts and Inngest waits are this idea.

When

A side effect needs a person, or the agent is missing information only a person has.

Do

  1. 01

    Name the tool

    ask_human({ question, payload, reason }). The payload is the exact command, diff, or refund.

  2. 02

    Checkpoint the blob

    Serialize. Launch/pause/resume are boring APIs. Crashes must not lose the thread.

  3. 03

    Resume without re-executing

    Idempotency keys. 'Already refunded' is a field on the blob.

Don't

  • Email the operator and start over on reply.
  • Hide the pending ask outside the blob.
  • Auto-approve irreversible actions to 'keep the demo moving'.

Hard rules

  • The human sees the loop: command, diff, or payload.
  • Interrupt is first-class, not an exception handler.
  • Show the loop as it runs (streaming the visible path).

Refuse

  • HITL that cannot resumeThe human answers and the run is gone. Approval as a side channel, not a tool.
  • Double side effectsNon-idempotent tools, no journal. A retry refunds twice.
  • Unbounded loopNo max-turns, token, wall-clock, or money budget. The agent rambles until the bill or the context dies.

Load with this

Load next

Trigger tests

Should fire

  • Add human approval for refunds
  • HITL that can resume
  • The operator answers and the run is gone

Should not

  • Build a chatbot widget
  • Add Intercom to the site