KoreaDevKNOWLEDGE SHARING

Content typeLearn

AI SOFTWARE DEVELOPMENT · 03 / 10

Understanding AI agents

Distinguish chatbots that produce answers from agents that change real state, and design the boundaries of context, memory, tools, policy, and evaluation.

Difficulty
Beginner · Practical
Structure
Lessons 8 · Labs 2 · Assessment

CORE UNIT 1 / 1

Understanding AI agents

Distinguish chatbots that produce answers from agents that change real state, and design the boundaries of context, memory, tools, policy, and evaluation.

Difficulty
Beginner · Practical
Structure
Lessons 8 · Labs 2 · Assessment

Diagrams and tables: composed by the author using each lesson's official primary sources. Find the originals and review dates at the end of that lesson.

NEW HIRE ONBOARDING

Start in the order you would receive your first assignment

So that even a new hire with no prior IT background can follow along, we start with the situation, the task, the evidence, and when to report, before difficult definitions.

  1. 01

    Read the situation in one sentence

    The Agent calls the refund tool based only on the customer's message and, after a timeout, refunds the same order again as a new request.

  2. 02

    Today's assignment

    Distinguish chatbots, workflows, and agents by control flow and who chooses the tools.

  3. 03

    Evidence that shows the work is complete

    Change revisions and permissions before resuming to verify that stale results are rechecked and unattempted work is kept distinct.

  4. 04

    When to stop and ask a senior colleague

    Along with flexibility come more nondeterminism, cost, long-running execution, and unpredictable behavior.

Unpack unfamiliar terms first

Distinguish chatbots, workflows, and agents
The distinction is not conversational style, but who selects the next action and whether external state can be changed.
Observation, planning, action, and evaluation loop
An agent is not a one-time plan but a loop that reads actual results after each action and decides whether the exit condition is met.
The role of context and memory
Context is the workbench for current reasoning, and memory is a selective storage layer for finding needed information again.

Questions for this course

Why did it change, and what must be verified?

Do not merely memorize a technology's advantages; check the conditions under which they hold and the new failure boundaries they introduce.

OBSERVABLE OUTCOMES

What you can do after this course

  1. Distinguish chatbots, workflows, and agents by control flow and who chooses the tools.
  2. Draw the model, context, memory, tools, policy, and evaluator as a single execution loop.
  3. Apply approval, idempotency, stopping, and recovery conditions to actions with side effects.

PREREQUISITE CHECK

Three things to check before reading

This is not a test of memorized answers. Think about each question first, then open the explanation to review the foundational concepts used in this course.

1What's the difference between answering a question and canceling an actual order?

An answer outputs information, while canceling an order is a side effect that changes external state. The latter requires controls over identity, authorization, targets, retries, and recovery.

2Are workflows and agents the same thing?

When code defines the sequence and branches, the system is closer to a workflow. When a model dynamically selects the next tool and step, the agent has greater autonomy.

3Does memory store the entire conversation?

Memory selects, summarizes, and retrieves information to reuse in later tasks. Unlimited transcripts create cost, privacy, and stale-information problems.

TEXTBOOK GUIDE

Main text that covers each concept from its background to the criteria for judging it

We explain the material section by section so readers new to IT can connect causes and effects without memorizing terms.

CONCEPT FLOW

How the chapters connect

The chapters are not isolated short answers to memorize. Follow them from left to right to see how each chapter's concepts support the next decision.

  1. 1.Distinguish chatbots, workflows, and agents
  2. 2.Observation, planning, action, and evaluation loop
  3. 3.The role of context and memory
  4. 4.Tool and skill contracts
  5. 5.Multi-Agent and handoff
  6. 6.Avoid replaying a mutation after losing its response
  7. 7.Grade success claims separately from environment outcomes
  8. 8.Facts needed in a long-running task’s resume record
