Review the prerequisites
Suitable for: Backend developers learning Agent applications.
- Match orchestration abstractions to business responsibilities
- The framework should cover the control and recovery complexity that the task truly requires, rather than assuming non-existent guarantees for the business. Selection compares fault behavior, debugging costs, and state transition boundaries for the same task.
How does the mechanism work?
Step-by-step explanation
- With an existing Java task platform, when is it worth introducing a Python graph orchestration service?
Framework selection must consider the existing Java platform and team costs as well as abstractions.
- When the business process is fixed, why might there be no need for multiple agents?
Establish the need for workflows and multiple agents separately.
- The framework upgrade changes the status format. How to migrate tasks that are waiting for approval?
After persisting framework state, address upgrades and compatibility with old tasks.
Debugging · Diagnose failures
Diagnose failures · Match orchestration abstractions to business responsibilities
Objectives of this level: Locate and repair the first omitted selection predicate on the same input.
Visual guide · Filter fit before comparing cost
Capabilities and operating costs here are declared fixtures, not product benchmarks. No fit returns none; a framework name grants no business guarantee. Select the figure to open it at full size.
Same after-sales project
The after-sales Agent reads an order and policy, pauses for approval and resumes a return-application request. Compare an existing Java loop, a Java workflow and a Python graph using declared capability fixtures, not product reputation. A model SDK handles model I/O; orchestration owns control flow; business services still own authority and effects. Anthropic’s workflow/agent distinction motivates comparing task constraints; its tooling examples are version-sensitive.
The existing capstone main-return creates a return application; it does not execute a refund. These manifests are independent fictional extensions or policy/evidence/counting exercises. They do not add real refunds, publication, model calls or Java execution to the capstone runtime.
Same-input fault reproduction
Temporarily omit the language check in a copy of your implementation. The same approval-wait input can incorrectly prefer python-graph on cost. Locate the first failed eligibility predicate, not a supposed model reasoning problem. Restore the predicate and retain the identical input and full before/after report.
{
"required": [
"durable",
"human_wait"
],
"language": "java",
"candidates": [
{
"id": "existing-loop",
"capabilities": [],
"ops_cost": 0,
"language": "java"
},
{
"id": "java-workflow",
"capabilities": [
"durable",
"human_wait"
],
"ops_cost": 3,
"language": "java"
},
{
"id": "python-graph",
"capabilities": [
"durable",
"human_wait",
"branches"
],
"ops_cost": 1,
"language": "python"
}
]
}
Use this expected result from the foundation sample, unchanged:
{
"expected": {
"choice": "java-workflow",
"rejected": [
{
"id": "existing-loop",
"missing": [
"durable",
"human_wait"
]
},
{
"id": "python-graph",
"missing": [
"language:java"
]
}
]
},
"error": null
}
Evidence before repair
After implementing, preserve a faulty student-before.py. Run the before command, inspect its first actual mismatch, then repair student.py and rerun the after command. Keep both reports, source hashes/diff, an evidence→hypothesis→distinguishing-evidence note and the named negative control. Reports may contain an earlier first mismatch than the named probe; explain both. The public suggested fault is a reproducible exercise, not an unannounced incident or unseen test.
python3 lab_runner.py grade --course framework-selection --module student-before.py --out before-report.json
python3 lab_runner.py grade --course framework-selection --module student.py --out report.json
import json
from pathlib import Path
report = json.loads(Path("before-report.json").read_text())
first = next((row for row in report["checks"] if not row["passed"]), None)
print(json.dumps(first, indent=2, ensure_ascii=False))
Optional retrospective after evidence
Eligibility filtering. Preserve the report and fix that predicate before tuning ranking.
code example
Preserve the same-input red/green repair
Temporarily omit the language check in a copy of your implementation. The same approval-wait input can incorrectly prefer python-graph on cost. Locate the first failed eligibility predicate, not a supposed model reasoning problem. Restore the predicate and retain the identical input and full before/after report.
Acceptance task for this level
Freeze a faulty copy, submit evidence and competing hypotheses, reproduce the same-input failure, repair it and preserve red/green reports plus a negative control. Contract: choose_orchestration(payload).
Reading this browser’s record…
Hide the answer and check your understanding
Which stage fails when cost is evaluated before language?
Expand reference derivation
Eligibility filtering. Preserve the report and fix that predicate before tuning ranking.
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.
- OpenAI Agents SDK:Overview
- LangGraph: Graph states, nodes and orchestration boundaries
- Temporal:Activity Execution
- LangGraph Graph API: Graph and State Migration Limitations
- Temporal: Workflow Execution life cycle
- Anthropic: The trade-off between fixed workflow and autonomous agent
- Public fixed contract inputs
- Local pure-function checker
- Extended Agent local practice package