Human in the loop and durable agents
Read firstLoop engineering
An insurance claims agent reads a claim, pulls the policy, checks the hospital bill, and decides the payout is Rs 1.8 lakh. Company rule: anything over Rs 1 lakh needs an adjuster to approve. The adjuster is on leave until Monday. It is Friday evening.
The agent cannot hold a Python process open all weekend waiting for a click, and if the server is redeployed on Saturday, the run must not start again from the beginning and re-read everything. Two capabilities make this work: pausing for a person and durable execution. Every agent that touches money, customers or production eventually needs both.
An agent run pauses for approval and the approver answers three days later. What must have been saved, and where, for the run to continue exactly where it stopped?
Where to put a person#
Not every step needs a human. Put approval where an action is expensive to undo or outward facing:
- money moves (refunds, payouts, purchases)
- something is sent to a customer or published
- data is deleted or permissions change
- the agent is uncertain, or a check failed twice
Everything else runs on its own. An agent that asks for approval on every step trains people to click "approve" without reading, which is worse than no approval at all.