Understanding AI agents: the overall map. If you lose track while reading the detailed explanations and chapters below, return to this sequence.
Figure 3-1. Understanding AI agents: concept developmentShows how each chapter’s choices and limits lead to the problems of the next chapter.
  1. 1
    Distinguish chatbots, workflows, and agents

    The distinction is not conversational style, but who selects the next action and whether external state can be changed.

  2. 2
    Observation, planning, action, and evaluation loop

    An agent is not a one-time plan but a loop that reads actual results after each action and decides whether the exit condition is met.

  3. 3
    The role of context and memory

    Context is the workbench for current reasoning, and memory is a selective storage layer for finding needed information again.

  4. 4
    Tool and skill contracts

    A tool is the execution contract for a capability, and a skill bundles repeatable knowledge and procedures, but a skill does not replace authorization.

  5. 5
    Multi-Agent and handoff

    Increase the number of agents only when the benefits of context isolation, parallelism, and independent verification exceed coordination costs, not merely to add role names.

  6. 6
    Avoid replaying a mutation after losing its response

    A timeout may mean the outcome is unconfirmed, not that execution has definitely failed.

  7. 7
    Grade success claims separately from environment outcomes

    Agent evaluation must separately observe claimed results and actual changed state.

  8. 8
    Facts needed in a long-running task’s resume record

    A summary helps work continue, but it does not turn past permissions or unconfirmed outcomes into current facts.

CONTROLLED EXPLANATION

Recover R17 from an unconfirmed outcome

Current state: Create R17

Recover R17 from an unconfirmed outcome

A state transition that resolves response loss using original request identity rather than another write.

Execute mutationConnection lostNo new writesCheck existence and permission1Create R172Server saves3Lost response4Look up R175Verify or hand off
  1. Create R17

    Apply idempotency contract

  2. Server saves

    Booking ID B42

  3. Lost response

    Outcome unconfirmed

  4. Look up R17

    Check read permission

  5. Verify or hand off

    Verify B42 · hold if lookup is unavailable

1 → 2
Execute mutation
2 → 3
Connection lost
3 → 4
No new writes
4 → 5
Check existence and permission

An unconfirmed outcome is neither a failure nor a success. If you lack permission to look it up, hand it off to someone who has that permission.

CONCRETE CASES

Selection criteria for all courses

TABLE 3-1

Selection criteria for all courses

Compare the technology in each chapter by how it works, the new costs it adds, and the evidence to check, not by its name.

Table 3-1. Understanding AI agents: design decision criteria
.Core mechanismCosts to watchEvidence to check
1. Distinguish chatbots, workflows, and agentsDelegates part of the control flow to model judgment and feeds tool results back as the next observation.Along with flexibility come more nondeterminism, cost, long-running execution, and unpredictable behavior.Draw the same task as a fixed graph and as a dynamic loop, and mark where the model makes choices.
2. Observation, planning, action, and evaluation loopTool output becomes a new state observation that updates the next action and the termination decision.Latency and cost accumulate with every iteration, and a misread state escalates into a chain of actions.Inject a failure twice in a row and check that repeat detection and human escalation work.
3. The role of context and memoryRetrieval and summarization bring into context only the portion of long-term information relevant to the current stage.Storage and retrieval errors, privacy issues, stale memory, and prompt injection create new attack surfaces.Check that each memory item has a subject, source, review date, permitted uses, and deletion method.
4. Tool and skill contractsStructured schemas and policies turn natural-language intent into constrained execution.If the schema is too broad or the description is too vague, the model can choose a risky parameter.Use contract tests to verify each tool's allowed targets, side effects, idempotency keys, and error recovery.
5. Multi-Agent and handoffSeparate contexts and explicit result contracts combine specialized work in parallel or in stages.Coordination, duplicate research, conflicting changes, and questions of responsibility for errors increase.Draw the task's dependency graph and assign tasks that touch shared state to a single owner.
6. Avoid replaying a mutation after losing its responsePreserve mutation identity and route uncertain execution to lookup, idempotency handling or human verification.Without server-supported outcome lookup and idempotency, safe automatic retries are limited.Inject post-save response loss and lookup denial separately, checking for duplicate bookings and permission bypass.
7. Grade success claims separately from environment outcomesSeparate environment-snapshot comparison from user-report evaluation to judge action and communication success independently.Environment resets cost time, while rigid tool-order expectations can reject valid alternative paths.Compare target and non-target state, and verify each reset and final report against actual outcomes.
8. Facts needed in a long-running task’s resume recordRecord verified state and evidence identity, then recheck revisions and permissions on resume.Compression can lose exceptions and not-attempted states, requiring resume fixtures.Change revisions and permissions before resuming to verify that stale results are rechecked and unattempted work is kept distinct.

CHAPTER 1 / 8

Distinguish chatbots, workflows, and agents

The distinction is not conversational style, but who selects the next action and whether external state can be changed.

Why this concept became necessary

