All posts

Software Is Learning to Choose the Next Step

From fixed workflows to agentic loops, explained through one late delivery.

A straight path of stepping stones becomes a green feedback loop connecting a map, a parcel, and a checked result, while a person adjusts the route.
From a predefined path to a route that can adapt.

You ordered a birthday gift. The tracking page says “delayed.” The birthday is tomorrow. You ask the store: “Can you help me get this here in time?”

One product shows you a shipping update. Another could investigate, find a pickup option, ask for your approval, and confirm a reservation. The difference is who decides what happens next.

1. A path or a goal

A conventional workflow follows decision rules written by developers. An agentic workflow lets a model choose some of the next steps, using the customer's goal and the information it discovers.

A fixed path stops at a closed gate while a small moss-green agent consults a map and chooses an alternative route to a gift.
A fixed path describes the steps. A goal gives the agent a destination to work toward.

Predefined workflow

The developer chooses the branches.

  1. Look up the order
  2. Check shipping status
  3. Apply the matching rule

If lateShow delay notice

If on timeShow tracking

Agentic workflow

The model chooses within allowed actions.

  1. Understand the deadline
  2. Check delivery options
  3. Adapt to what turns up

One routeOffer local pickup

Another routeAsk about a substitute

Illustrative routes through the same support problem. Either approach can use the same order, inventory, and reservation services.

Traditional software can already branch, retry, and loop. What changes is that the model can interpret “in time” and decide which capability would help next. Developers still build the tools and define their limits. Anthropic describes this distinction between workflows and agents.

2. Inside the agent's loop

The agent checks the carrier: arrival is now two days away. It searches nearby stores instead. If the exact gift is unavailable, it asks whether another color would work. Each result informs the next step.

The agent stands inside a circular sequence connecting a delivery observation, route choice, pickup action, and checked result.
Observe → choose → act → check. New evidence feeds the next decision.

Goal A workable gift option before tomorrow afternoon.

  1. 01Observe“The shipment is late.”
  2. 02Choose“Check nearby stores.”
  3. 03ActCall the inventory tool.
  4. 04CheckIs a suitable gift available?

If more work is needed, feed the result back into Observe.

Stop when the goal is met, a time or retry limit is reached, or a person needs to take over.

Probabilistic means learned probability patterns help shape the model's output. Different runs can take different routes; variation is possible, not required. The probability of a response is also different from the probability that an action will succeed.

The ReAct research paper explored this interleaving of reasoning and actions. Tool results give the model fresh evidence for the next decision.

“Probabilistic programming” also has an established statistical meaning: specifying probability models and performing inference. This post concerns probabilistic control flow in AI applications.

3. Freedom needs boundaries

The agent can suggest a replacement. The surrounding software must enforce whether that replacement is allowed. Putting a rule in a prompt does not guarantee it will be followed.

The agent brings a proposed parcel handoff to a checkpoint where permission, policy, and confirmation are checked before a human receives it.
Judgment proposes the action. Explicit checks control its execution.
  1. ProposeAgent“Reserve this gift.”
  2. AuthorizeChecksCustomer consent + store policy.
  3. ExecuteServiceReserve only if stock remains.
  4. VerifyRecordRead the actual confirmation.
If a check fails, stop or return the failure to the agent. A confident message cannot stand in for a confirmed reservation.

Code still checks account access and calculates prices. Services can fail or return changing information, so the product must inspect their responses. Model-guided decisions sit inside a system of enforceable permissions, reliable operations, and useful handoffs.

4. Agents can delegate a goal

The lead agent might ask a specialist: “Find pickup options before tomorrow afternoon, within the customer's travel distance.” The specialist can choose its own search steps and return findings with evidence.

A lead agent delegates to an inventory specialist and a delivery specialist; evidence cards return to the lead to inform the next decision.
Give each specialist a bounded task. Bring its findings back into the main loop.
Lead agentResolve the late-gift problem

↓ Delegate a goal + context + constraints

Inventory agent

Check nearby pickup stock.

Returns: store, item, availability record.

Delivery agent

Check shipping alternatives.

Returns: options, estimates, carrier evidence.

↓ Return findings to the lead

Compare options and ask the customerThen continue through the permission checks.
Messages can contain both natural-language goals and structured data. Another agent's answer still needs checking.

In Anthropic's June 2025 account of Claude Research, a lead agent delegates research and combines specialist findings. More agents add cost and coordination work, so a simple lookup rarely needs a team.

5. Measure the result

One run might find a nearby store immediately. Another might check shipping first. Different paths can be valid, but each must satisfy the same requirements.

Test varied requests and repeated runs. Check actual records, unauthorized actions, cost, time, and escalation quality. A friendly answer alone does not establish success.

The route can adapt. The definition of a good result still needs to be clear.

Deterministic programming remains essential. The opportunity is to let software handle more of the work between a person's intention and a verified outcome. For the customer waiting on a gift, that means less navigating categories and more getting useful help.