Carrier event stream is stale. Weather is unknown. Customer SLA requires notification if the delay exceeds 12 hours.
Design the Agent Loop
An agent is a feedback system. Every action should change state, produce evidence, and lead to an explicit continue, stop, or escalation decision.
Build a loop that can explain why it continued.
A weak agent loop is “think, use a tool, repeat.” A production loop must make observation, state update, action selection, verification, and stopping explicit. The loop should also know when authority is insufficient and a human must take over.
No action without a verification path. If the system cannot determine whether an action succeeded or changed the relevant state, it cannot safely decide what to do next.
What must be refreshed before reasoning?
How does the agent choose the next permitted action?
When is approval required?
How is tool output checked?
What ends the loop?
Hard loop limit.
Choose what happens next.
Use the boundary and authority logic from Lessons 2–3. Each decision should move the case forward without crossing the operating envelope.
The terminal reports congestion, but carrier ETA conflicts with the terminal's queue estimate.
The new route is likely to meet SLA but creates a $1,850 carrier commitment.
The booking tool returns success.
New route is confirmed, the case record contains the approval, and the target operational state is reached.
Write the Agent Loop Map.
Capture what the loop observes, how it chooses actions, what it may execute, how it verifies effects, and what forces stop or escalation.