A Chatbot generates a response to given input. A Workflow executes developer-defined steps and branches and is highly predictable. In an Agent, the model selects the next tool, order, and whether to repeat based on the goal and current observations.

For tasks with known paths, such as simple classification or three-step approval, a workflow is cheaper and more stable. The flexibility of an agent loop justifies its cost only when there are many exceptions and the required information is difficult to predict.

Figure 3-2. Distinguish chatbots, workflows, and agents: decision flowThe chain from the problem conditions through the working principle to verification evidence.
Problems and selection criteria

The distinction is not conversational style, but who selects the next action and whether external state can be changed.

How it works

Delegates part of the control flow to model judgment and feeds tool results back as the next observation.

Verification evidence

Draw the same task as a fixed graph and as a dynamic loop, and mark where the model makes choices.

Follow it through a concrete system

A workflow suits routing customer inquiries to one of three predefined teams because the branches can be written explicitly in code. An agent loop may help with tasks such as incident investigation, where the next log to inspect or hypothesis to test depends on observations. A conversational interface or natural phrasing does not determine this distinction.

When choosing autonomy, consider both the benefit of handling exceptions and the cost of action failures. A person can review a draft answer, but a single bad decision about a refund, account lock, or firewall change can cause real harm. Even within one agent, a hybrid structure that automates reads and suggestions while sending state changes through fixed workflows and approval is often safer.

Selection criteria and failure boundaries

Along with flexibility come more nondeterminism, cost, long-running execution, and unpredictable behavior.

Misconceptions to avoid: It is incorrect to assume that anything using tool calling once is an agent.

Verify it yourself

Draw the same task as a fixed graph and as a dynamic loop, and mark where the model makes choices.

What to judgeDelegates part of the control flow to model judgment and feeds tool results back as the next observation.

To summarize this chapter

The distinction is not conversational style, but who selects the next action and whether external state can be changed.

Official sources for this chapter

The technical facts in the text were reviewed against the following primary sources. The author reconstructed the diagrams and comparisons using these materials.

  1. Anthropic, 「Building Effective AgentsReview date 2026-08-28 · Scope Latest official documentation
  2. Model Context Protocol, 「ArchitectureReview date 2026-08-28 · Scope MCP 2025-06-18

CHAPTER 2 / 8

Observation, planning, action, and evaluation loop

An agent is not a one-time plan but a loop that reads actual results after each action and decides whether the exit condition is met.

Why this concept became necessary

An agent breaks a goal into small steps, calls tools, and observes success or failure output. When something fails, it narrows down the cause and chooses different inputs or recovery actions, and it must stop once there is evidence that the goal is met.

Without a maximum step count, time and token budgets, repetition detection, and failure escalation, the system can retry the same error indefinitely. Termination must be determined by external evidence such as tests, state queries, or approval, not by saying the work is complete.

Figure 3-3. Observation, planning, action, and evaluation loop: decision flowThe chain from the problem conditions through the working principle to verification evidence.
Problems and selection criteria

An agent is not a one-time plan but a loop that reads actual results after each action and decides whether the exit condition is met.

How it works

Tool output becomes a new state observation that updates the next action and the termination decision.

Verification evidence

Inject a failure twice in a row and check that repeat detection and human escalation work.

Follow it through a concrete system

Loop state includes not only the goal but also attempted actions, observed results, remaining budget, and grounds for termination. Without this record, an agent may repeat the same search or failed tool call with only different wording. When returning a tool error to the model, provide structured retryability, changed state, and safe next actions rather than a generic failure sentence.

For example, if an agent investigating a service incident wants to change settings after reading logs, it must first collect read-only evidence, state a hypothesis, identify the impact scope, and prepare a rollback, then make the change once after approval. After the change, it must rerun the originally failing user scenario as well as health checks before finishing. If it reaches the maximum step count or evidence conflicts, it must hand off to a person rather than invent completion.

Selection criteria and failure boundaries

Latency and cost accumulate with every iteration, and a misread state escalates into a chain of actions.

Misconceptions to avoid: A good initial plan does not remove the need for re-observation.

Verify it yourself

Inject a failure twice in a row and check that repeat detection and human escalation work.

What to judgeTool output becomes a new state observation that updates the next action and the termination decision.

To summarize this chapter

An agent is not a one-time plan but a loop that reads actual results after each action and decides whether the exit condition is met.

Official sources for this chapter

