
A support bot can read a ticket, check an order, and draft a useful reply while following a workflow you designed.
Adding an AI agent changes who chooses the next step. That decision affects cost, response time, testing, and how much control you retain over business actions.
Before choosing services, ask:
Which decisions should the application make, and which decisions benefit from a model choosing what to do next?
On AWS, you can build a defined workflow with AWS Step Functions, use Amazon Bedrock Agents for adaptive tool selection, or combine both. This article walks through those options using one support scenario.
A workflow can already use AI
In a workflow, the application defines the available paths and the conditions for moving between them. A workflow can branch, run tasks in parallel, call a language model, and escalate an exception.
In an agent, a model can select the next tool or action based on the goal and information gathered so far. Developers still define its available tools, permissions, and operating boundaries.
This distinction is about control flow. Both approaches can use AI. It is also how Anthropic distinguishes workflows and agents, and AWS discusses both approaches in its orchestration guidance.
One ticket, three possible designs
Consider this illustrative customer request:
“My order says delivered, but I never received it. I need it before Friday.”
A useful result requires more than a friendly reply. The system needs to check the right order, investigate the discrepancy, and offer a response that follows the company's policy.
The following designs are proposals to evaluate, rather than measured performance results.
Option 1 — A defined workflow
A Step Functions workflow could:
- Validate the authenticated customer's access to the order.
- Retrieve order details, delivery status, and the applicable support policy.
- Call a Bedrock model to classify the issue and draft a response.
- Validate the output and route the case to an approved response or human review.
Step Functions can invoke Bedrock models directly. You can also configure retries and error-handling paths for supported states.
This approach is attractive when the team can describe the process and its exceptions clearly. Developers can inspect which branch ran and change the rules deliberately.
Calling a model inside a defined workflow still requires output validation and evaluation. Predictable orchestration does not guarantee a correct generated answer.
Option 2 — An agent chooses the investigation steps
An agent could have approved tools for looking up orders, checking delivery evidence, retrieving policies, and reviewing earlier support interactions.
It might inspect delivery evidence first, discover a conflicting address, and then check whether the customer previously requested an address change. When information is missing, it could ask a follow-up question.
Amazon Bedrock Agents supports orchestration across configured actions and knowledge sources. The useful capability here is adapting the investigation to what the tools return.
That flexibility creates more behavior to evaluate. You need to check tool selection, arguments, repeated calls, stopping conditions, and the final response. Set enforceable limits on execution time and tool use in the application.
An agent is worth considering when useful investigation paths vary substantially between cases. Whether that flexibility improves outcomes needs testing.
Option 3 — A workflow contains a bounded agent
For this support example, my preferred starting design would be a hybrid:
- The application authenticates the customer and verifies order access.
- An agent investigates using approved tools that only read data.
- The agent returns structured findings and a proposed next action.
- Application code checks the proposal against authoritative records and business rules.
- The workflow obtains any required approval, performs the permitted action, and records the outcome.
This gives the model freedom to investigate while keeping business actions under explicit application control.
For Amazon Bedrock Agents, return control can hand proposed action details back to your application for execution. That gives your application a place to validate parameters and enforce authorization before calling a backend.
The model's recommendation is evidence to assess. The backend must enforce who can perform an action and under which conditions.
Use the decision that is causing difficulty
Choose a starting approach based on the part of the problem that actually varies:
Your situation | Starting approach to evaluate |
|---|---|
The required steps and exception paths are well understood | A defined workflow |
You need classification or drafting inside a known process | A workflow with model calls |
Each case needs a different sequence of investigation tools | An agent with bounded tool access |
Investigation varies, but changes to customer records must follow strict rules | A workflow containing an agent |
These are design heuristics. A workflow can become difficult to maintain if every unusual case needs another branch. An agent can become difficult to operate if its freedom is broader than the task requires.
Compare the same tickets under the same conditions
Build a representative test set before choosing. Include routine requests, missing order IDs, contradictory records, unavailable carrier APIs, duplicate requests, and attempts to access another customer's order.
Run every design against the same cases and tool responses. Keep the model version, knowledge sources, and permissions aligned where possible, and document intentional differences. Repeat model-based cases to reveal variation.
Define success before running the comparison:
Measure | What to record |
|---|---|
Correct outcome | Whether the result matches the expected resolution or escalation |
Business-rule compliance | Unauthorized access, unsupported promises, or disallowed actions |
Response time | Median and 95th-percentile time to an actionable result |
Execution cost | Model usage, tool calls, orchestration, compute, and logging |
Human workload | Escalations and time spent reviewing or correcting results |
AWS's guidance on evaluating agents likewise covers task quality, performance, responsibility, and cost.
Keep successful escalations separate from cases resolved automatically. Otherwise, a system that sends every difficult ticket to a person can appear deceptively successful.
A useful cost measure is:
AWS cost per correctly resolved case = total AWS cost of all attempts ÷ cases correctly resolved without human intervention
Include failed attempts and retries in the numerator. Report the automatic-resolution rate beside that figure, and track human handling costs separately. If no cases qualify, the ratio is undefined.
This makes the comparison about the outcome your application delivers.
Test the action boundary
Before connecting any design to a write operation, test what happens when an API succeeds but its response is lost.
A retry must not create a second refund or replacement order. AWS recommends idempotent task execution, including stable identifiers for the same logical operation and appropriate checks against duplicate effects.
Likewise, enforce customer access in backend code. A request to refund another person's order should fail regardless of how confidently a model recommends it.
These requirements apply to workflows and agents alike. Choosing a more structured orchestrator does not remove the need to design the action correctly.
Start with a defined process for the parts you understand. Introduce model-directed investigation where the evaluation shows a useful improvement. Keep measuring after changes to prompts, models, tools, or policies.
Have you replaced a workflow with an AI agent—or moved back to a workflow? What drove that decision?
Enjoyed reading this content? Let the author know!
Your likes, comments, shares, and saves help creators reach more builders.
Loading recommendations
Loading article