Workflow or Agent: The Short Version
- Most AI workflows sold as agentic should be plain workflows; the test is whether every possible action can be listed.
- Give the model autonomy only at steps whose next move depends on content nobody can predict.
- Bounding lives in code: a per-state action list and a policy check outside the model, never the prompt.
- Put human-in-the-loop checkpoints on state transitions, not at the end, so reviewers approve steps instead of finished answers.
- Every step with a side effect needs a retry-safe key and an undo action, or a human checkpoint.
What Is an Agentic Workflow?
An agentic workflow is a multi-step process in which a language model picks the next action from a fixed set. Ordinary code owns state, permissions and side effects, so the model proposes and the harness decides what runs. Built this way, every run leaves a replayable trace of states, proposals and approvals.
Why Do So Many Agentic Projects Stall Before Production?
Gartner predicted in June 2025 that over 40% of agentic AI projects will be canceled by the end of 2027. It named rising costs, unclear business value and weak risk controls as the causes.
The same release estimated that only about 130 of the thousands of vendors selling agentic AI are real; Gartner calls the rest agent washing.
A demo shows a model choosing tools on a happy path. Production needs what the demo skipped: who may do what, what happens when step four fails after step three wrote to a ledger, and how anyone rebuilds the run later. That layer belongs to the orchestration tier of a six-layer enterprise AI architecture.
Does Your Use Case Need an Agentic Workflow at All?
Most processes sold as agentic are better built as workflows with model calls inside them. Anthropic's engineering team drew the line in Building effective agents (December 2024): workflows run models through predefined code paths, while agents let the model direct its own process and tool use.
The action list test
List every action the system could take at every step. If the list is finite and code can check the condition that picks each action, you have a workflow. A model can still classify, extract or draft inside a step.
If the list is finite but the deciding condition sits in natural language, such as an adverse media article or a customer email, you have an agentic workflow. Only when the action list itself cannot be written out do you have an open-ended AI agent, and few regulated processes qualify.
Three questions settle it:
- Can you list every action the system may take? If not, narrow the scope until you can.
- Can code check the condition that picks each next action? Where it can, keep that branch in code.
- Can a reviewer judge one proposal on its own evidence? Those are the steps where the model earns its place.
How a plain workflow, an agentic workflow and an open-ended AI agent compare:
| Property | Plain workflow | Agentic workflow | Open-ended agent |
|---|---|---|---|
| Who picks the next step | Code | Model, from a fixed set | Model, from an open set |
| Action space | One fixed list | A fixed list per state | Found at run time |
| Typical failure | Brittle rules on messy input | Wrong choice from a valid list | Actions nobody expected |
| Trace | Step log | Proposal, policy verdict and approval per step | Long reasoning transcript |
| Fit for auditable systems | Strong | Strong, with a harness | Weak without heavy containment |
These are design patterns, not framework features, so no AI agent framework changes the outcome of this test. Multi-agent systems, with several agents coordinating, multiply every question below. Architecting SaaS platforms for multi-agent orchestration covers the platform side.
What Does Bounding an Agent Actually Look Like in Code?
A prompt that says "never approve a payment above the limit" is a request. The model can ignore it under prompt injection or an odd input, so prompt engineering alone cannot bound AI agents.
The OWASP Top 10 for LLM Applications 2025 lists this risk as LLM06, Excessive Agency, and recommends enforcing authorization in downstream systems, outside the model.
The harness holds four core components:
- An action list per state: each state exposes a short, typed list of allowed actions, and the harness rejects anything else before it reaches a tool.
- A policy check outside the model: versioned rules (thresholds, entitlements, data scope) vet every proposal before it runs.
- A budget ceiling: limits on steps, tokens and time stop the run.
- An off switch: the MANAGE function of NIST AI RMF 1.0 (January 2023) calls for ways to supersede, disengage or deactivate AI systems whose results drift from intended use. In a harness, that is a stop state any run can be forced into.
ALLOWED_ACTIONS = {
"triage": {"fetch_case", "score_match", "propose_disposition"},
"review": {"request_documents", "propose_escalation"},
"escalate": {"draft_case_summary"},
}
def execute(run, proposal):
if proposal.action not in ALLOWED_ACTIONS[run.state]:
return run.reject(proposal, reason="action_not_permitted_in_state")
verdict = policy.evaluate(run.state, proposal) # rules engine, never the model
if verdict.requires_human:
return run.checkpoint(proposal, verdict) # blocks until approved
return tools.call(proposal, idempotency_key=proposal.key)
The model sees only the actions its current state allows, which also shrinks the prompt and the attack surface. Preventing autonomous AI threats in FinTech covers the threat side: agents that hold cloud credentials.
Teams scoping a bounded agent for a regulated process can see how agentic AI development services cover harness design through production rollout.
Where Should the Human Checkpoint Sit?
Most early designs put the human in the loop at the end: the agent finishes, and a reviewer must retrace every step to find where it went wrong.
Checkpoints on state transitions
Keep the human in the loop, but move the checkpoints onto transitions. The reviewer sees one proposal (move this alert from review to escalate), the evidence behind it and the policy verdict. Approving one step is a small judgment; untangling a finished wrong answer is an investigation.
Not every transition needs a human, so sort each one by two questions:
- Reversibility: can an undo action fully reverse it?
- External reach: does it leave the system, as a filing, a payment or a customer message does?
Reversible internal transitions move ahead under policy. When the firm's policy requires sign-off before anything leaves the institution, the architectural response is a blocking human approval step on every irreversible or external transition, enforced by the harness.
ISO/IEC 42001:2023 requires documented processes for the responsible use of AI systems (Annex A, A.9.2). Human oversight belongs in those processes, so the checkpoint must be a documented, testable part of the system. In RegTech platform engineering, alert handling and fraud detection reviews are the usual candidates: high volume, evidence a model can summarise, and a clear point where a person owns the decision.
A checkpoint works only if the reviewer adds information. If reviewers never override an action class, let policy approve that class, or change what reviewers see.
How Do You Retry a Step That Already Changed Something?
A model call that times out can simply run again. A tool call that timed out after the payment API accepted the transfer cannot, unless the harness knows what happened.
Two rules do most of the work:
- Retry the action, never the reasoning: store the approved proposal and replay that exact payload. Asking the model again may return a different action, which turns a retry into a new, unapproved decision.
- Declare side effects up front: each action states its side-effect class, idempotency key, undo action and timeout before it can run. The idempotency key is a unique ID that lets the receiving system ignore a duplicate.
| Side-effect class | Example | Retry rule | Undo path |
|---|---|---|---|
| Read-only | Fetch a case | Retry freely | None needed |
| Write that is safe to repeat | Set case status | Retry with the same key | Reverse update |
| Write that is not safe to repeat | Add an analyst note | Check the trace, then retry | Correcting entry |
| External and irreversible | Submit a filing | Never auto-retry | None: put it behind a checkpoint |
This is the saga pattern from Hector Garcia-Molina and Kenneth Salem's 1987 paper on sagas: when a long-running process fails part-way, compensating transactions undo the partial work. In an agentic workflow, the undo step follows what actually ran, as recorded in the trace, never what the model would propose now.
What Does an Auditor Need From the Trace?
Audit questions arrive long after the run, and they are rarely about the model. They ask what the system knew, what it proposed, which rule allowed it and who signed off. An audit trail that cannot replay the run is only a log.
Record one append-only entry per transition, with:
- the state before and after
- the proposed action and a hash of its arguments
- the context, model and prompt versions behind it
- the policy version and its verdict
- the approver and time, if a checkpoint fired
- the result, and any undo that ran
ISO/IEC 42001 makes event logging its own control (A.6.2.8); these fields let those logs answer an examiner. Keep the trace in a store the model cannot write to. Decision traces in a governed agent harness cover the wider controls around it.
Lessons from Compliance Decision Automation
The closest shipped work behind this post is the AI-powered AML screening platform DigiWagon built for a FinTech provider of AML compliance solutions: AI-enhanced name matching, alert generation, workflow-based escalation and case management, on React, Node.js and PostgreSQL running on AWS. Its AI-assisted steps propose; rules and analysts decide. Two calls from that build carry over directly.
We bounded the action space with an explicit harness over prompt constraints, because an instruction a model may skip cannot carry a compliance control. Each case state exposes a short list of allowed actions, and the service layer rejects anything else before it runs.
We placed analyst checkpoints at state transitions over a single review at the end, because approving one step with its evidence costs less than unpicking a finished wrong answer.
Decision lineage sits in PostgreSQL, chosen over a document store because reconstruction queries join cases, versions and approvals, and foreign-key constraints keep those joins trustworthy. For a general agentic workflow, the action list grows; the shape of the harness stays the same.
Scoping a Bounded Agent with DigiWagon
DigiWagon builds agentic workflows for regulated processes within its AI and machine learning engineering practice, and the harness comes first. Engagements start with the action list test.
- Agent-versus-workflow call for each process step
- Action lists, policy checks and budget ceilings
- Transition checkpoints with evidence-ready review screens
- Retry-safe execution, undo paths and replayable traces
The Interesting Engineering Is in the Harness
An agentic workflow is a design decision with a test attached. If you can list every action, build the workflow and let the model judge only where the next step depends on unstructured content. Build the harness first, and the agent becomes a replaceable part of a system that already knows how to stop, retry and explain itself.