The technical facts in the text were reviewed against the following primary sources. The author reconstructed the diagrams and comparisons using these materials.

  1. Anthropic, 「Building Effective AgentsReview date 2026-08-28 · Scope Latest official documentation

CHAPTER 3 / 8

The role of context and memory

Context is the workbench for current reasoning, and memory is a selective storage layer for finding needed information again.

Why this concept became necessary

Context contains the goal, policies, current state, relevant tool descriptions, and recent evidence. Too little can lose constraints; too much can bury important clues. Define a policy for retrieving and discarding information according to the task stage.

Memory can store user preferences, past decisions, and business facts with provenance and timestamps. It still needs scope, expiration, and deletion boundaries so that stale values, other users' information, and unverified summaries are not treated as current facts.

Figure 3-4. The role of context and memory: decision flowThe chain from the problem conditions through the working principle to verification evidence.
Problems and selection criteria

Context is the workbench for current reasoning, and memory is a selective storage layer for finding needed information again.

How it works

Retrieval and summarization bring into context only the portion of long-term information relevant to the current stage.

Verification evidence

Check that each memory item has a subject, source, review date, permitted uses, and deletion method.

Follow it through a concrete system

Storing an entire conversation as memory can help the same user’s next request, but outdated addresses or abandoned operating decisions can be reused along with it. Attach the fact’s subject, source, validity period, and verification time to each memory item, and re-verify values that can be looked up again in the current system whenever possible.

Mixing personalization and business knowledge in the same store is also risky. Tone preferences may be broadly reusable, but customer contracts and access permissions must be tied to a tenant and purpose. Retrieval must apply authorization and freshness checks first, rather than considering only relevance scores. Users must be able to inspect, edit, or delete stored information.

Selection criteria and failure boundaries

Storage and retrieval errors, privacy issues, stale memory, and prompt injection create new attack surfaces.

Misconceptions to avoid: A large context window does not eliminate the need for separate memory design.

Verify it yourself

Check that each memory item has a subject, source, review date, permitted uses, and deletion method.

What to judgeRetrieval and summarization bring into context only the portion of long-term information relevant to the current stage.

To summarize this chapter

Context is the workbench for current reasoning, and memory is a selective storage layer for finding needed information again.

Official sources for this chapter

The technical facts in the text were reviewed against the following primary sources. The author reconstructed the diagrams and comparisons using these materials.

  1. Anthropic, 「Effective Context Engineering for AI AgentsReview date 2026-08-28 · Scope Latest official documentation

CHAPTER 4 / 8

Tool and skill contracts

A tool is the execution contract for a capability, and a skill bundles repeatable knowledge and procedures, but a skill does not replace authorization.

Why this concept became necessary

A tool schema must tell the model and host its name, input types, outputs, errors, and side effects. Separating reads, limited writes, and approved transfers instead of exposing a broad “file processing” tool reduces the scope of failures and makes auditing easier.

A skill is a reusable procedure that defines the order of investigation and verification. Even if it contains tool-use instructions, the host must enforce actual capabilities and authorization; a written prohibition alone is not a safety boundary.

Figure 3-5. Tool and skill contracts: decision flowThe chain from the problem conditions through the working principle to verification evidence.
Problems and selection criteria

A tool is the execution contract for a capability, and a skill bundles repeatable knowledge and procedures, but a skill does not replace authorization.

How it works

Structured schemas and policies turn natural-language intent into constrained execution.

Verification evidence

Use contract tests to verify each tool's allowed targets, side effects, idempotency keys, and error recovery.

Follow it through a concrete system

A good tool exposes limited business capabilities such as `getInvoice` or `requestRefund` to the model, not the database itself. Specify allowed ranges and identifier formats in the input, success state and lookup keys in the output, and retryability in errors. This lets the host build a preview before execution and the server validate the same rules again.

A skill document specifies the order of tool use and the evidence to retain. However, even if it says “do not touch production,” shell credentials that can access every environment mean there is no technical barrier. Verify procedural correctness through review and tests, and capability limits through sandboxing, credential scope, and server authorization.

Selection criteria and failure boundaries

If the schema is too broad or the description is too vague, the model can choose a risky parameter.

Misconceptions to avoid: It is incorrect to assume that installing a skill automatically makes the required system permissions safe.

Verify it yourself

Use contract tests to verify each tool's allowed targets, side effects, idempotency keys, and error recovery.

What to judgeStructured schemas and policies turn natural-language intent into constrained execution.

To summarize this chapter

