AI & Machine Learning

Agentic Workflows: An Architecture, Not a Demo


Share

Agentic workflow architecture: an AI model acts within action limits, policy checks, human approval and execution controls.

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:

  1. Can you list every action the system may take? If not, narrow the scope until you can.
  2. Can code check the condition that picks each next action? Where it can, keep that branch in code.
  3. Can a reviewer judge one proposal on its own evidence? Those are the steps where the model earns its place.
Comparison of plain workflows, agentic workflows and open-ended AI agents based on how they select actions.
A plain workflow lets code pick each step. An agentic workflow lets the model choose from a fixed set, and an open-ended agent finds its actions at run time.

How a plain workflow, an agentic workflow and an open-ended AI agent compare:

PropertyPlain workflowAgentic workflowOpen-ended agent
Who picks the next stepCodeModel, from a fixed setModel, from an open set
Action spaceOne fixed listA fixed list per stateFound at run time
Typical failureBrittle rules on messy inputWrong choice from a valid listActions nobody expected
TraceStep logProposal, policy verdict and approval per stepLong reasoning transcript
Fit for auditable systemsStrongStrong, with a harnessWeak 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.
Agentic workflow harness with four controls: allowed actions, policy check, budget ceiling and an off switch.
Four controls keep an agent bounded: an allowed-action list per state, a policy check outside the model, a budget ceiling and an off switch.
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?
Comparison of end-of-workflow human review and human approval checkpoints placed at agentic workflow state transitions.
Review at decision points lets a person approve one proposed action with its evidence, instead of investigating a finished run.

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:

  1. 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.
  2. 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 classExampleRetry ruleUndo path
Read-onlyFetch a caseRetry freelyNone needed
Write that is safe to repeatSet case statusRetry with the same keyReverse update
Write that is not safe to repeatAdd an analyst noteCheck the trace, then retryCorrecting entry
External and irreversibleSubmit a filingNever auto-retryNone: 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.

Ask an AI about this article

Turn this article into your own next step

Pick a question, then the assistant you use. It opens in a new tab with this article as its source.

The question it opens withRead https://digiwagon.com/blogs/agentic-workflow-architecture and turn its key points into questions I should ask my own team, one per point. Stick to what the article says.

The question it opens withRead https://digiwagon.com/blogs/agentic-workflow-architecture and explain its argument in plain language for a CFO, with the one decision it asks a business to make. Stick to what the article says.

The question it opens withRead https://digiwagon.com/blogs/agentic-workflow-architecture and tell me what it means for a mid-size company, what to do first and what to avoid. Stick to what the article says and mark anything you are not sure about.

FAQ

Questions we get asked.

What are the most common mistakes when building an agentic workflow?
The most common agentic workflow mistake is running every tool under one shared service account, so the agent inherits permissions no single step needs. Next come scoring only final outputs instead of each proposal, and policy rules with no named owner, so thresholds drift with no change record. Teams also treat the demo’s happy path as the specification.
How do you test an agentic workflow before it goes live?
Test at three levels. First, force a failure after each side effect and confirm the undo restores a consistent state. Second, replay production traces through any new model or prompt version and compare proposals, not prose. Third, run in shadow mode: the workflow proposes on live cases while people decide. Promote an action class once its agreement rate holds steady.
Can an existing RPA or BPM process become an agentic workflow?
Usually, and step by step: keep the existing BPM engine or RPA orchestrator in charge of state and sequencing. Add model calls only at decision points where traditional automation keeps breaking on unstructured input, such as free-text documents or email. Replacing a working process engine with an agent loop throws away proven sequencing and audit history for little gain.
What happens when an agentic workflow waits a long time for human approval?
Durable state management lets the run save state and release compute while it waits, then resume from the checkpoint. On resume, run the policy check again. Thresholds, entitlements or the case may have changed since the proposal, and an approval on stale evidence should not execute. Give every pending approval an expiry, so abandoned proposals close instead of running later.