The short version

Use rules for decisions your business can specify and test. Add a narrow model step when messy inputs create a real queue of exceptions. Let an agent select its next action only when the work needs branching that is too variable for a fixed sequence and you can constrain its authority and cost.

Start with which decision is hard

Describe the task as a result the business can verify. For example, a maintenance request is ready when it has a matched property, a category and an owner. Ask which of those decisions still require judging free text or combining evidence. Required fields, account eligibility and routing tables usually belong in regular code when the inputs and business rules are explicit.

Anthropic distinguishes workflows, where code determines the path, from agents, where the model can direct tool use and choose steps. A workflow can still contain a model. If the only ambiguous task is extracting details from a message, one model call with a clearly defined output may be enough.

Make the comparison on the exceptions

Take a representative batch of live or historical requests under the same access controls. Tag routine cases, exceptions and cases that need human judgment. Compare how many reach a verified result, how many require correction, and how long people spend on those corrections. Run a simple rules implementation and a rules workflow with a narrow model step before comparing an agent.

For example, a facilities platform receives a request that says the rear entrance light stopped working. A model can extract the likely location and proposed category. The system can look up the property and use the existing routing table to assign a team. If the account has several buildings and the message cannot identify one, a bounded agent could query only that account’s building list and request clarification. A person handles unresolved cases.

Keep authority in the application

Run eligibility and permission checks before any consequential step. Validate the tool input and confirm that the destination record reflects the result. For example, an agent can recommend whether a request looks urgent while application policy determines who may change the priority and which criteria apply.

Define where the workflow stops, what it can retry and what to do when the outcome of an action is unclear. Use a stable task identifier to reconcile it. An open-ended retry loop can consume resources and repeat work when a slow response hides a successful write.

Require an improvement that fits a real budget

Set a ceiling for time, paid tool calls and model spend per request, plus an overall account or workflow limit. Keep review time and unresolved work in the comparison. An agent that handles rare cases well may still make the overall queue slower or more expensive if the extra work runs on every request.

Choose rules if they cover the agreed cases reliably. Choose one model step if interpretation is the remaining bottleneck. Move to an agent only after it improves the target result against the simpler baseline within the limits. Send excess or unresolved cases back through the existing queue with enough context to continue.

Common questions

Can rules-based automation include AI?

Yes. Application code can determine the sequence while a model classifies an input or drafts a response at a defined step. Code can validate the result and send exceptions to a person. An agent is useful when the model needs discretion to choose among authorized steps.

When is an AI agent worth the added cost?

Consider it when successful completion depends on gathering different evidence or using different tools case by case. Compare it with fixed rules and an AI-assisted workflow. Look for a measurable improvement that survives time, spend, quality and human-review limits.

Further reading

Want to explore what this means for your systems?

Explore the relevant service