A tool is the execution contract for a capability, and a skill bundles repeatable knowledge and procedures, but a skill does not replace authorization.

Official sources for this chapter

The technical facts in the text were reviewed against the following primary sources. The author reconstructed the diagrams and comparisons using these materials.

  1. Anthropic, 「Building Effective AgentsReview date 2026-08-28 · Scope Latest official documentation
  2. Anthropic, 「Effective Context Engineering for AI AgentsReview date 2026-08-28 · Scope Latest official documentation

CHAPTER 5 / 8

Multi-Agent and handoff

Increase the number of agents only when the benefits of context isolation, parallelism, and independent verification exceed coordination costs, not merely to add role names.

Why this concept became necessary

Parallel agents can reduce time for independent research or broad candidate searches. In contrast, editing the same file simultaneously or waiting on each other's assumptions increases conflicts, duplicate token use, and information loss during handoffs.

A handoff must include the goal, evidence already verified, changed state, open questions, and permissions. If a coordinating agent rereads every detail, the benefit of dividing work disappears, so keep result contracts and agreement points small.

Figure 3-6. Multi-Agent and handoff: decision flowThe chain from the problem conditions through the working principle to verification evidence.
Problems and selection criteria

Increase the number of agents only when the benefits of context isolation, parallelism, and independent verification exceed coordination costs, not merely to add role names.

How it works

Separate contexts and explicit result contracts combine specialized work in parallel or in stages.

Verification evidence

Draw the task's dependency graph and assign tasks that touch shared state to a single owner.

Follow it through a concrete system

Tasks such as researching different official documents or running independent tests are easy to parallelize once the result format is agreed. In contrast, agents changing the same migration file or shared state simultaneously may overwrite completed changes or test against different assumptions. Marking read-only and write boundaries in the task graph is the starting point for choosing the number of agents.

A handoff document needs reproducible evidence rather than a mere summary: the files and lines checked, the commands run and their results, hypotheses adopted or discarded, and external state not yet changed. The receiving agent should be able to inspect the result contract and reopen only what it needs; if every investigation must be repeated from scratch, the way work is divided needs to be redesigned.

Selection criteria and failure boundaries

Coordination, duplicate research, conflicting changes, and questions of responsibility for errors increase.

Misconceptions to avoid: A multi-agent system is not automatically more accurate than a single agent.

Verify it yourself

Draw the task's dependency graph and assign tasks that touch shared state to a single owner.

What to judgeSeparate contexts and explicit result contracts combine specialized work in parallel or in stages.

To summarize this chapter

Increase the number of agents only when the benefits of context isolation, parallelism, and independent verification exceed coordination costs, not merely to add role names.

Official sources for this chapter

The technical facts in the text were reviewed against the following primary sources. The author reconstructed the diagrams and comparisons using these materials.

  1. Anthropic, 「Building Effective AgentsReview date 2026-08-28 · Scope Latest official documentation

CHAPTER 6 / 8

Avoid replaying a mutation after losing its response

A timeout may mean the outcome is unconfirmed, not that execution has definitely failed.

Why this concept became necessary

An agent cannot conclude that no booking exists merely because it received no response after calling a booking-creation tool. The server may already have saved the booking before the response was lost, so the next action must not be to repeat the same write as a new request.

Distinguish task states as not attempted, in progress, verified success, verified failure, and unconfirmed outcome. Without this distinction, a model may rerun a successful mutation based on the single word “error”.

Persist a task request ID and idempotency key when starting a mutation, and use the same identity to query its outcome. Returning an existing result is a server contract; merely adding a client key does not establish idempotency.

If querying is also unavailable, preserve the unknown-outcome state and hand off the exact target for human verification. Separate established facts from uncertainty instead of declaring failure or reassuring the user of success.

Figure 3-7. Avoid replaying a mutation after losing its response: decision flowThe chain from the problem conditions through the working principle to verification evidence.
Problems and selection criteria

A timeout may mean the outcome is unconfirmed, not that execution has definitely failed.

How it works

Preserve mutation identity and route uncertain execution to lookup, idempotency handling or human verification.

Verification evidence

Inject post-save response loss and lookup denial separately, checking for duplicate bookings and permission bypass.

Follow it through a concrete system

In a fictional booking fixture, break the connection immediately after the server saves. The next attempt must query the original request ID rather than create a new booking. Also break the connection before the save in a separate fixture. Comparing both demonstrates that identical timeout messages can hide either nonexecution or completed execution.

