A typical brief for an AI agent reads like this: "We need a bot that answers customers on WhatsApp, knows our services and books consultations." The vendor builds exactly that. Then, at sign-off, you discover the agent quotes prices your sales team only gives after a site visit, struggles with Arabic, and has no idea who should handle an angry customer. That is not necessarily the vendor's fault. The brief never said how the agent should behave, so almost any result technically meets it. This article covers the sections a working agent spec needs, how to describe behaviour in a way you can test, the phrases that quietly ruin a spec, and how to build the test set you will use to accept the work.
Why an agent spec is different from a website or CRM spec
A classic software spec lists features and screens: which fields a form has, what happens when a button is pressed, which reports the system produces. Software behaves the same way on the same input, so listing features is enough.
An agent works with natural language. Customers ask the same question a dozen different ways, with typos, in mixed languages, sometimes as voice notes. You cannot list every case. So an agent spec describes behaviour: what the agent handles on its own, what it never does, when it brings in a person, and how you will check that all of this holds.
| Question | Website or CRM spec | AI agent spec |
|---|---|---|
| What it describes | Screens, fields, buttons | Situations and expected responses |
| How you accept it | Click through the scenarios | Run real customer messages and grade the answers |
| Main risk | A feature doesn't work | The agent is confidently wrong |
| After launch | Changes are rare | Constant updates: prices, policies, new questions |
The nine sections of a working spec
Length doesn't matter much; a good spec for one agent often fits in four to six pages. What matters is that every section is filled with specifics from your business.
1. Job and boundary
One paragraph on which process the agent takes over and where that process ends. For example: "Answers inbound questions about opening hours, location and services, and books first consultations. Does not give expert advice, does not take payments, does not handle existing orders." The boundary matters more than the job, because that is where the surprises live.
2. Channels, languages, hours
Where the agent lives (WhatsApp, Instagram, a website widget), which languages it answers in, and what it does when a customer switches language mid-conversation. Decide on voice notes: transcribe them, or politely ask for text. Decide on nights and weekends: does the agent answer fully, or only take a request for the morning?
3. Knowledge sources
The documents the agent draws facts from: price list, service descriptions, refund policy, FAQ. For each one, note where it lives, who owns it and how often it changes. If the price list exists only in the founder's head, fix that before development starts.
4. Actions and permissions
What the agent can do in your systems, not just say: create a deal in the CRM, check calendar slots, make a booking, send a file. For each action, specify the system, the permission level and whether a person must approve it. Give the agent the minimum access the job requires.
5. Hard limits
Things the agent never does: offer discounts, promise delivery dates, give medical or legal advice, discuss competitors, message people who haven't opted in. Write these as checkable actions, not as wishes.
6. Human handoff
When the agent stops and calls a person: a complaint, a request for a human, a question outside the knowledge base, a large order, repeated misunderstanding. Specify who receives the conversation, through which channel, what they see, and what the agent tells the customer at that moment. Why this rule should be enforced in code, not just in instructions, is covered in our piece on keeping a human in the loop.
7. Tone and format
Formal or casual, answer length, emoji, sign-off. The best input is five to ten real replies from your strongest salespeople. Adjectives like "friendly but professional" will mean different things to you and the vendor.
8. Acceptance
A set of test messages with expected behaviour and a rule for when the work counts as accepted. More on this below; it is the most underrated section.
9. Owner and post-launch changes
Who on your side owns the agent, who updates the knowledge base, how changes are requested and how quickly the vendor responds to an error. Without this, the agent drifts away from reality within a couple of months.
Describing behaviour: the situation table
The most useful format inside a spec is a situation table. It tells the vendor what you want and doubles as the basis for acceptance testing. Here is an illustrative example for a training centre agent that books trial lessons.
| Situation | Expected behaviour | Not acceptable |
|---|---|---|
| "How much is the course?" | Gives the price from the price list, asks about format (group or one-to-one) | Quoting a price that isn't on the list |
| "Can I get a discount?" | Says a manager will discuss discounts, offers to pass on the contact | Promising a discount or naming a percentage |
| Writes in Arabic | Replies in Arabic for the rest of the conversation | Switching to English unprompted |
| "I want a refund" | Apologises, hands over to an administrator immediately, tells the customer who will reply | Negotiating refund terms itself |
| Off-topic question | Briefly says it only helps with courses, steers back to booking | Chatting about unrelated topics |
Fifteen to twenty-five rows are enough for a first spec. Take them from real conversations: export the last two or three months of messages and note recurring question types, plus cases where staff made mistakes or customers left unhappy.
Phrases that ruin a spec
- "The agent must understand any question." Untestable. Replace with "answers the questions in the situation table; hands everything else to a person."
- "Sound like a real salesperson." Everyone pictures a different salesperson. Provide sample replies.
- "99% accuracy." Meaningless without a method. State which test set, who grades it and what counts as an error.
- "CRM integration." Which fields, at what moment, how duplicates are handled. Otherwise you get the minimum version.
- "The agent closes sales." Decide where the line is: qualify, book, send an invoice? Each step is a separate risk decision.
The test set you will accept the work against
- Collect 40–60 real customer messages, unedited. Keep the typos and mixed languages; that is how people write.
- Group them: routine questions, tricky ones (discounts, deadlines, guarantees), handoff situations, off-topic messages.
- Write the expected behaviour for each in one line, following the situation table logic.
- Decide who grades: someone on your side who knows the right answers.
- Agree on the acceptance rule. For example: zero hard-limit violations, every handoff case handled, minor wording issues allowed on routine questions but no factual errors.
- Keep 10–15 messages hidden from the vendor until acceptance. That shows how the agent handles input it wasn't tuned for.
Reuse the same set after launch, every time the knowledge base or instructions change significantly. How to run the first weeks so the set keeps growing with real cases is covered in our article on running an AI pilot.
A lesson from our own work: a limit written in the spec should be enforced in code, not just in the model's instructions. We had a rule in place and one component simply didn't check it. The write-up is in our approval gate case study.
Checklist before sending the spec
- The boundary is clear: it says what the agent does not do.
- Every knowledge source exists as a document with an owner.
- Each system action lists permissions and whether approval is needed.
- Hard limits are written as checkable actions.
- Handoff triggers are listed and a recipient is named.
- There are five to ten sample replies in the right tone.
- The situation table has at least 15 rows from real conversations.
- The test set and acceptance rule are agreed, with part of the set hidden.
- An owner on your side is named.
More articles on rolling out AI are in our implementation section.
FAQ
Should we write the spec, or should the vendor?
Only your team can write the business part: boundaries, limits, handoff, sample replies, test messages. That knowledge sits with you. The technical part (architecture, model choice, integrations) belongs with the vendor. A common workable split: you draft the sections above, the vendor fills gaps and asks questions.
Should the spec name a specific model?
Usually not. Describe requirements instead — languages, acceptable response time, where data may be stored — and let the vendor choose and justify. Models change quickly; behaviour requirements don't.
What if our process isn't documented?
Start by exporting conversations and talking to two or three people who do the work today. The situation table often becomes the first written description of the process.
How much does building an agent from such a spec cost?
It depends on the number of channels and system actions, the state of your knowledge base and the scope of testing. A spec built on these sections makes estimating much easier. If you want a second pair of eyes on your draft, get in touch; the first conversation is about understanding the task and scoping it.