Five things to specify before building an AI agent
A supplier invoice bills for 480 cartons, the purchase order says 400 and the warehouse goods-received note logs 420: how far may an AI agent act on its own before halting? Filling out five SOP-style specification cells locks down ERP permissions and shows when a simple workflow is enough.

Suppose a supplier invoice arrives billing for 480 cartons, your ERP purchase order (PO) lists 400 cartons and the warehouse goods-received note (GRN) logs 420. If a software vendor pitches an "autonomous accounts-payable AI agent live in four weeks" without specifying what happens when those three documents clash, all financial liability stays with you if the system approves an overpayment or sends an erroneous debit claim to a key vendor. Scoping an AI agent across five familiar SOP governance cells locks down ERP access upfront and reveals quickly whether a simpler workflow will do the job.
The five specification cells every AI agent needs before build
In its architectural guidance, Anthropic defines an AI agent as a system where a language model dynamically directs its own process and tool calls, contrasting it with an LLM workflow where predefined code orchestrates the model and tools (Anthropic, 2024). OpenAI draws a matching boundary, excluding single-turn chat interfaces and simple classifiers because they never steer multi-step execution (OpenAI, 2025).
Just as no finance director hands a new temp unrestricted ERP admin rights on day one, the Five things to specify for an agent framework captures every governance decision operations leaders must hand to software engineers on a single five-cell sheet:
Five things to specify for an agent
Before a process is handed to an AI agent, which parts of that agent must its owner write down so the technical team and the business team mean the same thing?
| Governance cell | Equivalent in a staff SOP | Engineering rule from vendor guides |
|---|---|---|
| 1. Role and instructions | Job description and step-by-step operating manual | Base prompts on existing SOPs, mapping each step to a clear action with explicit exception rules (OpenAI, 2025) |
| 2. Inputs | Handover trigger: who initiates work and in what file format | Start execution from an explicit operator command or structured system event (Anthropic, 2024) |
| 3. Memory | Shift handover log, audit ledger and supplier billing notes | Persist structured notes outside the context window and load them selectively across runs (Anthropic, 2025) |
| 4. Tools | Software permissions: read-only lookup versus write/send rights | Separate data-lookup tools, external action tools and orchestration calls cleanly (OpenAI, 2025) |
| 5. Boundaries and stopping points | Financial sign-off ceilings and mandatory escalation rules | Enforce loop caps, planned human review pauses (Anthropic, 2024) and automatic handover on high-risk actions (OpenAI, 2025) |
Tool scoping in cell four deserves extra discipline. Anthropic (2025) identifies bloated, overlapping tool definitions as a primary cause of production agent failures; whenever a human developer hesitates over which function applies to a scenario, a language model will misroute calls even more often (Anthropic, 2025). Keep each business action mapped to one narrow, non-overlapping tool.
Worked example: filling the five-cell spec for 600 monthly invoices
Take an illustrative regional consumer-goods distributor purchasing regularly from 40 suppliers and processing roughly 600 incoming invoices a month. Two accounts-payable clerks spend three full working days at month-end (48 clerk-hours) running three-way checks across supplier PDFs, ERP purchase orders and warehouse receipts. After screening candidate tasks (see which tasks to hand to AI), management scopes automated first-pass matching using the five-cell card below:
| Specification cell | Locked rules for the 600-invoice monthly reconciliation |
|---|---|
| Role and instructions | First-pass matching assistant for accounts payable. Extract PO number and line items from each PDF invoice; query matching PO and warehouse GRN; log "matched" or "mismatched" with standard reason codes (missing PO, split shipment, FX variance); treat unit-price rounding gaps under 0.5 per cent as matched. |
| Inputs | Clerks place monthly invoice PDFs into a designated folder and trigger a batch run for the named accounting period; automated event triggers via a system trigger stay switched off during pilot testing to cap token spend and verify accuracy. |
| Memory | Two external stores: an immutable reconciliation log (invoice ID, status, reason code, timestamp) and a supplier-quirks file (such as packaging vendors quoting VAT-inclusive unit prices). The system may propose new supplier notes, which take effect only after chief-accountant approval. |
| Tools | Five distinct, non-overlapping tools graded by OpenAI's reversibility and financial-risk criteria (OpenAI, 2025): three read-only lookups (PDF text extraction, ERP PO lookup, WMS receipt lookup) and two bounded writes (append audit-log row, save draft buyer query in email drafts with zero send permissions). Payment portals and ledger postings remain strictly inaccessible. |
| Boundaries and stopping points | Cap reasoning at 20 steps per invoice (Anthropic, 2024) and route to a clerk queue after 3 consecutive extraction errors (OpenAI, 2025). Halt immediately for chief-accountant review on any variance exceeding VND 5m or any unrecognised supplier ID; benchmark against historical reconciled batches in a sandbox before live rollout (Anthropic, 2024). |
Workflow or AI agent: when deterministic code beats autonomous loops
Whenever business steps follow a fixed sequence every month, a deterministic workflow outperforms an autonomous agent on cost, speed and reliability. Anthropic urges engineering teams to start with the simplest setup that works and introduce extra moving parts only when measured performance justifies the overhead (Anthropic, 2024).
Workflows versus agents
When a firm brings AI into a business process, should the product lead build a predefined workflow or let an agent decide its own steps?
| Criterion | Workflow | Agent |
|---|---|---|
| Who decides the path | predefined code | the model directs itself |
| Predictability | high | lower |
| Cost and latency | lower | higher; errors can compound |
| Suits | clear, repeatable tasks | open-ended tasks where the number of steps is hard to know in advance |
| Advice | prefer the simplest solution | add complexity only when the benefit is demonstrated |
Inspect the 600-invoice example closely: reading fields off a PDF, querying two internal tables, subtracting three columns of numbers and logging a status row follow a straight deterministic track. Ordinary code can orchestrate every step while calling a model once to parse varied PDF layouts into structured JSON.
Autonomous agent loops earn their keep only inside messy exception tails matching OpenAI's three criteria: nuanced judgement calls across varied edge cases, sprawling rule trees that have become brittle to maintain and heavy unstructured text (OpenAI, 2025) (for instance, reading master supply contracts to tell whether a short delivery reflects transit damage or an unrecorded quarterly rebate).
Handing open-ended control to an agent too early inflates compute bills and compounds step errors (Anthropic, 2024). Basic probability illustrates the compound risk: at 95 per cent single-step accuracy, a five-step autonomous chain completes cleanly only 77.4 per cent of the time (0.95⁵ ≈ 0.774), dropping below 60 per cent across ten steps. Combining layered technical guardrails with hard human-in-the-loop sign-off gates is mandatory whenever company money is involved (OpenAI, 2025).
When scoping automation budgets for SMEs, I apply two non-negotiable rules. Ship the deterministic workflow first for four to six weeks to measure what percentage of those 600 monthly invoices genuinely land in unclassified exceptions before paying to build an exception-triage agent. And if any cell on the five-cell specification remains blank (for instance, nobody has decided who approves variances over VND 5m while the chief accountant takes annual leave), freeze software development and fix human delegation rules that afternoon.
Three places where an AI agent differs from a human SOP
Comparing an agent to an executable SOP keeps scoping meetings practical, yet managers must respect three sharp operational differences between human procedures and language-model loops.
Step ordering comes first. A human SOP mandates step one followed by step two in strict order, whereas an agent chooses dynamically mid-run which tool to invoke next (Anthropic, 2024). Calibrating instruction detail therefore takes care: Anthropic (2025) notes that rigid, keystroke-level branching strips away adaptability, while vague high-level goals falsely assume the model shares unwritten company context (Anthropic, 2025).
Institutional memory comes next. Experienced clerks naturally carry forward context from last quarter's awkward supplier phone call. A language model wipes its active slate clean whenever a session closes, retaining only structured notes explicitly written to external storage and reloaded into future runs (Anthropic, 2025).
Legal accountability marks the final boundary. A human SOP carries executive sign-off and personal accountability before statutory auditors and tax authorities. Neither model weights nor a five-cell specification sheet hold legal personality; full fiduciary responsibility for every ledger entry and supplier payment remains with the officers who authorise live deployment.
Going deeper: Anthropic and OpenAI engineering guides and their evidence gaps
This five-cell specification synthesises practical engineering guidance published by Anthropic (2024, 2025) and OpenAI (2025). Keep the evidentiary standing of those texts clear: all three are technical practitioner guides written by commercial model vendors to help customer teams ship reliable applications, rather than independent, peer-reviewed empirical studies.
While their architectural lessons reflect extensive deployment experience, important quantitative benchmarks remain unpublished across all three guides. Neither vendor reports audited figures on total cost of ownership, average token spend per completed enterprise transaction or multi-step failure rates across independent firm cohorts. OpenAI's observation that some systems run cleanly across more than 15 distinct tools while others stumble over fewer than 10 overlapping tools remains qualitative field guidance rather than a controlled trial (OpenAI, 2025).
Structurally, neither vendor presents this exact five-box layout. OpenAI organises agent design around model, tools and instructions (OpenAI, 2025), whereas Anthropic (2024) depicts a base language model augmented with retrieval, tools and memory (Anthropic, 2024). Separating role, inputs, memory, tools and stopping boundaries into five management sign-off cells here is a deliberate governance choice for handovers between operations heads and developers, leaving model-tier selection to engineering. Both vendors also use the term "workflow" with slightly different scope; this article follows Anthropic's architectural distinction throughout (Anthropic, 2024).
Quick questions
How does an AI agent differ from a chatbot or a deterministic workflow?
Anthropic separates workflows, where code steers models along fixed paths, from agents, where language models choose their own steps and tool calls (Anthropic, 2024). OpenAI likewise places single-turn chatbots and classifiers outside the agent category because they never control multi-step execution (OpenAI, 2025). When reviewing a software quote, ask one direct question: does fixed code or the model pick the next step?
Should a business deploy one AI agent or a multi-agent architecture?
OpenAI recommends pushing a single agent as far as practical before splitting work across multiple agents, which adds coordination latency and debugging overhead (OpenAI, 2025). Split only when instructions grow too tangled or overlapping tools confuse the model. Clear, non-overlapping tool permissions improve reliability far more than raw tool count.
Does adding a guardrail filter make an autonomous agent safe for live operations?
No single filter catches every failure mode. OpenAI advises combining layered checks with ordinary software access controls, authentication and strict role permissions (OpenAI, 2025). On your specification sheet, write-access tools and mandatory human escalation thresholds have to be locked together.
When should an SME build a deterministic workflow instead of an AI agent?
Whenever business steps follow a known sequence under explicit rules, a deterministic workflow runs at lower compute cost and higher predictability (Anthropic, 2024). Anthropic advises adding autonomous agent loops only where real exception logs prove fixed code paths cannot handle unstructured edge cases.
References
Listed A–Z by author surname, Harvard style. A source with a DOI links to https://doi.org/…; one without links to its page or says plainly that it has no DOI.
- Anthropic (2024) Building effective AI agents. Anthropic Research.No DOIanthropic.comCited in 6 articles
- Anthropic (2025) Effective context engineering for AI agents. Anthropic Research.No DOIanthropic.comCited in 4 articles
- OpenAI (2025) A practical guide to building agents [guide].No DOIcdn.openai.comCited in 3 articles



Was this article useful?
No ratings yet.
Comments (0)
No comments yet. Be the first.