Judge success by one final booking and the same booking ID associated with the original request. Two tool calls may be a write and a read, so call count alone does not establish duplication. Check key retention and responses to different inputs using the same key. Expired retries or changed requests must not automatically be treated as the same result.

When outcome lookup returns 403, do not retry with another user’s credentials. Hand the request ID and the fact that current permissions cannot verify it to an authorized operator. Separate verified and unknown steps in the handoff. A permission denial must not relabel other completed mutations as failed and distort recovery scope.

Recovery here means checking whether external state exists. Rereading the model’s prior explanation is not equivalent to querying the saved booking; use the actual environment outcome as completion evidence. Compare the final message and booking ID without raw personal data. Verification using identifiers and states reduces unnecessary copying of sensitive data.

Selection criteria and failure boundaries

Without server-supported outcome lookup and idempotency, safe automatic retries are limited.

Misconceptions to avoid: A timeout does not prove that external state stayed unchanged.

Verify it yourself

Inject post-save response loss and lookup denial separately, checking for duplicate bookings and permission bypass.

What to judgePreserve mutation identity and route uncertain execution to lookup, idempotency handling or human verification.

To summarize this chapter

A timeout may mean the outcome is unconfirmed, not that execution has definitely failed.

Official sources for this chapter

The technical facts in the text were reviewed against the following primary sources. The author reconstructed the diagrams and comparisons using these materials.

  1. Anthropic, 「Building Effective AgentsReview date 2026-08-28 · Scope Latest official documentation
  2. Anthropic, 「Demystifying Evals for AI AgentsReview date 2026-08-28 · Scope Latest official documentation

CHAPTER 7 / 8

Grade success claims separately from environment outcomes

Agent evaluation must separately observe claimed results and actual changed state.

Why this concept became necessary

A claim of completion does not finish a task if the target environment is unchanged. Conversely, state may have changed despite an incomplete final message, so one conversation score cannot replace outcome verification.

Outcome grading uses code to check file contents, approved state transitions, and forbidden changes. Explanation grading checks whether the user was accurately told of success, failure, or an unconfirmed outcome, and when the two verdicts differ, records which boundary was wrong.

Traces support diagnosis rather than enforcing one memorized tool sequence. Different valid paths meeting the same outcome and safety conditions should not fail merely because their unnecessary ordering differs.

One success does not characterize nondeterministic execution. Repeat runs with fixed inputs and environment snapshots, recording cost, step counts, and failure types as well as success, so rare risks are not hidden by averages.

Figure 3-8. Grade success claims separately from environment outcomes: decision flowThe chain from the problem conditions through the working principle to verification evidence.
Problems and selection criteria

Agent evaluation must separately observe claimed results and actual changed state.

How it works

Separate environment-snapshot comparison from user-report evaluation to judge action and communication success independently.

Verification evidence

Compare target and non-target state, and verify each reset and final report against actual outcomes.

Follow it through a concrete system

A fictional address-change task supplies a pre-change snapshot and an allowed new address. The evaluator checks that only the target customer changed and other customers’ fields stayed intact. Include fields that must remain unchanged in the expected state. Checking only the target address can miss unintended phone-number or settings changes.

A fluent final message does not pass safety if another customer’s address changed. Reporting failure after a successful change is a separate defect because it can encourage retries. Communication grading also checks disclosure of uncertainty. A definitive completion claim after failed verification gives users an unjustified guarantee even if the outcome happens to be correct.

Running another trial without resetting the fixture can create an easy success from already-changed state. Restore the environment each time and distinguish new trial IDs from the shared task ID. Do not include a trial with a failed reset as a normal sample. Separate environment setup failures from agent task failures to avoid confusing model performance with harness defects.

Place the outcome verdict, the explanation verdict, forbidden side effects, and reset verification side by side in the report. These four pieces of evidence distinguish a prompt change that genuinely improved the task from one that exploited gaps in the grader. Do not promote a faster candidate if it made forbidden changes. Keep task success rate and safety conditions independent so a shorter execution time never comes at the cost of changing another customer’s data.

Selection criteria and failure boundaries

Environment resets cost time, while rigid tool-order expectations can reject valid alternative paths.

Misconceptions to avoid: A fluent completion message is not evidence of external task success.

Verify it yourself

Compare target and non-target state, and verify each reset and final report against actual outcomes.

