A workflow whose branches you can list at design time belongs in Flow or Apex, not in an Agentforce agent. Agent sprawl happens when teams move fixed steps to agents because the newer tool feels like the better choice. It raises cost and latency and makes results harder to audit. Keep fixed paths deterministic and reserve agents for judgment.
Why a fixed path belongs in Flow or Apex
Many requests that arrive as “add an agent” are really requests to move a known sequence of steps to a new tool. When the inputs are structured record fields, the outcomes are predictable, and the branches can be written down before the process runs, Flow or Apex is the better home. Those tools return the same result for the same input, expose logic that administrators and developers can read and test, and record-triggered flows and Apex triggers run inside the transaction that caused them. Teams mapping which of their processes fit this pattern can start with the Salesforce automation workflows guidance.
An agent adds reasoning, and reasoning has a price. It responds more slowly than a record-triggered flow, it uses more resources on each run, and its decisions are harder to reconstruct when someone asks why a record changed. None of that buys anything on a path that did not need judgment.
What agent sprawl costs a business
Sprawl builds up when several teams each add an agent to a process that already worked. Over a year you can end up with overlapping agents that touch the same objects, each with its own instructions, and no clear answer to which one acted on a given record. The cost shows up in three places.
- Cost per run. Each reasoning call adds cost for work that a deterministic step does without one. Across high-volume processes, that spend grows without a matching gain.
- Latency. Synchronous work that a flow finishes inside the save is slowed by an agent round trip, and users notice the delay on the screen.
- Reviewability. When an auditor asks why a field changed, a flow’s logic can be read directly. An agent’s reasoning needs someone who knows how to interpret it.
The less visible cost is attention. Each extra agent is one more thing to monitor, retest when fields change and retire when the process changes. Processes that collect several agents often turn out to be the ones where the upkeep is heaviest, even though a flow could have handled the work from the start. Ongoing review of this kind usually sits within Salesforce support and maintenance work.
A design-time test for each step
Before you assign a step to an agent, write it out on paper. List the inputs, the branches and the outputs. If the list can be finished without guessing, the step is deterministic. If the list keeps growing with phrases such as “it depends on how the customer worded the email,” the step contains a judgment component, and that component alone should go to an agent.
Questions to ask about inputs
Structured fields such as picklist values, lookup relationships and numeric amounts suit traditional automation. Unstructured inputs such as email bodies, chat transcripts, call notes and attached documents point toward an agent, because a rule-based branch can fail when an input arrives in a shape nobody planned for.
Questions to ask about failure
Ask what should happen when an input is unexpected. A flow that meets an unknown value typically routes to a fault path or stops, which is often the right result for a financial or compliance step. An agent can ask a clarifying question or choose an alternate action, which helps with support triage and hurts in a step that must not improvise.
Questions to ask about reversibility
If an action cannot be undone, such as sending a payment or filing a regulatory submission, place a human approval gate in front of it, whichever tool performs the work. Apex offers savepoints and rollbacks for database work. An agent action that has already called another system may not give you the same control over the outcome.
How the split looks in a service process
Take a case-handling process. Routing a case by priority, queue and product area is a fixed set of rules, so it belongs in a flow. Reading a forty-message thread to summarize what the customer is asking for is a judgment task, so it suits an agent. Setting the case owner and escalation timer happens after the summary, and those updates should stay in the deterministic layer where they can be tested and traced.
Seen this way, the agent is one component in an otherwise predictable process. In practice the split shows up when a routing rule changes: the flow is edited and tested while the summarizing step stays untouched. The reverse holds as well, since a revised summary prompt does not require reopening the queue logic.
Keeping the agent to the one step that needs judgment
When a process is mostly fixed but one step needs reading, keep the process in a flow or an Apex class and call the agent from that single point. The surrounding logic stays predictable, record updates stay inside the transaction, and the agent is responsible for one decision with a defined output. This shape tends to survive review, because each part can be tested on its own.
Give the agent a narrow output contract. Ask it for a category, a score or a short structured summary that a flow can branch on, rather than free text that later steps must parse. Record the input it received and the output it returned, so the decision can be traced if the record is questioned later.
Test the combined process at realistic volume before release. A single-record test rarely reaches the same Apex governor limits as a bulk load or an asynchronous run, so the path you checked by hand can behave differently in production. Start with the smallest orchestration that meets the goal, and add steps only after real use shows a gap.
For help planning this work, see Salesforce implementation.
Checks before you add an agent to an existing process
Before you approve a new agent, check whether an existing agent already covers the same object and intent. Overlap is the first sign of sprawl. Next, check how long the current automation has run without problems. A working flow should not be replaced without a clear reason, so the burden of proof sits with the change.
Document which team owns the agent, what data it may change and how it will be retired. Ownership written down at the start makes it much easier to clean up later, when the business question that prompted the agent has moved on.
Review the decision with the people who will answer for its results. Compliance staff, service leads and the administrators who will maintain the process often see problems that a design review misses. One example is a field that users fill in inconsistently, which an agent would then misread with confidence.
If you are unsure where the line falls in your processes, a short discovery exercise is faster than a rebuild. The discovery phase can map each step, its inputs and its failure paths, then sort the steps into fixed and judgment work. The sorted map is what a roadmap should be built on, and it is covered in Salesforce strategy and roadmap development and the needs assessment that comes before it.
Questions about agent sprawl and fixed-path automation
How do I tell whether a step is deterministic enough for Flow?
Write out each input the step can receive and each branch it can take. If each combination resolves to a known output without interpretation, Flow or Apex fits. If a combination depends on understanding free text, that combination is a candidate for an agent.
Can an agent call a flow or an Apex class?
Check the agent setup on your own instance to see whether it offers that option before you design around it, and record the result in the process documentation.
What should I do with an agent in a process that already works?
Leave it running until you have evidence that it adds value or causes harm. Compare its results with the deterministic version over a fixed period, and move the work if the comparison shows a clear gain or a clear risk reduction.
Does adding an agent make a process harder to audit?
It can. A flow’s logic is laid out in Flow Builder, so administrators can read its branches without running it. An agent’s reasoning requires more interpretation, so regulated processes usually need a clear log of inputs and outputs and a human approval point for consequential actions.
How many agents is too many for one object?
There is no fixed number. The warning sign is two or more agents acting on the same records with overlapping goals and no owner who can say which one should act. Count by overlap and ownership, not by total.