Collabwire
// BUILD SLOTS

How to Build AI Agents for Business Operations

By Alex Zmuda·3 Dec 2026·8 min read

Build an operational AI agent as a workflow with an owner, a state machine, one guarded model call per decision, a human override and an evidence trail. The model is the smallest part.

System summary

Field note answering how to build AI agents for business operations: pick one real workflow, give it an owner, build it as a state machine, place one guarded model call per decision, add a fast human override, keep an evidence trail and protect data before it reaches a model. Includes FAQ and examples from the BotCommander and SellerToys case studies.

To build an AI agent for business operations, start with one real workflow that already runs every week, give it a named human owner, and build it as a state machine with explicit steps, retries and a failure path. Put a language model only at the points where judgement is needed, behind a schema and a fallback. Add a human override that is faster than a restart, and record evidence of every action. The model is the smallest part of the system. The rest is operations engineering.

Most failed agent projects did the reverse. They started with the agent, found a workflow to hang on it later, and discovered in production that nobody owned the result.

Pick the workflow before you pick the model

The first decision is not a framework or a vendor. It is a workflow that is worth automating and that you can describe as it actually runs, not as the org chart claims it runs. Good candidates are boring: the same documents arriving every week, the same data copied between the same tools, the same person acting as the bottleneck because only they remember the rules.

Walk through the real sequence once with the person who does it. Write down the inputs, the decisions, the exceptions and the point where the work is considered done. You will find that most of it is mechanical. A smaller part, such as reading an unstructured document or choosing between ambiguous routes, needs judgement. That smaller part is where a model belongs. The mechanical part should be ordinary code, because ordinary code does not drift, hallucinate or send a different invoice on Tuesday.

This split is the central design decision, and it is made on paper before any model is called. Teams that skip it end up using a model to do arithmetic.

Make the work a state machine

An agent that runs operations has to survive a restart. That means every unit of work lives in a known state in a database: received, extracted, validated, waiting for a human, done, failed. The state does not live in a model's context window, where nobody can inspect it and a crash erases it.

Around the states sit the things that make a system operable. Retries with limits. A dead-letter path for work that cannot complete. Idempotency, so that running a step twice does not send two payments. When something breaks at night, the person on call needs to see which step failed, what went in and whether a retry is safe. A state machine answers that in seconds. A free-roaming agent loop answers it with a transcript to be read like a detective story. We make the longer argument in Autonomous Workflows, Not Agent Theatre.

Decide what is code and what is model

Inside each step, the rule is one model call per decision. The model gets a narrow question, such as classifying a document or extracting a field from unstructured text. Its answer is validated against a schema. If the answer is malformed or the confidence is low, the system falls back to a deterministic default or sends the case to a person.

The failure to avoid is a model that decides and acts in the same breath. A step where the model both chooses and executes has no gate between a suggestion and its consequence. That is not an assistant, it is an unsupervised operator with no audit trail.

A concrete case from our own delivery: the invoice specialist described in the BotCommander case study. It downloads invoices from KSeF, the Polish e-invoicing system, files them on Google Drive, checks that the set is complete, prepares a ZIP and a mail draft for the accountant, and runs on a daily schedule. The case study describes the discipline behind systems built this way: routine steps are code with explicit checks, and a model is used where judgement is needed. It records that the first build took about an hour and a quarter of bot time and the routine around it about an hour and three quarters. Those are numbers from that one build, not a promise for yours, but they show the shape: a narrow job with defined inputs and a defined end state.

Give every agent an owner and a way to be stopped

Every agent needs a person who is answerable for its output. Not a team, a person. That owner defines the scope and the permissions, reads the record when something looks wrong, and has authority to stop it.

Stopping must be cheap. A good override lets an operator inspect a stuck item, correct it and put it back into the flow at the right state without rerunning everything that already succeeded. A bad override is "kill the job and start over", which teaches the team never to intervene. Once intervening is expensive, people stop doing it, and the system drifts until it fails loudly.

Permissions deserve the same discipline as for any employee. An agent that files documents does not need access to payments. Scope is a security control and an accountability control at once.

Keep an evidence trail, and protect the data first

Operations run on records. An agent that acts without leaving a trace of what it saw, what it decided and why is useless the first time its output is questioned. Log the inputs, the checks that ran and their results, and the action taken, in a form a person can read without the agent's help.

Data protection belongs before the model, not after it. If personal data would reach a cloud model, strip or pseudonymise it first. In the same BotCommander case study, a privacy gateway pseudonymises personal names before anything reaches a cloud model, and it was verified on real data: 578 calls and no leaks. The principle matters more than the figure. Decide what the model may see, enforce it in code and verify it, rather than hoping a prompt keeps secrets.

Ship a thin version and let real traffic harden it

The first version should be small and observable, running on real input. A demo that handles the clean example and nothing else tells you very little. Real traffic brings the document that does not parse, the API that times out and the customer who sends the same file twice.

Measure it the way you would any operational system: queue depth per step, latency per step, failure rate, the size of the dead-letter queue, and the cost of model calls over time. Then harden, extend, and remove the manual scaffolding one piece at a time. SellerToys, our Digital Workforce platform, follows the same logic from the product side: specialised employees for defined roles such as invoices, documents and marketplace operations, built on deterministic business logic with AI reasoning added where it helps.

If you want this built rather than explained, the work sits under agentic AI systems and AI automation. The point of both is the same. An agent without an owner is an incident waiting for a date.

Frequently asked questions

What is the difference between an AI agent and workflow automation?

Workflow automation follows steps that were written in advance. An agent uses a model to decide what to do at some point in the process. In production the best systems combine them: a fixed workflow carries the work and a model makes judgement calls inside individual steps, with limits and a fallback around each call.

Do I need multiple agents or one?

Start with one agent for one workflow. Multiple agents add coordination, cost and failure modes, and are justified only when the work splits cleanly into independent roles. In our own delivery platform separate roles exist for building, reviewing and testing precisely so that the bot that builds never judges its own work.

Which framework should I use to build business agents?

The framework matters less than the design around it. Whatever you pick, the state, retries, permissions, override and evidence trail should live in your own system, so you can replace the model or the framework without rewriting the operations layer.

How do I keep sensitive data away from a cloud model?

Decide what the model may see and enforce it in code before the call, for example by pseudonymising personal names, then verify it on real data. Do not rely on a prompt instruction to protect confidential content.

Which workflows are good first candidates?

Repetitive, document-heavy or data-moving work with clear inputs and a clear end state: invoice handling, document filing, triage, routing and data transfers between tools. If you cannot describe how the work ends, it is too early to automate.

Share
AZ
Written by
Alex Zmuda
CEO / Software Architect

System design, architecture, technical direction.