What to judgeSeparate environment-snapshot comparison from user-report evaluation to judge action and communication success independently.

To summarize this chapter

Agent evaluation must separately observe claimed results and actual changed state.

Official sources for this chapter

The technical facts in the text were reviewed against the following primary sources. The author reconstructed the diagrams and comparisons using these materials.

  1. Anthropic, 「Demystifying Evals for AI AgentsReview date 2026-08-28 · Scope Latest official documentation

CHAPTER 8 / 8

Facts needed in a long-running task’s resume record

A summary helps work continue, but it does not turn past permissions or unconfirmed outcomes into current facts.

Why this concept became necessary

Compacting a long investigation can lose constraints or failed attempts. A resume record must separate goals, changed targets, verified results, open questions and stopping reasons to avoid repeating the same failure.

Link summary statements to evidence locations and revisions. “Tests passed” alone cannot identify tested files and inputs and may be wrongly applied to later changes.

The current executor rechecks targets, users, and expiration conditions rather than reusing stored authorization decisions as is. A task allowed in a previous session may fall outside that approval when moved to a new user or another resource.

Keep only necessary facts in resume memory. Copying secrets and personal data into summaries preserves exposure even when context shrinks; consider referencing access-controlled evidence instead.

Figure 3-9. Facts needed in a long-running task’s resume record: decision flowThe chain from the problem conditions through the working principle to verification evidence.
Problems and selection criteria

A summary helps work continue, but it does not turn past permissions or unconfirmed outcomes into current facts.

How it works

Record verified state and evidence identity, then recheck revisions and permissions on resume.

Verification evidence

Change revisions and permissions before resuming to verify that stale results are rechecked and unattempted work is kept distinct.

Follow it through a concrete system

A fictional deployment investigation records “configuration edited, restart not attempted, validation on hold.” If the next run treats restart as completed, the summary lost state distinctions. Store stage states as distinct entries rather than one free-form sentence. Compare them with the resumed run to detect invented successful steps.

Change the configuration revision before resuming so it no longer matches prior evidence. A correct run detects the difference, reassesses impact, and reruns validation. A fixture that accepts matching filenames without revision checks must also fail. A new file with the same name is a different artifact; content identity links validation to its subject.

Do not guess and execute a next action that is absent from the record. Separating the approvals still required from read-only work that can continue independently reduces both unnecessary stopping and overreach. Record the next action’s inputs and stop conditions so the person resuming does not repeat broad exploration. If the earlier record conflicts with new evidence, resolve that difference first and update the plan.

Resume-test success is not a shorter summary. Judge preserved constraints, absence of duplicate mutations, detection of stale evidence, and an accurate next action together. Keep tools and permissions equal when comparing the same task before and after compaction; otherwise a candidate's added tools may be misread as an improvement in summarization.

Selection criteria and failure boundaries

Compression can lose exceptions and not-attempted states, requiring resume fixtures.

Misconceptions to avoid: An approval written in a summary does not automatically authorize a new run.

Verify it yourself

Change revisions and permissions before resuming to verify that stale results are rechecked and unattempted work is kept distinct.

What to judgeRecord verified state and evidence identity, then recheck revisions and permissions on resume.

To summarize this chapter

A summary helps work continue, but it does not turn past permissions or unconfirmed outcomes into current facts.

Official sources for this chapter

The technical facts in the text were reviewed against the following primary sources. The author reconstructed the diagrams and comparisons using these materials.

  1. Anthropic, 「Effective Context Engineering for AI AgentsReview date 2026-08-28 · Scope Latest official documentation
  2. Anthropic, 「Demystifying Evals for AI AgentsReview date 2026-08-28 · Scope Latest official documentation

INTERACTIVE LAB 1 / 2

Lab 1 · Restore the execution boundary of a refund Agent

The Agent calls the refund tool based only on the customer's message and, after a timeout, refunds the same order again as a new request.

Choose a design that prevents both duplicate refunds and unauthorized execution.

Choose an answer

Correct answer A

A. Verify the authenticated customer, order ownership, and policy; require approval for high-value actions; and query the result using an order-ID-based idempotency key.A decision that accounts for conditions, working principles, and failure boundaries together.

B. Add one line to the prompt: “issue refunds carefully.”It considers only some benefits and omits prerequisites or newly introduced failure boundaries.

C. After a timeout, keep sending new refund requests until one succeeds.It treats the responsibilities of different layers as one and misses the actual verification points.

