On this pageChoose a stage for your experience.
LEARNING PATH
Agent application learning paths
First use the seven-day introduction to establish concepts, then complete a set of runnable application experiments, and continue to study failure, recovery and system design.
20–30 minutes per day · Can be completed locally
Seven-day introduction: from backend development to Agents
For developers familiar with APIs, databases, and error handling. Spend seven days building a local order-answering and refund-draft simulation, then apply the same boundaries to the return-policy assistant below. Simulated drafts never execute refunds. After these introductory exercises, continue with the seven-stage after-sales project below; it replaces in-memory toy state with durable tasks and service-owned business receipts.
Allow about 20–30 minutes per day: five for short answers, five to ten for assigned reading, and ten to fifteen for the local task. Setup, troubleshooting, and the full application lab take additional time; split the work into sessions as needed.
Use paper, pseudocode, or a familiar language for the seven-day simulation; no model account is needed. Save inputs, fixed responses, logs, and itemized checks each day, then compile a one-page delivery record on day seven. The application lab below supplies runnable Python code. The two exercises do not automatically share state; reading or offline success does not establish model quality or mastery.
Day 1Run a minimal execution loopThink of the Agent as a budget-constrained backend loop, distinguishing between model recommendations and runtime control.About 25 minutes
Answer independently first · 5 minutes
What is the most obvious difference between Agent and ordinary interface calls?
Compare with the reference answer
Ordinary interfaces are usually executed in fixed steps; the Agent can continue to call tools based on the next step suggestions given by the model. The runtime is still responsible for verification, execution and stopping.
Can the runtime end when the model says "done"?
Compare with the reference answer
Check the acceptance conditions of the task first. Model text can only be candidate results; there should be a clear end state when conditions, step limits, or unrecoverable errors are encountered.
Why return tool results to the model?
Compare with the reference answer
Let the model continue to make decisions based on real receipts. The response receipt should differentiate between success, failure and unknown results, and failure should not be packaged as completed.
Read the related lesson · 5–10 minutes
Read the short answer and termination conditions of "Agent Loop" first; the essential LLM concepts focus only on tool invocation messages and structured output.
- Control and completion criteria in agent loopsFundamentals · Further reading
- Capacity, response shapes, and execution boundaries of LLM interfacesFundamentals · Further reading
Local tasks · 10–15 minutes
Simulate a loop that queries order status: replace the model response with a fixed array and execute up to 3 steps.
- Write down the input orderId, output status/source, and the maximum number of steps, 3. Prepare a fake response of "Call Query Tool → Return Shipped".
- Let the query tool return {status: "shipped", source: "mock"}; record suggestions, tool receipts and end reasons at each step.
- Change the response to continuously calling the query tool and observe whether it stops after step 3; then change it to a non-existent tool name.
Check items one by one during acceptance
- The normal path generates a query receipt, the output is marked source=mock, and the end reason is that the acceptance is met.
- The repeated-call path stops after at most three steps, reports budget exhaustion, and does not claim the query is complete.
- The unknown tool will not be executed, and there are errors in the log indicating that the tool does not exist and a clear end reason.
Pay attention to these fault symptoms:If the loop keeps running, declares success textually, or treats a non-existent tool as if it has been executed, it means that the runtime boundary is not implemented.
Deliverable: Three traces for normal completion, repeated calls, and an unknown tool, including inputs, receipts, and termination reasons.
Continue in the return assistant →Day 2Add input boundaries to toolsFollow the familiar interface verification and check the format, business conditions and calling permissions separately.About 25 minutes
Answer independently first · 5 minutes
If the JSON Schema verification passes, will the business request be valid?
Compare with the reference answer
Not necessarily. Schema checks the structure and type; business conditions such as amount range and resource ownership also need to be verified on the server side.
Can the userId provided by the model be directly used for permission determination?
Compare with the reference answer
No. The identity of the caller comes from the trusted session, and the model parameters can only describe the request object, but cannot determine who they are or what permissions they have.
What should be returned if verification fails?
Compare with the reference answer
Return stable error codes and correctable information, such as INVALID_AMOUNT; do not execute the tool and do not report failure as success.
Read the related lesson · 5–10 minutes
Read only the short answer, validation order, and baseline criteria. Leave complex authorization architecture for later.
- A typed proposal is not an authorized business factFundamentals · Further reading
Local tasks · 10–15 minutes
Add validation to the local mock's "Create Refund Draft" tool and do not connect payments or real orders.
- Fix the session identity as userId=u1. Prepare order o1 (owned by u1, paid amount 100) and o2 (owned by u2, paid amount 100).
- Check that orderId is a string and amount is positive; then verify ownership and that the refund does not exceed the paid amount. Append to the local drafts array only after all checks pass.
- Enter o1/20, o1/"20", o1/120, o2/20 in sequence, and record the return value and drafts length.
Check items one by one during acceptance
- o1/20 creates one local draft; the result explicitly states that no refund has been executed.
- The string amount, excess amount, and other people's orders are rejected respectively. After rejection, the length of drafts is still 1.
- Modifying the incoming userId will not change the fixed session identity, and you will not be able to access o2.
Pay attention to these fault symptoms:A rejected case that adds a draft, or model parameters that override session identity, exposes a gap in validation or authorization.
Deliverable: Four amount/ownership cases with responses, drafts-array lengths, and the fixed session identity.
Continue in the return assistant →Day 3Explain RAG with evidenceRecord retrieval, context, and answers separately; explicitly report insufficient evidence when the material lacks an answer.About 30 minutes
Answer independently first · 5 minutes
Is the model in RAG responsible for finding the document?
Compare with the reference answer
The retriever finds candidate material, and the model generates an answer from the context actually supplied. Inspect retrieval and context first, then assess whether the answer is faithful to them.
Is it enough to search for relevant titles?
Compare with the reference answer
Not enough. Make sure the paragraph contains the facts you need to answer, and check that the paragraph enters the context of the model.
What to do if there is no answer in the information?
Compare with the reference answer
Return insufficient information and indicate which piece of evidence is missing. A seemingly reasonable company rule cannot be made up based on common sense.
Read the related lesson · 5–10 minutes
Read only the retrieval diagnostic method and short answer. Use keyword search today; do not install a vector database.
- Stage-local evidence loss determines the repairIntermediate · Further reading
Local tasks · 10–15 minutes
Use three pieces of local text to simulate a policy Q&A with citations, retaining evidence for each step.
- Prepare d1: "Apply for standard order refund within 7 days"; d2: "Member points are updated monthly"; d3: "Refund requires an order number". Set id for each item.
- Filter by the keyword “refund”, then choose d1 for “Within how many days must a refund be requested?” Record candidate IDs, actual context, and answer citations.
- Test "whether membership refund is 30 days"; then deliberately remove d1 from the context and observe whether the answer turns into insufficient information.
Check items one by one during acceptance
- The first answer says 'within 7 days,' cites d1, and has the corresponding original text in its context.
- The information does not state an exception for members, and the second question cannot claim that "members have 30 days."
- After removing d1, it is clearly reported that there is insufficient data, and the log can see "retrieved but no context passed in".
Pay attention to these fault symptoms:The citation id exists but the original text does not support the answer, or 7 days are still given after missing context, indicating that the generation is disconnected from the evidence.
Deliverable: Candidate IDs, final context, and citations for both questions, plus the failure trace after removing d1.
Continue in the return assistant →Day 4Distinguish between task state and long-term memoryRecord which step of the current task is completed, and avoid treating task data as a memory shared by all users.About 25 minutes
Answer independently first · 5 minutes
Are chat history, task status, and long-term memory the same thing?
Compare with the reference answer
No. Chat history is a message; task status records the stages and intermediate results of this task; long-term memory stores filtered information that can be used in subsequent tasks.
Should this request's order number be stored in memory shared by every task?
Compare with the reference answer
Usually not required. It belongs to the current task status and will be processed according to the life cycle after the task is completed; long-term storage requires clear purpose and scope.
Why do we still need to verify the scope when reading memory?
Compare with the reference answer
Because similar content may come from other users or projects. Reads must be restricted by trusted organization, user or thread identities and cannot be matched by keywords only.
Read the related lesson · 5–10 minutes
Read only the scope definitions and short answer. Focus on distinguishing thread state from long-term memory.
- Memory scopes and trusted authorization contextIntermediate · Further reading
Local tasks · 10–15 minutes
Use two objects to simulate task status and user preferences, and check cross-task and cross-user reads.
- Create taskState[runId] and put step, orderId, and lastToolResult; create preferences[userId] and put only the language preference confirmed by the user.
- Advance u1’s run1 to queried and save the result. When u1 starts run2, read only the language preference; do not reuse run1’s order result.
- Have u2 request to read u1's preferences, using fixed session authentication; then use the same run1 to read the state and continue to the next step.
Check items one by one during acceptance
- run2 can get the language preference of u1, but it does not have the order number and tool results of run1.
- u2 cannot read u1 preferences, and the user's identity is not determined by the parameters passed in by the model.
- Resuming run1 can see the saved step and tool results and make it clear that they are only local experimental status.
Pay attention to these fault symptoms:New tasks inherit the results of old orders, all users share a preference object, or similar searches bypass identity restrictions, indicating that the scopes are mixed.
Deliverable: A run1/run2 and u1/u2 read matrix showing allowed, denied, and deliberately unreused fields.
Continue in the return assistant →Day 5Simulate failure and recoveryKnow what retries, checkpoints, and idempotency solve respectively, and use receipts to handle "executed but no response received".About 30 minutes
Answer independently first · 5 minutes
Does the timeout necessarily mean that the tool was not executed?
Compare with the reference answer
Not necessarily. The request may have been executed, but the response was lost. The write operation should first check the receipt or use a stable idempotency key, and cannot directly replace the request with a new one and try again.
Can checkpointing ensure that a write operation only happens once?
Compare with the reference answer
No. External writes may not be in the same transaction as the local checkpoint and will be replayed during recovery. Operational idempotency and queryable receipts are also required.
Should all errors be retried?
Compare with the reference answer
No. Correct parameter and permission errors first; retry transient errors only within bounded attempts and a deadline. Preserve cancellation and budget-exhaustion states.
Read the related lesson · 5–10 minutes
Read the short answer on retries and budgets first. For checkpoints, focus on recovery potentially repeating execution; leave leases and other advanced topics for the full route.
- One state machine for retries, deadlines, cancellation, and budgetsIntermediate · Further reading
- Checkpoints, replay, and external side-effect boundariesAdvanced · Further reading
Local tasks · 10–15 minutes
Simulate the situation where the local draft tool has been executed but the response is lost, and avoids repeated drafting after recovery.
- Use the local drafts of Day 2 and add receipts[operationId]; fix this business key run1:create-draft. Returns the same draftId when there is already a receipt.
- After first creating a draft and writing receipts, deliberately simulate a lost response and leave the task checkpoint pending.
- Resume execution with the same operationId and record the recovered receipt; test another mock that always fails, and try it a maximum of 2 times.
Check items one by one during acceptance
- After recovery from response loss, drafts still contains one entry and the result returns the original draftId.
- Retries use the same business key, and the log can distinguish between the first execution and reading of existing receipts.
- The always-failing mock stops after two attempts, marks failure, and does not claim completion. Explain why in-memory receipts are lost on process restart.
Pay attention to these fault symptoms:During recovery, repeated drafts, infinite retries, or memory objects are called persistence guarantees after changing the idempotency keys indicate that there are still omissions in the recovery plan.
Deliverable: The business key, draftId, receipts, and attempt counts before and after response loss; explain why in-memory state cannot survive a process restart.
Continue in the return assistant →Day 6Write verifiable acceptance criteriaChange "Answer looks good" to a record of results, bounds, and execution that can be inspected step by step.About 25 minutes
Answer independently first · 5 minutes
Does correct output format equal mission success?
Compare with the reference answer
Not equal to. Also check facts, citations, permissions, and actual business receipts; legitimate JSON may also contain incorrect answers.
Why include failure cases in evaluation?
Compare with the reference answer
The normal path cannot expose problems such as insufficient evidence, overstepping of authority, and duplication of recovery. The failure use case checks whether the system has stopped safely and reports the results truthfully.
Does passing a small sample in one day establish production readiness?
Compare with the reference answer
No. It is only possible to report which use cases were tested, what results were observed, and the boundaries that were not covered. Production judgment also requires representative data and more complete verification.
Read the related lesson · 5–10 minutes
Read only the outcome contract and baseline criteria. Use a manual checklist today, without an LLM judge.
- Acceptance is an evidence contract, not a prose impressionIntermediate · Further reading
Local tasks · 10–15 minutes
Organize 4 acceptance use cases for the first five days of local experiments, recording actual results and uncovered items.
- Create a form: input, expected results, actual results, evidence, pass or fail. Four use cases are added: normal refund draft, other people's orders, insufficient data, and response loss recovery.
- Rerun or manually deduce existing mocks one by one, and save the number of drafts, original text quotes, error codes or recovery receipts. For use cases that have not been executed, write "not executed" and do not record them as passed.
- Deliberately remove the ownership verification of Day 2 and observe whether the unauthorized use case fails; review after restoring the verification and write down the untested database failures and real model performance.
Check items one by one during acceptance
- Each test case has a clear expected result, and actual observations have supporting evidence. Record unexecuted cases separately from failures.
- Removing the ownership check makes the unauthorized-access test fail; restoring it rejects draft orders for other users.
- The report covers only these four local mock cases and explicitly lists what they do not cover.
Pay attention to these fault symptoms:All use cases always pass, only check that the output has text, or mark unexecuted items as passed, indicating that the acceptance criteria cannot detect real problems.
Deliverable: An acceptance table for normal, missing-evidence, unauthorized, and response-loss cases, with observations and pass/fail reasons for each row.
Continue in the return assistant →Day 7Explain the experiment as a project that can withstand follow-up questionsUse real experimental records to explain goals, boundaries, failures and trade-offs, and distinguish between proven and unrealized.About 25 minutes
Answer independently first · 5 minutes
Which part should you talk about first when introducing the Agent project in an interview?
Compare with the reference answer
Let’s first talk about user tasks, input and output, and acceptance, and then talk about how models, tools, and states work together. This way every design choice has a clear purpose.
Can these experiments be described as a production project without connecting a real model?
Compare with the reference answer
No. Describe it as a local mock introduction and identify the behaviors checked, along with real-model, persistence, and deployment capabilities still unverified.
Need multi-agent or complex frameworks now?
Compare with the reference answer
Start by choosing the smallest option based on status, recovery, and collaboration needs. This introductory experiment can use ordinary code loops; more complex solutions must have clear requirements and comparative evidence.
Read the related lesson · 5–10 minutes
Read the short answers to the selection questions first; the project follow-up questions are only used to check your evidence and do not require completion of advanced production architecture.
- Match orchestration abstractions to business responsibilitiesIntermediate · Further reading
- Evidence and conditional reasoning about project capabilitiesAdvanced · Further reading
Local tasks · 10–15 minutes
Introduce your Order Q&A and Refund Draft local experiment with one page of notes and 90 seconds of oral presentation.
- Draw Input → Loop → Tools/Retrieval → Status → Output, marking the locations of fixed sessions, budgets, and acceptance checks.
- Choose a normal and failure trajectory each, cite the evidence that was actually saved in the past few days; write down why you used mocks and code loops in the first place.
- Record or time a 90-second explanation. Then answer “Could a timed-out tool have executed?”, “How do you answer without evidence?”, and “How do you recover after a restart?” List unverified items as follow-up tasks.
Check items one by one during acceptance
- The notebook includes goals, inputs and outputs, acceptance criteria, an architecture diagram, and two evidence-backed traces.
- The explanation covers model/runtime boundaries, scopes, idempotency keys, and missing-evidence handling.
- Label local mocks, in-memory state, and manual evaluation explicitly. Remaining work includes persistence, real-model integration, and additional evaluation cases.
Pay attention to these fault symptoms:Telling only technical terms, without receipts or experimental records, or referring to mock results as production success rate, indicates that the project evidence is incomplete.
Deliverable: A one-page project record with two inspectable traces, listing real-model integration, persistence, and deployment checks still unverified.
Continue in the return assistant →Connect the basics into one implementation
Build and deliver an enterprise after-sales Agent
Choose junior/intermediate/senior in https://ai.lwkjob.com/lab/capstone/CAREER_PATHS.md before starting. All use this same seven-stage project. Junior adds personal bounded code/diagnosis; intermediate independently delivers a changed requirement and regression/recovery; senior adds tenant capacity, version fencing, ADRs, migration/incident and team responsibility. Lesson levels are learning activities, not job ranks. Start with the return-policy assistant and carry one durable task through authorized order lookup, policy evidence, a return proposal, human approval, independent merchant execution, recovery, evaluation and a local API deployment. Each stage continues the same codebase and task state. Before running the route, read the foundation tracks for model-response-contract, agent-loop-boundaries, tool-contracts, idempotency-recovery and memory-scopes. Revisit tool authority before stage 3 and approval/recovery before stage 4; the execution order is not the prerequisite order. Before the route, use prerequisite_lab.py and PREREQUISITES.md in the separate interview-practice package: implement four functions, preserve scaffold failures and your source diff, and require all four diagnostic skills. This is fixed public practice, not live-provider or unseen-interview proof. Resume the indicated foundation course after a failed skill.
Python 3.10+ and the standard library; default generation is a deterministic teaching model and retrieval is authorized lexical search. Business writes affect only a separate local fictional merchant. Real Responses calls are optional and separately recorded; offline checks are not model accuracy or production readiness.
Download the complete application experiment v1 ↓ · Python 3.10+, unzip and run in the directory; optional reconstruction vector requires Python 3.10+, additional dependencies and model download.
Run first, then deliver each stage
Download and extract enterprise-after-sales-agent-v1.zip, then enter enterprise-after-sales-agent-v1, the directory containing lab.py. Use Python 3.10+ (validated with Python 3.12.14) on macOS/Linux or WSL. All commands below run in that same fresh extraction. lab.py starts and stops an independent merchant process per command while keeping work/agent.sqlite and work/merchant.sqlite. Do not replace or delete ledgers between stages. README.md and README.zh.md give the matching seven-stage instructions; MODEL_GUIDE.md describes optional actual model calls. The old application v1 and reliability v3 packages remain readable, separate starter/advanced labs.
python3 --version
python3 lab.py setupOptional live-model guide (Chinese / English) →
Record each command and code/schema/prompt/policy version → input/fault → actual output and merchant receipt/audit path → each check and failure reason → fix/rerun → unverified items. Preserve provider vs contract-stub vs deterministic source, measured latency and actual or explicitly simulated usage. The deliberate fault exits 75; classified failures exit 2; broken assertions exit 1; successful route commands exit 0. Add selected role level, required artifact status, reviewed fresh condition, and separately scoped production responsibility; planned load tests remain planned.
- Persist the first model/tool round
- Carry the output contract into the next round
- Inspect authorized evidence and scoped memory
- Save a proposal and approve the exact binding
- Recover the same task and verify merchant effects
- Compare versions and preserve failure reasons
- Deploy the local API, roll back and submit an extension
Persist the first model/tool round
Connect the executable Responses adapter and deterministic teaching model to one durable task. Save get_order, server authorization and the next-round continuation.
python3 lab.py stage responseDeliverable: work/response.json: main-return queued, one model turn, one matching tool receipt; inspect model_adapter.py, agent.py and migration 001.
Item-by-item acceptance
- The same main-return task is used in every required stage; neither a response fixture nor a written plan substitutes for running the tool.
- Current-user/tenant order access comes from merchant-authenticated demo sessions, never model arguments; no proposal or merchant write exists yet.
- Live mode actually sends Responses HTTP requests and has no offline fallback. No live call is claimed without separately recorded provider evidence.
Carry the output contract into the next round
Inspect strict function/answer schemas, versioned instructions and cumulative budgets. Resume the saved transcript and actually retrieve policy evidence for the next model round.
python3 lab.py stage promptDeliverable: work/prompt.json: the same task queued with two model turns and two tool receipts; expected labels stay in the evaluator.
Item-by-item acceptance
- Expected decisions and pass labels from cases.json are absent from model input.
- Persisted limits are eight model turns, six tools and 64,000 input bytes; restarting does not reset them.
- Refusal, incomplete responses, HTTP errors, invalid JSON and unknown/batched calls are rejected by the automated contract tests.
Inspect authorized evidence and scoped memory
Keep authorized candidates separate from the actual context sent to the model. Inspect current policy version, source digests, citations and expiring owner-scoped memory in the same project.
- From document ingestion to cited RAG answers →
- RAG evidence: applicability, complete context and supported claims →
- Consistent authorization across RAG and derived data →
- Memory writes: source authority, valid time, stale jobs and revocation →
- Memory scopes and trusted authorization context →
python3 lab.py stage retrievalDeliverable: work/retrieval.json: actual main-task context, top-k-one probe, candidate ranking, text SHA-256, current policy and memory generations.
Item-by-item acceptance
- Tenant and current policy version are selected before cached chunks are ranked; another tenant and old versions are excluded.
- The default retriever is lexical and explicitly labeled. Battery tasks require d-battery; a tax question has no supporting context and returns unknown.
- Confirmed language preference has owner, generation and expiry; it grants no business authorization and is not reused as another task’s order data.
Save a proposal and approve the exact binding
Continue the same loop to propose a return application. Read main-proposal.json before explicitly using the reviewer session to approve its action, parameters, policy/memory generation, version and hash at the independent merchant.
- Tool contracts: from a valid request to an authorized business effect →
- Approval binding: unchanged intent, current authority and one operation →
- Separate natural-language requests from transaction state →
python3 lab.py stage tool
python3 -m json.tool work/main-proposal.json
python3 lab.py approve --proposal-file work/main-proposal.jsonDeliverable: work/tool.json, work/main-proposal.json and work/approve.json: awaiting_approval then ready; four model turns, three tool receipts and zero returns before execution.
Item-by-item acceptance
- The merchant owns approvals; approved=true or a local checkpoint cannot authorize a return.
- Changed action/parameters/hash/version, forged approval, expired/revoked approval or a revoked reviewer cannot pass service execution checks.
- The 300-second approval must be used promptly. If it expires before the fault command, start a fresh route workspace; do not bypass or silently renew it.
Recover the same task and verify merchant effects
Run fault-main separately: the merchant commits and drops the HTTP response, then the worker and fault runner actually exit 75. Inspect, resume after the short lease, and run ten further drills in this same project. Other commands exit 0.
Download the separate reliability lab v3 ↓ · Open the memory-revocation lab →
- Idempotency, unknown outcomes, and task recovery →
- Atomic intent and duplicate delivery with the outbox pattern →
- Revoke memories, clean up derivatives, and prevent stale data from returning →
- Failure windows and recovery invariants →
python3 lab.py fault-main
# Expected exit 75. Run each following command separately.
python3 lab.py inspect-main --out work/lost-response-before.json
python3 lab.py recover-main
python3 lab.py stage recoveryDeliverable: work/fault-main.json, work/lost-response-before.json, work/recover-main.json, work/recovery.json and drills/*.json: exact exits, saved states and independent merchant audits.
Item-by-item acceptance
- Before recovery, local state is outcome_unknown with no receipt while the merchant already has one return; recovery uses the original receipt and creates no second write.
- Ten additional drills cover actual process exit, duplicates, two executors/service fencing, pre/post-commit cancellation, memory/user/approval revocation, approval expiry and policy-version changes.
- Successful replay/takeover has one merchant effect; rejected or cancelled work has zero. Post-commit cancellation retains the receipt as completed_after_cancel.
Compare versions and preserve failure reasons
Run the same six tasks through v1/v2 and record outcome, authorization, evidence, actual context, latency and generation usage separately. Read the full automated test log.
- Agent evaluation: executable gates, repeated trials and calibrated judgment →
- Task causality and resource attribution →
- Release and rollback of behavioral configurations →
python3 lab.py stage evaluation
python3 -m unittest discover -v > work/tests.log 2>&1
cat work/tests.logDeliverable: work/evaluation.json, evaluation/*.json and work/tests.log: v1 3/6 versus v2 6/6 deterministic mechanical checks, 34 passing tests and per-row failure reasons.
Item-by-item acceptance
- Only retrieval top-k (1/4) and the prompt version tag change; this is not an isolated prompt experiment or model accuracy.
- Offline usage is labeled simulated character-based units; actual live usage is kept only from provider responses or null when omitted. No invented billed cost is reported.
- Every row includes an independent merchant count and trace. Free-form semantic text remains not_scored until a source-backed human review is supplied.
Deploy the local API, roll back and submit an extension
Deploy and roll back the local API, inspect the solved gift example, then submit personal coding evidence for the selected level: a bounded junior change, independent hygiene delivery for intermediate, plus the senior capacity/fencing and architecture package.
- Task contracts and independent acceptance checks →
- Structural and business compatibility during workflow upgrades →
- A controlled task chain from evidence to publication →
- Evidence and conditional reasoning about project capabilities →
python3 lab.py stage deployment
python3 lab.py extension
python3 lab.py deliver --out work/submissionDeliverable: work/deployment/rehearsal.json, work/extension.json and work/submission: code, migrations, fictional databases, traces, evaluation, rollback evidence, architecture and file digests. The deliver command packages the guided route only. Intermediate/senior independent hygiene implementation also requires transfer-review.json, transfer-review-runs, your code diff and semantic/incident review in work/submission. Choose junior/intermediate/senior in https://ai.lwkjob.com/lab/capstone/CAREER_PATHS.md before starting. All use this same seven-stage project. Junior adds personal bounded code/diagnosis; intermediate independently delivers a changed requirement and regression/recovery; senior adds tenant capacity, version fencing, ADRs, migration/incident and team responsibility. Lesson levels are learning activities, not job ranks.
Item-by-item acceptance
- The local API ownership check returns 403; upgrade and schema-1 restart pass. Merchant business count stays one through Agent-only rollback.
- Add your own policy rationale, commit, semantic evidence review and incident analysis. Docker Compose is provided; container/cloud deployment and real merchant/model quality are not claimed.
- python3 lab.py extension is a solved gift-policy example; running it does not demonstrate independent implementation.
- Intermediate/senior: implement HYGIENE_TASK.md and run python3 verify_transfer.py --out work/transfer-review.json. The unmodified package exits 1 with passed=false; personal implementation must pass all nine checks. Junior: retain the incomplete hygiene baseline as pending, and pass the personal bounded-change/junior career contract instead.
- Intermediate/senior hygiene delivery keeps the original six-case labels and rejects opened-item Agent/direct merchant paths under current policy, including stale-policy invalidation. Junior keeps the original reference regression and verifies the positive/negative cases for the personal bounded change. All levels review their free-text claims against sources.
- After deliver, add the selected level personal diff and before/after reports. Intermediate/senior also add transfer-review.json, transfer-review-runs and semantic/incident review to work/submission; senior adds capacity/ADR/migration/team artifacts. An untouched package demonstrates guided practice only.
- Complete the selected project-experience-deep-dive 90/120/150-minute mock and level artifact gate, with personal changes, fresh-condition evidence and reviewer reasons. Keep required live integration and production responsibility pending until independently verified.
For every level, deliver the completed guided main-return with one merchant receipt, ten-drill matrix, fixed-task evaluation, 34-test log and local API/migration/rollback records. The solved gift exception remains guided work. Add the personal coding/diagnosis artifact required by your selected level; intermediate/senior independently implement hygiene with baseline regression, and senior adds capacity/fencing, specialty and architecture/operations/team evidence. Static sessions and the local HTTP server do not establish production authorization/availability or live-model quality. Choose junior/intermediate/senior in https://ai.lwkjob.com/lab/capstone/CAREER_PATHS.md before starting. All use this same seven-stage project. Junior adds personal bounded code/diagnosis; intermediate independently delivers a changed requirement and regression/recovery; senior adds tenant capacity, version fencing, ADRs, migration/incident and team responsibility. Lesson levels are learning activities, not job ranks. Suggested 90/120/150-minute mocks use junior weights 35/25/15/15/10, intermediate 25/25/20/20/10 and senior 15/20/20/30/15 (coding, debugging, evaluation, architecture, communication). Require all level-specific artifacts, 80/100 and 60% per dimension plus every critical gate; scores are not interchangeable. Separately record local engineering, actual API, mock and production responsibility. Actual job requirements determine missing evidence; reading or supplied green tests cannot establish readiness. The 22 extended exercises map to these same seven project stages: https://ai.lwkjob.com/lab/extended-practice/README.md . Select a bounded implementation for junior, an independently integrated change for mid-level, or a specialty/ADR/ownership package for senior. The local pure-function reports do not automatically integrate features into the project or prove production responsibility. An actual topic integration is available at https://ai.lwkjob.com/lab/project-integration/README.md, with source package https://ai.lwkjob.com/downloads/agent-project-integration-v1.zip. Compare the original baseline with the guided cache integration; submit the separate learner change and role-specific artifacts. Guided results and illustrative author scoring do not count as observed personal implementation. For senior resource work use https://ai.lwkjob.com/lab/senior-runtime/README.md and https://ai.lwkjob.com/downloads/agent-senior-runtime-v1.zip; implement the independent settlement hook and retain declared load windows. Provider evidence review is https://ai.lwkjob.com/lab/provider-evidence/README.md; file consistency alone never establishes a real API run. Use the learner pilot guide for independently observed fresh requirements; actual observations remain pending.
Continue to go deeper
Complete project route
Learn in depth along the actual development sequence. At each stage, the knowledge principles and implementation are first understood, and then short answers and boundary experiments are used to check understanding.
Build an execution loop
Map the boundaries among models, state, tools, and runtime; explain why tool calls require validation, authorization, and receipts.
- Control and completion criteria in agent loopsHierarchical topics
- Combine deterministic workflows with bounded explorationHierarchical topics
- Algebra and business semantics of parallel state mergingHierarchical topics
- Tool contracts: from a valid request to an authorized business effectHierarchical topics
- Task contracts and independent acceptance checksHierarchical topics
- Transfer responsibility and permissions during task handoffHierarchical topics
- Modern harnesses: replaceable controllers, external sessions and controlled executionHierarchical topics
- MCP reconnection across protocol versions and business outcomesHierarchical topics
- Benefits and coordination costs of multiple agentsHierarchical topics
- Delivery conditions and shared deadlines for parallel resultsHierarchical topics
- Separate plan revisions from external factsHierarchical topics
- Separate discovery from execution in large tool catalogsHierarchical topics
- Computation, references, and consistent snapshots for large resultsHierarchical topics
Hands-on verification
Before running the route, read the foundation tracks for model-response-contract, agent-loop-boundaries, tool-contracts, idempotency-recovery and memory-scopes. Revisit tool authority before stage 3 and approval/recovery before stage 4; the execution order is not the prerequisite order. Use the same enterprise-after-sales-agent-v1 project for all four overview blocks. In a core lesson such as Tool contracts, open Sources and validation scope and copy https://ai.lwkjob.com/downloads/enterprise-after-sales-agent-v1.zip to your computer. Extract it and enter enterprise-after-sales-agent-v1 (contains lab.py); all commands below run there. The complete ordered instructions are README.md / README.zh.md; category lists are reading groups, not additional repeated project stages. Setup: python3 --version; python3 lab.py setup (both exit 0). Then step 1 response: python3 lab.py stage response; deliver work/response.json, queued with one model turn and one authorized tool receipt. Step 2 prompt: python3 lab.py stage prompt; deliver work/prompt.json, queued with two turns and two receipts. Check strict schemas, no expected labels in input and persisted budgets. Continue step 3 in the next overview block; no business write yet. Prerequisite entry: https://ai.lwkjob.com/downloads/agent-interview-practice-v1.zip ; in a separate scratch directory, follow PREREQUISITES.md to implement JSON types, tenant SQL, HTTP unknown-write decisions and durable concurrent claims. The scaffold is incomplete, grade exits 1 before implementation. All-four pass requires actual imported learner code and keeps before/after evidence. See https://ai.lwkjob.com/lab/interview-practice/INDEPENDENT_PRACTICE.md for guided/public/new-condition labels.
Connect data and memory
Locate failures along the retrieval pipeline, distinguish task state from cross-task memory, and enforce authorization and revocation throughout queries.
- Memory scopes and trusted authorization contextHierarchical topics
- Revoke memories, clean up derivatives, and prevent stale data from returningHierarchical topics
- RAG evidence: applicability, complete context and supported claimsHierarchical topics
- Memory writes: source authority, valid time, stale jobs and revocationHierarchical topics
- Objects, sources, and bitemporal reasoning in memory conflictsHierarchical topics
- From document ingestion to cited RAG answersHierarchical topics
- Hard filters, value ranking, and causal evaluation in memory retrievalHierarchical topics
- Consistent authorization across RAG and derived dataHierarchical topics
- Entity disambiguation and constraint preservation in query rewritingHierarchical topics
- Definitions, granularity, and execution boundaries in natural-language queriesHierarchical topics
Hands-on verification
Continue the same extraction and work directory after steps 1–2. Step 3 retrieval: python3 lab.py stage retrieval; deliver work/retrieval.json with authorized candidates, actual context, policy/text digests and expiring owner-scoped memory. Step 4 tool/approval, in order: python3 lab.py stage tool python3 -m json.tool work/main-proposal.json python3 lab.py approve --proposal-file work/main-proposal.json Read the proposal before approval. Deliver tool.json, main-proposal.json and approve.json; awaiting_approval then ready, zero merchant returns. Approval binds action/parameters/version/hash at the independent merchant and lasts 300 seconds; proceed promptly to step 5. If expired, use a fresh route workspace. A local approved=true is not authority.
Verify reliability for long-running tasks
Explain how checkpoints, leases, idempotency, and cancellation work together; assess quality using both outcome contracts and execution traces.
- Idempotency, unknown outcomes, and task recoveryHierarchical topics
- Committed effects and conditional compensation in sagasHierarchical topics
- Agent evaluation: executable gates, repeated trials and calibrated judgmentHierarchical topics
- Failure windows and recovery invariantsHierarchical topics
- Release and rollback of behavioral configurationsHierarchical topics
- Atomic intent and duplicate delivery with the outbox patternHierarchical topics
- Fair scheduling, resource quotas, and backpressure across tenantsHierarchical topics
- Structural and business compatibility during workflow upgradesHierarchical topics
Hands-on verification
Continue the same approved main-return task. Step 5 recovery, in order: python3 lab.py fault-main # Expected exit 75. Run each following command separately. python3 lab.py inspect-main --out work/lost-response-before.json python3 lab.py recover-main python3 lab.py stage recovery Only fault-main exits 75; execute it separately, then run each recovery command. Preserve fault-main.json, lost-response-before.json, recover-main.json and recovery.json. The merchant has one effect before/after response-loss recovery; ten additional drills independently check duplicates, two executors, cancellation and current revocation. Step 6 evaluation, in order: python3 lab.py stage evaluation python3 -m unittest discover -v > work/tests.log 2>&1 cat work/tests.log Deliver evaluation.json, per-task traces and tests.log: 34 tests, v1 3/6 and v2 6/6 deterministic mechanical checks on the same six tasks. Keep failures, measured latency and simulated/provider usage separate; semantic text is unscored.
Design a production system
Explain tracing, approval boundaries, framework selection, cost budgets, and system responsibilities; propose an enterprise architecture with verifiable acceptance criteria.
- Approval binding: unchanged intent, current authority and one operationHierarchical topics
- Reconnecting clients and durable task stateHierarchical topics
- Isolate resources and capabilities when executing codeHierarchical topics
- Semantic and authorization equivalence for cache reuseHierarchical topics
- Task causality and resource attributionHierarchical topics
- Incident containment, evidence, and causal diagnosisHierarchical topics
- Match orchestration abstractions to business responsibilitiesHierarchical topics
- Harness integration: official SDK, recovery and OTLPHierarchical topics
- External data and execution-permission boundariesHierarchical topics
- Bind code changes to acceptance evidenceHierarchical topics
- Capability and status contracts for fallback modelsHierarchical topics
- Separate natural-language requests from transaction stateHierarchical topics
- A controlled task chain from evidence to publicationHierarchical topics
- Evidence and conditional reasoning about project capabilitiesHierarchical topics
- Bind claims to sources and verification scopeHierarchical topics
- Tenant isolation and continuous authorization during executionHierarchical topics
Hands-on verification
Continue after steps 1–6. Step 7 deployment and delivery, in order: python3 lab.py stage deployment python3 lab.py extension python3 lab.py deliver --out work/submission EXTENSION.md and extension are a solved gift-policy walkthrough. Independent implementation is the unsolved hygiene task in HYGIENE_TASK.md. Deliver deployment/rehearsal.json proving actual local API processes, schema 1→2 migration, Agent-only schema-1 rollback and the original merchant receipt with one effect. Run python3 verify_transfer.py --out work/transfer-review.json: the unmodified package exits 1 (expected teaching baseline); for intermediate/senior your implementation must pass all nine mechanical checks and keep the original v2 six-case regression unchanged. Review the cited free text yourself. After deliver, add transfer-review.json, transfer-review-runs, your code diff and semantic/incident review to work/submission. Submit code, migrations, fictional databases, run/evaluation evidence, architecture, your semantic review and incident note. Docker Compose is supplied but container/cloud deployment and live model quality are unverified; multi-Agent/index migration are optional advanced branches. Junior may preserve the expected failed hygiene baseline as pending; the junior pass requires personal bounded code/diagnosis instead. Intermediate/senior must complete hygiene, and senior additionally completes its platform artifact gate. Choose junior/intermediate/senior in https://ai.lwkjob.com/lab/capstone/CAREER_PATHS.md before starting. All use this same seven-stage project. Junior adds personal bounded code/diagnosis; intermediate independently delivers a changed requirement and regression/recovery; senior adds tenant capacity, version fencing, ADRs, migration/incident and team responsibility. Lesson levels are learning activities, not job ranks. Interview exit: project-experience-deep-dive and INTERVIEW_READINESS.md. Take the selected 90/120/150-minute mock with its artifact gate and rubric; keep the four readiness states. Senior extension source: https://ai.lwkjob.com/downloads/agent-career-levels-v1.zip ; instructions: https://ai.lwkjob.com/lab/career-levels/README.md . Implement grade --level junior/intermediate/senior; public fixed cases remain local practice, not production experience. An actual topic integration is available at https://ai.lwkjob.com/lab/project-integration/README.md, with source package https://ai.lwkjob.com/downloads/agent-project-integration-v1.zip. Compare the original baseline with the guided cache integration; submit the separate learner change and role-specific artifacts. Guided results and illustrative author scoring do not count as observed personal implementation. For senior resource work use https://ai.lwkjob.com/lab/senior-runtime/README.md and https://ai.lwkjob.com/downloads/agent-senior-runtime-v1.zip; implement the independent settlement hook and retain declared load windows. Provider evidence review is https://ai.lwkjob.com/lab/provider-evidence/README.md; file consistency alone never establishes a real API run. Use the learner pilot guide for independently observed fresh requirements; actual observations remain pending. Use cumulative 6/12/18-item graduation checklists and observable scoring: https://ai.lwkjob.com/lab/capstone/ASSESSMENT_GUIDE.md . Intermediate retains junior evidence and senior retains intermediate evidence. The consistency script does not certify ability; remediate gaps and retest under a reviewer-observed complete fresh contract. Independent cross-business supplement: enterprise ticket closure, https://ai.lwkjob.com/lab/workorder-transfer/README.md; source https://ai.lwkjob.com/downloads/agent-workorder-transfer-v1.zip. Implement junior evidence selection, intermediate original-key recovery and senior handoff gating; keep red/green reports and authority facts. Public cumulative 11/29/54 checks replace neither original 6/12/18 artifacts, hygiene work nor a complete fresh observed condition.