How I run discovery for agent building

· 4 min read

In my forward deployed work, I spent the first weeks of every engagement working like a solution architect embedded with the customer's teams. Before we talked about agents, I wanted to understand how the work actually happened, which workflows were worth automating, and what a good outcome looked like to the people who owned them.

I followed the same loop with 35+ customers across banking, credit unions, legal services and a utility. It gave each customer a clear picture of what they were getting and why. It also gave the engineering team a map to come back to whenever something needed a closer look. Here is that loop, step by step.

5 to 7 processes per workshop,ranked into a short listOn site or remote calls, oneprocess at a time: notes, screensHappy path plus exceptionbranches and human reviewVolume x handling time, reviewedby the executive sponsorHighest volume, clearest rulesfirst; SOW signed before buildOne phase at a time, wideningautonomy as results hold upnextphaseIdea workshopShadow the ownerMap the workflowBaseline and ROIPhase planBuild, eval, deploy

The discovery loop I followed on each engagement. Each new phase goes back through shadowing before the next subagent is built.

1. Idea workshops with the business

I start with a short series of idea workshops. In the room are the business owners and team leads, business analysts, and IT, who govern how data flows between systems. Each workshop usually surfaces 5 to 7 processes the teams would like help with, in their own words, along with a rough sense of volume and effort. Nothing gets ruled out in the room. Afterwards, we narrow the long list to a ranked short list.

2. Shadowing the workflow live

Shadowing happens one process at a time, usually on site sitting alongside the team, or over several remote calls. For the process at the top of the short list, I sit with the business owner, or the person they point me to, and watch real work move through real screens. I take notes and screenshots wherever they help: each system they open, each rule they apply, and each moment they say "this one is different." Those notes become the workflow, and those moments become its exception branches.

3. Mapping the workflow, exceptions included

From the shadowing sessions I draw the workflow. The happy path is only part of it. Every exception gets its own branch, and every branch ends in one of three places: a subagent handles it, it goes to a human-in-the-loop queue, or it falls back to manual review.

Writing this down early gives the customer a clear view of how each case will be handled. Later, it becomes the routing logic the orchestrator follows.

def route(item, policy):
    """Where one item goes. The orchestrator calls this for every item."""
    if not item.passes_validation:
        return "exception queue"      # fix the data, then retry
    if item.amount > policy["auto_limit"]:
        return "human-in-the-loop"    # a person approves
    if item.confidence < policy["min_confidence"]:
        return "manual review"
    return "subagent"                 # handled end to end

4. Baseline and ROI before the build

Before we build anything, I measure two things for each workflow: how many items there are, and how long a person takes to handle one. That gives today's annual cost. With an estimate of how much the first phase can take on, I put together an approximate ROI report, which goes to the executive sponsor.

def roi_estimate(items_per_month, minutes_per_item, hourly_cost,
                 automation_share, build_cost, yearly_run_cost):
    yearly_cost_today = items_per_month * 12 * minutes_per_item / 60 * hourly_cost
    yearly_savings = yearly_cost_today * automation_share - yearly_run_cost
    payback_months = build_cost / (yearly_savings / 12)
    return round(yearly_savings), round(payback_months, 1)

# Example inputs only
print(roi_estimate(4000, 6, 45, 0.70, 60_000, 20_000))   # (131200, 5.5)

The estimate is rough on purpose. Its job is to support a clear go or no-go. A go is the sponsor's sign-off on the SOW, and building the agents starts only after that. The same baseline is what the evals and reports measure against after go-live.

5. A phase plan of subagents

Large workflows rarely ship as one agent. I break them into subagents and recommend an order. The first subagent is usually the step with the highest volume and the clearest rules, so phase 1 shows results quickly. Then come the steps with more exceptions, and later the ones that lean on judgment. An orchestrator coordinates the subagents, so each one stays small, easy to test and easy to evaluate. Each phase goes live, earns trust through evals and results, and then gets more autonomy.

From the field

Other ways teams approach this

Every company runs discovery differently, and there's no single right answer. Some teams start from process mining or task mining tools that rebuild workflows from system logs, which is a quick way to size volume. Others run longer design sprints before any build. In regulated industries, discovery often doubles as early risk documentation, so a workflow map with clear human review branches tends to help both the business and its reviewers.

A checklist for your next engagement

  1. Run idea workshops with business owners, team leads, business analysts and IT, then rank the long list.
  2. Shadow the business owner on live work, on site or over remote calls, one process at a time.
  3. Map the happy path and every exception branch, and decide where each one ends.
  4. Measure volume and handling time, and get the sponsor's sign-off on the ROI estimate and SOW before building.
  5. Start the phase plan with the highest-volume, clearest-rules subagent, and decide how the orchestrator routes between subagents.

All field notes