Review the prerequisites
Suitable for: Backend developers learning Agent applications.
- Combine deterministic workflows with bounded exploration
- Known business rules should determine which paths are allowed, and the model only explores unknown steps within the allowed range. Graphs improve process observability, and loops provide local adaptability; neither replaces the idempotency and version acceptance of external writes.
How does the mechanism work?
Step-by-step explanation
- Parallel nodes modify the evidence list at the same time. How should they be merged?
Parallel graphs turn sequential reads and writes into a merge problem, requiring explicit semantics for shared fields.
- Recovery will rerun the node. What will happen if a notification is sent before approval?
The recovery point determines which code is replayed. Persistence alone does not ensure that external actions execute only once.
- How to prevent the draft you see during approval from being different from the published content?
Content may change between the review node and the publishing node.
Debugging · Diagnose failures
Trace counterexamples and failure windows
Objectives of this level: Repair direct execution that bypasses approval and reconcile state.
Visual guide · Where the next action is chosen
Both modes use the same authority and budget boundaries. This pure selector dispatches nothing; model_stop ends the loop without proving business completion. Select the figure to open it at full size.
Locate the first illegal transition
Inspect phase, proposal, principal and budget before reading the final answer. A repeated search in loop mode can be valid exploration; the same proposal in graph execute is an invalid transition. Fixing it by resetting phase would erase an execution fact.
The approval checkpoint has a subtle negative control: an approved refund candidate in approve advances to execute with tool=null. It does not dispatch a write or charge tool cost. A worker that calls the tool as soon as decision=advance violates the contract. Dispatch only an allowed candidate, then independently reconcile the effect before done.
Crash window: a remote effect commits, but the graph checkpoint does not. Replaying the node may repeat code. Identify which task result is persisted, which operation key belongs to the business intent and which receipt can resolve the uncertainty. A new graph run ID cannot stand in for that key. LangGraph persistence/replay is a control-flow mechanism, not a transaction with the remote service.
Continue the same implementation
Use the complete function contract and reproduction commands in the implementation layer. Public cases remain in cases/graph-vs-agent-loop.json inside the existing extended-agent-practice-v1.zip. These are local fixtures, not remote-model or production-load measurements.
code example
Trace counterexamples and failure windows
Locate the first illegal transition
Inspect phase, proposal, principal and budget before reading the final answer. A repeated search in loop mode can be valid exploration; the same proposal in graph execute is an invalid transition. Fixing it by resetting phase would erase an execution fact.
The approval checkpoint has a subtle negative control: an approved refund candidate in approve advances to execute with tool=null. It does not dispatch a write or charge tool cost. A worker that calls the tool as soon as decision=advance violates the contract. Dispatch only an allowed candidate, then independently reconcile the effect before done.
Crash window: a remote effect commits, but the graph checkpoint does not. Replaying the node may repeat code. Identify which task result is persisted, which operation key belongs to the business intent and which receipt can resolve the uncertainty. A new graph run ID cannot stand in for that key. LangGraph persistence/replay is a control-flow mechanism, not a transaction with the remote service.
Acceptance task for this level
Use the faulty function below in the learner module, grade the same inputs to a before report, then write your own repair/diff and rerun. Do not edit cases or expected values. The defect is given: this is public repair, not unseen independent diagnosis.
Reading this browser’s record…
Hide the answer and check your understanding
Which fixed input disproves allow-everything?
Expand reference derivation
unapproved-write-pauses expects a paused candidate with tool=null; allowance would manufacture permission.
Further explanations and practice
When encountering unfamiliar principles, first read the implementation, continuous questioning and migration cases, and then independently explain the premise and boundaries. Answers and notes are saved to the original account record.
All linked explanations and exercises (1 )
Sources and verification scope
The principles are based on public information; the numbers, cases and tasks are the teaching design of this website. Offline experiments verify the range noted on this page, and the learning effect still needs to be judged through independent tasks and feedback.