Workflow automation
If Rules Can Solve It, Skip the AI First
Separate the steps explicit rules can handle from those that need semantic understanding, then choose between rules, code and AI models.
6 min read

In this article
The gap between a demo agent and a production AI agent is not only about model choice. It shows up in permissions, data handling, exception paths and how the thing is maintained. The 11 areas below are a starting point for a pre-launch review; the actual design depends on task risk and environment.
Without the necessary guardrails and observability, mistakes become harder to notice, harder to trace and harder to correct.
An agent should do one thing, and that one thing should fit in a single sentence.
Weak boundary: “handle our customer support” Strong boundary: “read incoming tickets, classify the intent, search the knowledge base, draft a reply, and hand it to a person for review”
An agent with a vague boundary shows two symptoms: it tries to do things you never authorised, and you cannot tell when it has finished.
Do not let the agent emit free-form natural language and then parse it.
Output must conform to an explicit schema. That buys three things: it can be validated in code, it can be routed automatically, and a malformed response can be retried instead of failing the whole run.
{
"intent": "billing_dispute",
"confidence": 0.87,
"summary": "Customer reports a duplicate charge",
"requires_human": true,
"retrieved_sources": ["kb-refund-policy-v3"]
}
confidence and requires_human are the two fields that matter most — they let the workflow decide for itself whether to escalate to a person.
An agent should hold only the permissions the current task requires, and credentials should never appear in the prompt.
In practice:
If the agent cites a knowledge base or documents, you have to be able to answer: which source produced this conclusion?
When sources cannot be traced, the team struggles to answer “why did the agent say that”, and cannot easily work out what needs re-verifying after the underlying documents change.
High-risk actions require human approval by default. Three questions decide which ones:
Any yes means an approval step. Low-risk, repetitive actions can run straight through.
The key is to scope the approvals sensibly. If every single item needs a signature, reviewers gradually stop paying attention. Define which cases need human approval by risk, amount, external impact or reversibility.
Every key action leaves a record:
timestamp · task id · trigger source · model and version used
· tools called and their parameters · output · whether a human edited it
· what the human changed · final result · cost · duration
With that record, an incident can be traced by time, task and tool call, instead of being reconstructed from memory.
Inference services go down. Rate limits trigger. Tools return errors nobody expected.
An agent needs a layered response:
The third layer is the floor. The workflow may slow down, but it must not break.
Before launch you need an evaluation set that covers normal cases and edge cases.
Without one, you cannot answer these three questions:
The evaluation set does not need to be large on day one, but it does need to cover common scenarios and the failure modes that matter. How many cases you need depends on task complexity, risk and how varied the data is — and the set should keep growing as real usage accumulates.
Without limits on retries and tool calls, cost can climb without bound, and the agent can loop indefinitely.
What to configure:
Monitor the latency distribution, not just the average — p95 is the line users actually feel.
People must be able to overturn the agent’s decision, and the override itself has to be recorded.
The human override rate is one of the most valuable quality signals you have:
Track that number as a product metric, not as a by-product of exception handling.
Treat the model as a replaceable component, not the foundation of the system.
In practice, that means keeping model calls behind a thin interface, with prompts and schemas independent of any vendor. When prices move, a better model appears, or a provider runs into a compliance problem, you can switch in days instead of rewriting the project.
We are not selling “the AI is clever”. We are selling an AI workflow that can be controlled, measured and maintained. Every item above turns that promise into something you can check.
Workflow automation
Separate the steps explicit rules can handle from those that need semantic understanding, then choose between rules, code and AI models.
6 min read
Workflow automation
Automation only makes a process faster; it never makes the process right. If upstream data is wrong, automation carries the error downstream sooner.
6 min read
Engineering practice
FDE is engineering that faces the business problem directly, with outcomes rather than a delivery checklist as the definition of done.
7 min read
Free 30-minute intro call
The intro call is free: we start by understanding how your workflows and systems run today, then agree whether working together is a fit. The full L0 audit is scoped and quoted separately.
1 個工作天內回覆