A sequence diagram of two turns of the loop, with three participants: the harness, the model, and the outside world. First turn: the harness calls decide(GOAL, state, allowed_tools) on the model, which returns get_quotes; the harness runs tool.execute(state, context), which requests quotes from the outside world and gets them back; then tool.apply(state, result), which updates state. Second turn: the model returns wait_for_approval; the harness waits, hours to weeks, until the manager's approval arrives, then runs tool.apply(state, payload), which updates state.
harness
model
outside world
Hours to weeks
decide(GOAL, state, allowed_tools)
get_quotes
tool.execute(state, context)
request quotes
quotes
tool.apply(state, result)
updates state
decide(GOAL, state, allowed_tools)
wait_for_approval
manager's approval
tool.apply(state, payload)
updates state