Skip to main content
AI strategyProduct engineeringAgentic operationsResponsible deploymentGlobal deliveryAI strategyProduct engineeringAgentic operationsResponsible deploymentGlobal deliveryAI strategyProduct engineeringAgentic operationsResponsible deploymentGlobal delivery
AIoverflow.tech
All posts
Workflow DesignAI AgentsAI Implementation

Map Workflow States and Handoffs Before Adding an AI Agent

AIoverflow5 min read
Map Workflow States and Handoffs Before Adding an AI Agent

Before adding an AI agent, map how work actually moves from its trigger to a verified outcome: who handles each step, what evidence they use, which system changes, and where exceptions go. Then identify the smallest part that needs model judgement. An AI agent—a model-based system that selects tools and next steps—should fill a demonstrated need in that map, not become the default owner of the whole process.

Reconstruct real cases, not the official procedure

Start with the people doing the work and a small selection of completed, delayed and abandoned cases. Walk through each case using its records, messages and timestamps. Ask what happened next, not just what was supposed to happen.

Draw a swimlane map: a process diagram with separate lanes for each person, team or system. Include unofficial spreadsheets, copied messages and waiting periods. These often reveal missing information or ownership that an agent would otherwise inherit.

Define the boundaries explicitly. A trigger might be a submitted request; completion might require a confirmed system update and a notification. “AI produced an answer” is rarely a sufficient end state.

For every step, record:

Map fieldQuestion to answer
Entry conditionWhat must already be true before this step starts?
Input and evidenceWhich records support the decision, and who maintains them?
Decision ownerWho resolves ambiguity or conflicting evidence?
Action and destinationWhat is read, proposed, sent or changed?
Exit conditionWhat observable evidence proves this step finished?
Exception routeWho receives a blocked case, with what context?

Measure active handling time separately from waiting time. If most delay comes from an unavailable decision-maker, faster text generation will not remove that bottleneck.

Mark rules, language tasks and genuine autonomy separately

Label each mapped step as a fixed rule, a language task, a human decision or a candidate for dynamic tool use.

A fixed rule, such as checking whether a required identifier exists, belongs in ordinary software. A language task, such as extracting a requested delivery date from a message, may need only one model call. Human decisions remain appropriate where authority or unresolved business policy is the issue.

Reserve agent behaviour for cases where the next lookup or action genuinely depends on intermediate findings. Microsoft’s orchestration guidance distinguishes direct model calls, single agents and multiagent systems, noting the additional coordination, delay and cost introduced by complexity. This supports choosing architecture after mapping dependencies, rather than assigning an agent to every box.

Also mark trust boundaries: points where data crosses between sources with different authority. A customer message can describe a request; it cannot authorize access to another customer’s account. Prompt injection is an attempt to make content processed by a model redirect its behaviour. OWASP’s guidance explains why filtering text or labelling it untrusted is insufficient: permissions and tool arguments must be checked outside the model.

On the map, show those checks as execution steps, not notes inside an AI prompt.

Worked example: mapping an order-change request

Illustrative example: A distributor wants an agent to handle customer requests to change delivery dates. Mapping the work reveals a narrower first implementation.

The trigger is a message in an authenticated customer portal. Completion means either a confirmed order change or a recorded refusal with an explanation—not simply a drafted reply.

StateProcessing and ownerRequired next-state evidence
ReceivedSoftware records the request and customer identityUnique request identifier
InterpretedModel extracts order reference and requested dateFields linked to supporting message text
CheckedSoftware verifies account ownership and reads order statusCurrent order record and eligibility result
Awaiting decisionOperations handles ambiguous dates or restricted changesRecorded clarification or decision
Ready to applySoftware rechecks status and submits an authorized changeUpdate confirmation
ClosedSoftware records the result and notifies the customerSaved outcome and notification status

For “move order 4821 to Friday,” the interpretation step must not silently choose a date when multiple readings are plausible. It routes the case to clarification. If the order is already dispatched, the eligibility rule sends it to operations rather than asking the model to invent an exception.

This map suggests a fixed workflow with one bounded model task, not necessarily an agent. If later cases require choosing among several approved logistics lookups, that specific investigation step becomes an agent candidate.

Draw the failure path before approving the design

Extend the example with a timeout after submitting the update. The request may have succeeded even though its confirmation was lost. Repeating it blindly is unsafe.

Add an “outcome unknown” state. Software checks the destination system using the request identifier before deciding whether to retry. If reconciliation fails, operations receives the original request, attempted action and last confirmed state. The customer is not told the change succeeded.

Also map duplicate submissions, unavailable records and changed order status. Each branch needs an owner, a response deadline and a safe restart point. A generic “manual review” box is incomplete unless someone owns the queue and knows how to resume work.

Test the map before testing the agent

Replay reviewed cases through the proposed map. Suggested acceptance criteria are:

  • Every case reaches a defined end state or an owned exception queue; none disappear between handoffs.
  • Every system-changing step has an authority check and observable confirmation.
  • Ambiguous dates and missing references route to clarification rather than guessed values.
  • Duplicate and timeout tests produce no duplicate business changes.
  • Handling time, waiting time, correction rate and cost per completed case are measured against the existing process, with targets agreed before implementation.

For the resulting scorecard, see measuring AI automation by verified business outcomes.

The deliverable is a reviewed map, decision table and exception list—not an agent diagram. AIoverflow’s workflow discovery covers users, systems, data and exceptions. If you need help turning that evidence into an implementation plan, contact AIoverflow.

Sources & further reading

Prepared with AI assistance using the sources above and AIoverflow’s service context. Examples are illustrative; validate implementation decisions against your own requirements. Suggest a correction.

Got a workflow that might fit AI?

We start with an honest discovery call — and tell you straight whether it's worth building.