Engineering Insights

Traditional workflows vs. agentic systems: where should the decision logic live?

A workflow encodes the path. An agent chooses a path. The useful design question is which decisions belong in each place.

A traditional workflow is a path you can draw. A request arrives, a rule sends it left or right, a service does the work, and the system records the result. The decision logic lives in code you can read, test, and diff.

An agentic system moves some of those decisions into a model. The model sees a goal, a set of tools, and the results so far, then chooses the next step. That is useful when the path depends on what the previous step returned. It is a liability when the path is already known.

Put stable decisions in code

Permissions, money movement, retries, and the question of which system is the source of truth should stay in ordinary software. These are policy. A model should not decide whether a refund is allowed. A function should, and the agent should call it.

Let the agent decide the investigation

The agent earns its place in the messy middle: which record to open, whether the customer's description matches the shipment, and when there is enough information to stop. Those choices are hard to draw as a flowchart because the next step depends on the text in front of it.

A practical boundary

DecisionLives in
Can this user take this action?Code
Which tool answers this question?The agent, from an allowlist
May this answer reach the customer?Code, after a person or a policy check

If you cannot write a test for a decision, think carefully before you bury it in a prompt. If you can write a test, it probably belongs in code the agent is allowed to call.