Skip to content
Agentic AI

intermediate · Interactive lab

Belief and State

An agent's working state is a model of the world, not the world. Three things have to stay apart: what it believes, what the system knows, and what actually happened — and only the second one is authoritative.

By the end: Tell a tool result from an inference and from a read that has gone stale, whatever the belief sounds like.

Your challenge

Start here. This lab opens with the agent acting at every step, which is the wrong starting point and how an agent behaves by default: its own picture of the world is the only picture it has. Two of these steps are fine to act on, two need a fresh read first, two need the effect confirmed afterwards, and one should not happen at all.

See it happen

Belief, source, and what acting would do

Belief: holds
Slowed down so you can follow
SOURCE|+⟩and a coin in a boxBENCHDETECTORZ BASISanswers 0 and 1TALLYTHE QUBITTHE COIN
The agent holds a belief. Where that belief came from decides what it is worth, the action decides what a mistake would cost, and the system is the only thing that can settle either.
  1. The agent → Where it came from
  2. Where it came from → The system
  3. Where it came from → What it changed
STEP 1 / 6

Three things that look the same

The agent holds a picture of the world. Where it came from is the only thing that separates a fact from a guess, and The system is the only place either can be settled.

Configure

Your decision at each step

At each step, decide what the agent should do with what it believes. Read where the belief came from and what acting would cost before you answer.

What should the agent do at this step?
Act on it
· The evidence is good enough for what this does.
Re-read first
· One call, and the picture is current again.
Act, then confirm
· Ask the system what happened before reporting it.
Do not act
· Nothing here supports a change to anything.
  1. B-901 — Add a note to an order read two seconds ago

    The simplest case, and worth having for comparison.

    The agent believes
    ORD-501 is unpaid
    Where that came from
    the system returned it, 2 s ago
    How fast it moves
    This changes about every 10 min
    Acting would
    add a note to the order · 1 record · reversible · the effect can be checked afterwards
  2. B-902 — Set the status of an order read forty minutes ago

    Payment status is not a stable field.

    The agent believes
    ORD-502 is unpaid
    Where that came from
    the system returned it, 40 min ago
    How fast it moves
    This changes about every 10 min
    Acting would
    set the order to awaiting payment · 1 record · recoverable · the effect can be checked afterwards
  3. B-903 — Refund a payment because the email sounded like a refund request

    A plausible reading of a sentence, with money attached to it.

    The agent believes
    The customer wants a refund
    Where that came from
    the agent worked it out
    How fast it moves
    This rarely changes at all
    Acting would
    refund the payment · 1 record · irreversible · the effect can be checked afterwards
  4. B-904 — Apply the address change the ticket asked for

    The evidence is good; the question is how the result gets reported.

    The agent believes
    The new address on the ticket is 12 Nehru Road
    Where that came from
    the system returned it, 30 s ago
    How fast it moves
    This rarely changes at all
    Acting would
    apply the address change · 1 record · recoverable · the effect can be checked afterwards
  5. B-905 — Tell the customer how many open tickets they have

    A count read three seconds ago, and nothing is being changed.

    The agent believes
    This customer has 12 open tickets
    Where that came from
    the system returned it, 3 s ago
    How fast it moves
    This changes about every 1 h
    Acting would
    answer the customer's question · 1 record · reversible · nothing to check afterwards
  6. B-906 — Send a confirmation to an address read fifteen minutes ago

    Addresses do not move, and an email cannot be unsent.

    The agent believes
    The customer's address is r.tadapaneni@example.com
    Where that came from
    the system returned it, 15 min ago
    How fast it moves
    This rarely changes at all
    Acting would
    send the confirmation email · 1 record · irreversible · nothing to check afterwards
  7. B-907 — Close the price-update job after a bulk call that returned

    Ten records, one call, and an answer that says what was accepted.

    The agent believes
    The bulk call accepted all ten price updates
    Where that came from
    the system returned it, 5 s ago
    How fast it moves
    This rarely changes at all
    Acting would
    close the price-update job · 10 records · recoverable · the effect can be checked afterwards

Where the belief came from, how old it is, how fast the record moves, and what acting would cost. All four decide it.

Learn more

Why this pattern exists

An agent carries a working picture of the world, and that picture is made of three very different things wearing the same clothes. Some of it came back from a tool call and is as good as the system's own record. Some of it came back from a tool call twenty minutes ago and describes a record that has moved since. And some of it the agent worked out — reasonably, plausibly, and with nothing behind it at all. Read as text they are indistinguishable: "the customer wants a refund" looks exactly like "ORD-501 is unpaid". The difference only shows when something acts on them. This lesson is seven steps, each one asking the same question in a different disguise: is this good enough to act on, does it need re-reading first, does the effect need confirming afterwards, or should nothing happen at all?

An agent works through a customer-service queue. Each step shows what it believes, where that belief came from and how old it is, how fast the underlying record moves, and what acting on it would do. What the system would say if it were asked now is not shown until after the decision.

  • Tell a tool result from an inference and from a read that has gone stale, whatever the belief sounds like.
  • Weigh the age of a read against how fast the record it describes actually moves.
  • Confirm an effect instead of reporting an intention, and know when re-reading is only latency.

The rule this lesson applies: Three sources, three different obligations. A fresh tool result is the system's own answer, and acting on it is ordinary engineering. A read has an age, and the age only matters against how fast the record moves: an address read fifteen minutes ago is still an address, while a payment status read twenty minutes ago is a guess. An inference is the agent's own conclusion — it may be right, it has no authority, and the moment it drives something with a side effect the system has been changed on the strength of a sentence nobody checked. There is a second half to this, which is what separates a careful agent from a slow one. Every re-read costs a call, and an agent that re-reads everything before every step is the one that exhausts the rate limit and takes four minutes to answer a question. Re-read what moves; act on what does not. And when a change has been made, the honest way to report it is to ask the system what happened rather than to describe what was attempted — especially after a call whose result never came back, where the agent's belief that "it was applied" is the least reliable thing in the system.