How to Create an AI Agent That Does a Real Job
To create an AI agent, you give a language model three things: one job, the knowledge it needs to do that job, and the tools it is allowed to use, such as reading a calendar or sending a WhatsApp reply. Then you test it against real messages before anyone depends on it. You can do this with a no-code platform in an afternoon, or write it yourself with a model API and a few hundred lines of code. The hard part is never the model. It is writing down what your business knows and deciding where the agent must stop.
About CertuAI: CertuAI is the AI that answers a small business's WhatsApp, Instagram and Messenger 24/7, with a built-in CRM, and is a Tech Provider on Meta's WhatsApp Business Platform. Paid plans start at US$ 75 a month, with no lock-in. Create my agent
Conecte o WhatsApp e a IA aprende com as suas conversas: preços, horários e o seu jeito de responder.
Conectar meu WhatsApp Você revisa e aprova antes de a IA atender alguém.Summary in 7 facts
- To create an AI agent, you give a language model three things: one job, the knowledge it needs to do that job, and the tools it is allowed to use, such as reading a calendar or sending a WhatsApp reply.
- Then you test it against real messages before anyone depends on it.
- You can do this with a no-code platform in an afternoon, or write it yourself with a model API and a few hundred lines of code.
- An AI agent is a program that reads a request, decides what to do about it, and then does it.
- The deciding part is a large language model, the same kind of model behind ChatGPT, Claude or Gemini.
- Pick the job that repeats the most and needs the least judgement.
- For most small businesses that is answering incoming messages: prices, hours, location, availability, and booking.
In numbers
| Number | What it means |
|---|---|
| 30 messages | Take 30 messages customers really sent you last month and send them to the agent. |
What is an AI agent, in plain words?
An AI agent is a program that reads a request, decides what to do about it, and then does it. The deciding part is a large language model, the same kind of model behind ChatGPT, Claude or Gemini. What turns a model into an agent is everything around it: written instructions, the facts it is allowed to use, and actions it can take, like looking up an order or booking a slot.
A chatbot answers. An agent answers and acts. If a customer writes "can I come at 4 tomorrow?", a chatbot can say "please call us". An agent can open the calendar, see 4 pm is taken, offer 4:30, and write the booking once the customer agrees.
| Part | What it is | Example for a dental clinic |
|---|---|---|
| Model | The language model that reads and writes | Claude, GPT or Gemini |
| Instructions | Who the agent is and how it must behave | "You answer for Smile Dental. Be short. Never give a diagnosis." |
| Knowledge | The facts it may use | Prices, opening hours, address, which treatments you offer |
| Tools | Actions it is allowed to take | Check the calendar, book a slot, hand over to the receptionist |
| Channel | Where it talks to people | WhatsApp, Instagram, a website chat |
What job should your first AI agent do?
Pick the job that repeats the most and needs the least judgement. For most small businesses that is answering incoming messages: prices, hours, location, availability, and booking. These questions arrive all day, the answers rarely change, and a wrong answer is easy to spot.
Avoid first jobs that need judgement or carry risk: refunds, complaints, medical or legal advice, negotiating prices, anything involving money leaving your account. An agent can help with these later, but only after you trust how it behaves on simple work.
- Good first job: "Answer questions about our menu and take delivery orders on WhatsApp."
- Bad first job: "Handle customer service." It is too wide to test, so you never know when it is ready.
- Good first job: "Qualify new leads with two questions and book a call."
- Bad first job: "Close sales." Closing needs a person who can bend the rules.
How do you create an AI agent step by step?
- Write the job in one sentence. "Answer customer messages on WhatsApp about prices, hours and bookings for Mama Ade's Kitchen, and pass everything else to Ade."
- Collect the knowledge. Price list, hours, address, delivery areas, payment methods, and the ten questions customers ask most. Your old WhatsApp chats are the best source, because they show the real questions in your customers' own words.
- Write the rules. What the agent must never do (promise a discount, give a diagnosis, invent a price), and the exact moment it must hand over to a person.
- Choose how to build it. A no-code platform that already connects to WhatsApp, or your own code using a model API. The next two sections compare them.
- Connect the channel. On WhatsApp this means either Meta's official WhatsApp Business Platform or linking the number by QR code, the way WhatsApp Web works. Each has trade-offs, covered in our guide on how the WhatsApp Business API works.
- Test with real messages. Take 30 messages customers really sent you last month and send them to the agent. Compare its replies with what you actually answered.
- Go live small and watch. Read every conversation for the first week. Every wrong answer becomes a fix in the knowledge or the rules.
Most agents that fail in the first month fail on step 2, not on the technology. If the agent does not know your delivery fee, it will either refuse to answer or make one up.
Should you use a no-code platform or build it yourself?
Both work. The choice depends on whether you want to run a business or run software.
| No-code platform | Build it yourself | |
|---|---|---|
| Time to first working agent | Hours to a day | Days to weeks |
| Skills needed | Writing clearly about your business | Programming, hosting, API keys, error handling |
| WhatsApp connection | Usually included | You register with Meta or a provider and handle webhooks yourself |
| Monthly cost | A subscription | Model usage, hosting, WhatsApp message fees, your time |
| Control | Limited to what the platform allows | Complete |
| Who fixes it at 2 am | The platform | You |
If you are a developer, building one is a good way to learn how agents work. If you own a clinic, a shop or an agency, your time is better spent writing the knowledge than writing code.
How does an AI agent work under the hood?
Every agent, no matter who built it, runs the same loop. A message comes in. The program sends the model the instructions, the relevant knowledge and the conversation so far. The model either writes a reply or asks to use a tool, for example "check the calendar for tomorrow afternoon". The program runs that tool, hands the result back to the model, and the model writes the final reply.
- Customer message arrives through the channel.
- The program gathers context: instructions, matching knowledge, the last messages of this conversation.
- The model decides: answer now, use a tool, or hand over to a person.
- If it used a tool, the result goes back to the model, which decides again.
- The reply is sent, and the conversation is saved for next time.
For developers, the building blocks are a model API with tool calling (also called function calling), a database for conversations, and a webhook that receives messages from the channel. Frameworks exist, but a direct loop with a model API is often clearer for a single-purpose agent.
How do you test an AI agent before customers see it?
Test with what customers actually wrote, not with questions you make up. Questions you invent are the ones you already know how to answer. Real messages arrive with spelling mistakes, voice notes, three questions at once, and slang.
- Pull 30 to 50 real messages from your WhatsApp history, including a few difficult ones.
- Send each one to the agent and write next to it: right, wrong, or should have handed over.
- Look hardest at numbers. A wrong price or a wrong opening hour costs you more than a clumsy sentence.
- Try to break it: ask for a discount, ask something outside your business, write in another language, send an angry message.
- Fix the knowledge or the rules, then run the same messages again.
When should you not create an AI agent?
If you get five messages a day and you enjoy answering them, an agent adds work instead of removing it. You still have to write the knowledge, test it and check it.
If your answers change every day, for example prices that depend on a daily market rate, the agent will be wrong unless someone updates its knowledge every morning. And if every conversation needs a judgement call, such as custom quotes for building work, an agent should only collect the details and pass them to you, not answer.
Read next
Frequently asked questions
- Can I create an AI agent for free?
- You can build one for free to learn, using a model provider's free tier and your own computer. Running one for real customers always costs something: model usage, hosting, and on WhatsApp's official platform, message fees set by Meta.
- Do I need to know how to code to create an AI agent?
- No. No-code platforms let you create an agent by writing instructions and uploading your business information. You need code only if you want full control or a custom integration.
- Which AI model is best for an agent?
- For a customer-facing agent, the model matters less than the knowledge you give it. Pick a current model from a major provider, then spend your effort on instructions, knowledge and testing.
- How long does it take to create an AI agent?
- On a no-code platform, a first version can answer customers the same day. Getting it reliable takes one to two weeks of reading its conversations and fixing what it gets wrong.
- Can an AI agent make mistakes?
- Yes. Language models can state things that are not true, especially numbers they were never given. That is why the agent needs written knowledge, clear limits, and a fast way to hand the conversation to a person.
Keep reading
In short
To create an AI agent, you give a language model three things: one job, the knowledge it needs to do that job, and the tools it is allowed to use, such as reading a calendar or sending a WhatsApp reply. Then you test it against real messages before anyone depends on it. You can do this with a no-code platform in an afternoon, or write it yourself with a model API and a few hundred lines of code.
About CertuAI: CertuAI is the AI that answers a small business's WhatsApp, Instagram and Messenger 24/7, with a built-in CRM, and is a Tech Provider on Meta's WhatsApp Business Platform. Paid plans start at US$ 75 a month, with no lock-in. Create my agent