D. Switch to the largest model and keep the existing permissions.It relies on technology names or trends, with no observable evidence from the current requirements.

INTERACTIVE LAB 2 / 2

Lab 2 · The next action after a booking response disappears

Booking request R17 was saved on the server, but its response was lost. The agent faces an unconfirmed outcome and can use a read-only tool to look it up by request ID.

Choose an action that obtains completion evidence without duplicating the booking.

Choose an answer

Correct answer D

A. Create the same booking with a new request ID.This may create a duplicate if the original booking exists.

B. Declare failure because no response arrived.A lost response does not prove a failed save.

C. Report success and skip lookup.An unverified success claim is not completion evidence.

D. Query saved state and booking ID for R17 and report only verified results.Lookup preserves mutation identity and verifies the outcome without another write.

KEY TERMS

Key terms in this unit

Distinguish chatbots, workflows, and agents
Delegates part of the control flow to model judgment and feeds tool results back as the next observation.
Observation, planning, action, and evaluation loop
Tool output becomes a new state observation that updates the next action and the termination decision.
The role of context and memory
Retrieval and summarization bring into context only the portion of long-term information relevant to the current stage.
Tool and skill contracts
Structured schemas and policies turn natural-language intent into constrained execution.
Multi-Agent and handoff
Separate contexts and explicit result contracts combine specialized work in parallel or in stages.
Avoid replaying a mutation after losing its response
Preserve mutation identity and route uncertain execution to lookup, idempotency handling or human verification.
Grade success claims separately from environment outcomes
Separate environment-snapshot comparison from user-report evaluation to judge action and communication success independently.
Facts needed in a long-running task’s resume record
Record verified state and evidence identity, then recheck revisions and permissions on resume.

UNIT WORKBOOK

Exercises and worksheets for applying concepts to new situations

Start by checking basic principles, then expand to practical workplace decisions. After submitting an answer, you can see why every option is correct or incorrect, not just the correct answer.

THREE-LEVEL ASSESSMENT

From basic principles to operational decisions

After you submit an answer, you can see not only the correct answer but also why each option is right or wrong.

Basic Question 1

When is an agent needed instead of a workflow?

Choose an answer

Correct answer C

A. A task that needs a chatbot-shaped screen.It treats the responsibilities of different layers as one and misses the actual verification points.

B. Any task that can use the latest model.It relies on technology names or trends, with no observable evidence from the current requirements.

C. A task whose required steps depend on observations and are difficult to enumerate completely as fixed branches.A decision that accounts for conditions, working principles, and failure boundaries together.

D. All simple repetitive tasks.It considers only some benefits and omits prerequisites or newly introduced failure boundaries.

Apply Question 2

What should you check before using a memory item for a current decision?

Choose an answer

Correct answer D

A. Check only whether the sentences read naturally.It considers only some benefits and omits prerequisites or newly introduced failure boundaries.

B. Check only whether it fits in the Context window.It treats the responsibilities of different layers as one and misses the actual verification points.

C. Check only whether storage capacity is large.It relies on technology names or trends, with no observable evidence from the current requirements.

D. The subject, source, review time, scope, and need to re-verify against current state.A decision that accounts for conditions, working principles, and failure boundaries together.

Capstone Question 3

What is the best criterion for choosing multi-agent?

Choose an answer

Correct answer A

A. Check that tasks can run independently and have result contracts, and measure whether parallel gains exceed coordination costs.A decision that accounts for conditions, working principles, and failure boundaries together.

B. See whether many Agent names can be created.It considers only some benefits and omits prerequisites or newly introduced failure boundaries.

C. Have all agents edit the same file at the same time.It treats the responsibilities of different layers as one and misses the actual verification points.

D. Check whether a single agent has gone out of fashion.It relies on technology names or trends, with no observable evidence from the current requirements.

PRIMARY SOURCES

Course references

This list collects the sources for each chapter. The text and author-created diagrams were prepared by directly reviewing the originals below.

PERSONAL WORKSHEET

A learning worksheet you adapt to your own environment

Your input remains only on the current browser screen and is not stored or transmitted externally. Use categories and pseudonyms instead of actual sensitive information.

OFFICIAL SOURCES

Verify against official sources

Technical, compatibility, and model information reviewed: August 2026

LEARNING RECORD

Have you reviewed the text, decision activities, and all explanations?

Completion status is stored only in this browser.