Skip to content
Agent Field Notes
Course contentsExpand a topic to choose a lesson.

SYSTEMATIC LEARNING / FOUR-LEVEL COURSE

Separate natural-language requests from transaction state

Examine intent understanding, business rules, authorization and traceable execution.

Learning objectives: Models explain appeals and policies, and controlled business facts are required for qualifications, amounts, and transaction completion. Commitment text, generated reply, and real money effects must remain distinct.

Content checked: 2026-10-03 · Each level has independent explanations, tasks and inspections

Choose a starting point based on your familiarity with this topic. Current level: Foundation · Understand the concepts. After completing the task, continue to the next level. Reading and self-checks alone do not establish mastery.

On this level

Review the prerequisites

Suitable for: Backend developers learning Agent applications.

Separate natural-language requests from transaction state
Models explain appeals and policies, and controlled business facts are required for qualifications, amounts, and transaction completion. Commitment text, generated reply, and real money effects must remain distinct.

How does the mechanism work?

Step-by-step explanation
  1. The user said that customer service promised a refund last time. Do you believe it?

    A model interprets user statements; explain when those statements can become facts that justify execution.

  2. What should I do if the policy document is inconsistent with the rule service?

    Conflicts between policy explanations and executable rules can affect eligibility decisions.

  3. What content should be passed during manual takeover?

    After pausing automation, retain state that allows the process to continue.

Foundation · Understand the concepts

Understand the principle · Separate natural-language requests from transaction state

Objectives of this level: Read identity, eligibility and effect state as separate business facts.

Visual guide · Ledger state changes the next step

Ledger state changes the next step

These are fictional refund-planning states, not executed payments. Current tenant and ownership checks precede ledger decisions; a receipt is not settlement. Select the figure to open it at full size.

Same after-sales project

The same after-sales Agent receives a refund request. The model may propose an action, but the trusted principal, current order, merchant rule, approval and ledger decide whether it is permitted. A refund request/receipt is distinct from money arriving; Stripe’s refund lifecycle illustrates why an API acknowledgement is insufficient. These integer-cent fixtures do not contact a payment provider.

The existing capstone main-return creates a return application; it does not execute a refund. These manifests are independent fictional extensions or policy/evidence/counting exercises. They do not add real refunds, publication, model calls or Java execution to the capstone runtime.

Read complete fixtures

auto-boundary

{
  "principal": {
    "tenant": "t1",
    "user": "u1"
  },
  "order": {
    "tenant": "t1",
    "owner": "u1",
    "state": "paid",
    "amount": 300
  },
  "rule": {
    "eligible": true,
    "max_auto": 300
  },
  "ledger": {
    "status": "none",
    "operation_key": "refund-42"
  },
  "amount": 300,
  "operation_key": "refund-42",
  "now": 100,
  "approval": null
}

Expected

{
  "expected": {
    "action": "refund",
    "reason": "eligible_authorized",
    "operation_key": "refund-42"
  },
  "error": null
}

unknown-effect

{
  "principal": {
    "tenant": "t1",
    "user": "u1"
  },
  "order": {
    "tenant": "t1",
    "owner": "u1",
    "state": "paid",
    "amount": 300
  },
  "rule": {
    "eligible": true,
    "max_auto": 300
  },
  "ledger": {
    "status": "unknown",
    "operation_key": "refund-42"
  },
  "amount": 300,
  "operation_key": "refund-42",
  "now": 100,
  "approval": null
}

Expected

{
  "expected": {
    "action": "reconcile",
    "reason": "unknown_effect",
    "operation_key": "refund-42"
  },
  "error": null
}

owner-mismatch

{
  "principal": {
    "tenant": "t1",
    "user": "u1"
  },
  "order": {
    "tenant": "t1",
    "owner": "u2",
    "state": "paid",
    "amount": 300
  },
  "rule": {
    "eligible": true,
    "max_auto": 300
  },
  "ledger": {
    "status": "none",
    "operation_key": "refund-42"
  },
  "amount": 300,
  "operation_key": "refund-42",
  "now": 100,
  "approval": null
}

Expected

{
  "expected": {
    "action": "deny",
    "reason": "identity",
    "operation_key": "refund-42"
  },
  "error": null
}

Reason before coding

At amount 300 and max_auto 300 the next action is refund. With an unknown ledger the next action is reconcile, even if the business rule still permits refund. A mismatched owner is denied before consulting action history.

Write your predicted decision, evidence used and evidence still absent for each sample before running anything. Match the complete protocol in the implementation track; the examples alone are not the entire contract.

Responsibility boundary

Four tracks are learning methods, not job levels. Junior candidates own bounded code and a counterexample; intermediate candidates own integration/recovery and changed-business evidence; senior candidates add architecture, isolation/migration/incident ownership and one specialty. Real API and JD-required production experience stay separate evidence gates. A fixed local pass is not a learner mastery or hiring certificate.

code example

Read the visible decision evidence

At amount 300 and max_auto 300 the next action is refund. With an unknown ledger the next action is reconcile, even if the business rule still permits refund. A mismatched owner is denied before consulting action history.

Before running, name one fixture assumption you would need to replace with trusted service evidence.

Acceptance task for this level

Before execution, annotate the three visible fixtures with decision, gate order, known fact and missing evidence; then compare your predictions with the supplied expectations. Contract: decide_service_action(payload).

Acceptance self-checks

Reading this browser’s record…

Hide the answer and check your understanding

Can eligible=true prove the current user owns the order?

Further explanations and practice

When encountering unfamiliar principles, first read the implementation, continuous questioning and migration cases, and then independently explain the premise and boundaries. Answers and notes are saved to the original account record.

All linked explanations and exercises (1 )

Sources and verification scope

The principles are based on public information; the numbers, cases and tasks are the teaching design of this website. Offline experiments verify the range noted on this page, and the learning effect still needs to be judged through independent tasks and feedback.