How to write an AI agent specification for a real business process
An AI agent specification is a written description of the business process an agent will run: its trigger, the steps, the inputs and where they come from, the rules, the exceptions, the hand-offs and the points where a person must decide. It is the process written down. Without it, an agent repeats whatever its builder guessed the process was.
What is an AI agent specification?
Most of what you find under "agent spec" is written for software developers: how to brief a coding agent, which tools it can call, how to test it. That matters for the people building it. It isn't what an operations leader needs first.
The business spec comes before that. It answers a simpler question: what exactly is the work this agent will do, and what happens when the work doesn't go to plan?
A useful spec has seven parts:
- Trigger. What starts the process. An email with a purchase order attached. A form submitted. A date.
- Inputs. What information the process needs, and where each piece lives today.
- Steps. What is done, in order, as the best person in the team does it.
- Rules. The decisions inside the steps, written as rules someone else could follow.
- Exceptions. What goes wrong, roughly how often, and what the team does each time.
- Hand-offs and sign-offs. Where the work passes to another person, and where someone must approve.
- Done. What the output is, and how you know it's right.
Why do agent projects stall on the spec?
Take a wholesaler of industrial components, 90 people, a few thousand order lines a week. Customers send purchase orders by email, as PDFs, in their own formats. A team of order handlers keys them into the ERP.
It looks like the perfect first agent. Read the PO, create the sales order. Someone builds a prototype in an afternoon and it works on the first ten orders.
Then the real orders arrive.
- The customer's part number doesn't match yours, and only one order handler knows the cross-reference for that customer.
- The price on the PO is last year's price. Sometimes you honor it, sometimes you don't, depending on the customer and the amount.
- The delivery date is earlier than you can ship. Someone calls the customer.
- Half the lines are in stock, half are back-ordered. Does the customer accept a partial delivery? It depends who the customer is.
None of these rules are in the ERP. They're in the heads of the order handlers. The prototype didn't fail because the AI was weak. It failed because the spec was "read the PO, create the order", and the real process is mostly exceptions.
How do you write an agent spec from how the work really runs?
Start with the people who do the work. Ask the order handler to walk through the last five orders, including the awkward ones. Ask what they check, who they call and what they keep in their own notes. That's the spec.
Write the rules as rules. "We usually accept the old price for good customers" isn't a rule. "Accept last year's price if the customer is on the key account list and the difference is below an agreed limit, say 3%" is. If nobody can write the rule, it isn't ready for an agent. It's a judgment call, and it stays with a person for now.
Count the exceptions honestly. If most orders are clean, the agent handles those and passes the rest to a person. If most orders are exceptions, start with a smaller job, like extracting the PO into a structured checklist that the order handler confirms.
Mark every sign-off. An agent should know exactly where it stops and a person decides: a price override, a credit hold, a delivery promise. Write down who decides and what they need to see.
Decide the call before you build. Each process gets one of three calls:
- Give to AI: the rules are written, the inputs are clean, and errors are cheap to catch. Candidate for an agent.
- AI + people: the agent does the first pass and a person confirms. Most first agents belong here.
- Keep human: the work depends on relationships or judgment. The agent can prepare the facts, nothing more.
What does a good agent spec look like in practice?
For the order intake example, a short spec might read:
- Trigger: an email to the orders inbox with a PO attached.
- Inputs: the PO, the customer's part number cross-reference, the price list, stock levels.
- Steps: extract header and lines, match parts, check price and date, propose the sales order.
- Rules: price tolerance (the agreed limit), which customers accept partial delivery, how to handle unknown part numbers.
- Exceptions: unknown part, price outside tolerance, date not possible, credit hold. Each goes to a named person with the facts attached.
- Sign-off: an order handler confirms every proposed order until the error rate is known.
- Done: a sales order that matches what the best order handler would have entered.
That's one page. It's also the page most agent projects never write.
Which platform should the agent run on?
Whichever one you already pay for, if it fits. Copilot Studio, Business Central, Claude, ChatGPT, Gemini: the spec is the same. The platform decides how the agent is built. The spec decides whether it does the right thing.
This is also why the spec should be written by, or with, the people who run the process, not only the people who build the agent. The builder knows the platform. The order handler knows the work.
Where does Spren fit?
Spren maps how a company really runs from short interviews with the people doing the work, for as little as 15 minutes each, by voice, WhatsApp or Teams. For every process the map gives the steps, exceptions and hand-offs, with one of the three calls and the reason. For a process you hand to AI, that's the spec for an agent, in Copilot Studio, Business Central or wherever you build.
Spren doesn't connect to, read or build anything inside those platforms. It gives you the written process. For each ranked process, a Process Powerup gives you a ready-to-use prompt or skill for the AI tools you already pay for. See what else the map is used for, with AI use cases process by process.
If the agent is part of an ERP project, read ERP requirements gathering from how work really runs. For where agents sit in the bigger plan, read an AI implementation roadmap that starts from the work.
FAQ
What should an AI agent specification include?
The trigger, inputs and their sources, the steps, the rules, the exceptions and how often they happen, the hand-offs and sign-offs, and what a correct output looks like.
Who should write an AI agent specification?
The people who run the process, with the people who will build the agent. The builder knows the platform. The people doing the work know the rules and the exceptions.
What is the difference between an agent spec and an SOP?
An SOP describes the standard path for people. An agent spec also has to write down the exceptions, the rules behind decisions and the exact points where a person takes over, because an agent can't improvise.
Which processes are good candidates for a first AI agent?
Processes with written rules, clean inputs and cheap-to-catch errors. If most cases are exceptions, start with an AI + people step, like extracting data for a person to confirm.
A question for anyone who runs order intake: which exception on an incoming PO takes your team the longest to resolve?