How to Create an AI Agent

AgentHub.ie logo
Dr. Shadi Ghaith Founder, AgentHub.ie ·

Learning how to create an AI usually means one of two jobs. Training a model from scratch takes months, a data team and a very good reason. Building an AI agent — a model given instructions, tools and limits so it can do one job properly — takes days to weeks, and it is what almost every business actually wants.

Illustration of a business owner assembling a friendly AI agent from modular building blocks
Creating an AI agent is closer to assembly than to invention.

What Does “Create an AI” Actually Mean?

It means one of two very different things, and the phrase gives no clue which. One is training a model — building the underlying intelligence from data. The other is building an agent — taking an existing model and giving it instructions, tools and boundaries so it can do a specific job. Almost every business wants the second.

Friday, 5.40pm, a four-partner solicitors' firm in Dublin. The office is emptying. The enquiry form on the website pings: a probate query, a mobile number, a sentence and a half of detail. It will sit there until Monday at nine, by which time the person who sent it has filled in two other firms' forms. Nobody did anything wrong. There was simply nobody left in the building.

That is the moment somebody says, out loud, “we should get an AI to do this.” And that is where the fork in the road appears, because the next search they run is “how to create an AI” and the results split into two piles that never acknowledge each other.

The fork: training a model vs building an agent

One pile teaches you to collect a dataset, choose a neural network architecture, split your data and train a model. The other teaches you to connect a chat box to a language model and give it access to your calendar. Both are legitimate. Only one is what the firm above needs.

AspectTraining a model from scratchBuilding an AI agent
What you're makingThe intelligence itselfA worker that uses intelligence someone else trained
What you needA large, clean, labelled dataset and people who can read a loss curveA clear process, access to your own systems, and a decision about what it may not do
Realistic timelineMonths, and it rarely stopsDays to weeks for a narrow job
The hard partData quality and computeEdge cases, permissions and knowing when to stop
Right call whenYour data is genuinely unique and the model is the productYou have a repetitive process with rules and you want it done at 5.40pm on a Friday

If you are reading this as a business owner rather than a machine-learning engineer, you want the right-hand column. The models have already been trained, at expense that would make your accountant sit down. Your advantage is not in rebuilding them. It is in knowing exactly what happens to a probate enquiry at 5.40pm on a Friday — which no model has ever been taught.

Why picking the wrong one is expensive

The failure rate here is not a secret. Gartner predicts that over 40% of agentic AI projects will be cancelled by the end of 2027 (Gartner, June 2025), and the reasons given are escalating costs, unclear business value and inadequate risk controls. Read that list again: not one of them is “the technology didn't work”. They are all scoping problems.

The same analysis flags something worth knowing before you buy anything. Gartner estimates that of the thousands of vendors marketing agentic AI, only about 130 are genuinely doing it — the rest is “agent washing”, existing chatbots and automation rebadged. So when a tool promises you an autonomous agent, the base rate says it is probably a rules engine wearing a hat.

Ireland is not rushing in, either. The CSO found that 20.2% of Irish enterprises used AI in 2025 (CSO, published February 2026) — but that headline hides the real story, which is the gap by size:

  • Large enterprises: 57.7% using AI
  • Medium enterprises: 28.6%
  • Small enterprises: 17.2%

A large firm is more than three times as likely to be using AI as a small one. That gap is not about talent or appetite — small firms have plenty of both. It is about nobody having a spare fortnight to work out where to start. Which is the whole point of the rest of this article.

So what should you point it at first?

Pick a process that is repetitive, rule-shaped, and currently done badly because nobody has time — not the most interesting problem in the business. The most interesting problem is usually the one that needs judgement, which is the one you should keep.

In practice, the first agent in a small firm almost always lands on one of three jobs:

  • The phone nobody can always answer. Calls arrive when you are with a client. An agent answers every one, books what can be booked and takes a proper message for the rest.
  • The inbox that eats the morning. Enquiries, quotes, chasers and newsletters in one pile. An agent sorts, drafts and flags, and you approve.
  • The enquiries that go cold. Someone filled in a form on Friday. An agent acknowledges immediately, qualifies gently and books the call.

All three share a useful property: if the agent does nothing at all, you are back where you started rather than worse off. That is the right risk profile for a first build. Save the ambitious ideas for when you have watched one of these run for a month and learned how it behaves on a bad day.

Need Help with AI Solutions?

Get in touch with our team or try our AI assistant.

How Do You Actually Build an AI Agent?

You assemble five parts: a model to do the thinking, written instructions telling it its job, tools that let it act on real systems, memory so it knows what happened already, and guardrails that define what it must never do alone. Everything else in agent-building is detail hanging off those five.

Diagram of the parts of an AI agent: model at the centre connected to tools, memory, guardrails and calendar
The model thinks; the tools, memory and guardrails decide whether it is useful or dangerous.

The five parts you assemble

Here is each one in plain English, along with what goes wrong when it is missing — which is the part the tutorials tend to leave out.

PartWhat it isWhat goes wrong without it
ModelThe language model doing the reasoning — GPT, Claude, Gemini and so onNothing works. This is also the easiest part: you pick one and can change it later
InstructionsThe written brief: its job, its tone, what to do when unsure, when to stopThe agent improvises. Confident, fluent, and occasionally inventing your opening hours
ToolsThe things it can actually do: read the diary, send an email, look up a file, create a recordYou have a chatbot. It can describe booking an appointment but cannot book one
MemoryWhat it remembers within a conversation, and what it recalls between themEvery message starts from nothing. Callers repeat themselves and lose patience
GuardrailsHard limits enforced outside the model: what it may touch, what needs a human, what gets loggedThis is the one that ends up in a complaint letter

Note the ordering of difficulty. Choosing a model is an afternoon's decision and reversible. Writing the guardrails is the part that takes judgement, because it requires you to say precisely what your business will not let a machine do unsupervised. Most people want to skip it. It is the reason projects land in that 40%.

The build, step by step

1. Write the job description first. One paragraph, no jargon: what starts the agent off, what it does, and what “finished” looks like. For the Dublin firm: when a new enquiry arrives, work out what area of law it concerns and how urgent it is, reply to acknowledge it, and put it in front of the right solicitor with a summary. If that paragraph runs to three paragraphs, the scope is too wide — cut it until it fits.

2. Pick where it will live. No-code platforms such as n8n, Make or Zapier let you create AI agents by connecting boxes rather than writing code. Frameworks give you more control and demand more skill. Start on the no-code side unless you already know why you can't.

3. Choose a model. Any current frontier model will handle a triage-and-draft job comfortably. Pick on data terms and cost rather than benchmark scores, because you will swap it within the year anyway.

4. Connect the tools, one at a time. The enquiry form, the calendar, the email account, the case management system. Add one, prove it works, add the next. An agent with nine half-working tools is harder to debug than nine separate agents.

5. Write the instructions like you're briefing a new hire. Because you are. The good ones read like induction notes: here is what we do, here is how we speak to clients, here is what you do when you're not sure — which is stop and ask a person.

6. Test on real history, not on your imagination. Take the last 100 real enquiries and run them through. You will find the ones nobody warned you about — the caller who asks about three matters at once, the message that is just “ring me”, the person who describes a conveyancing problem using the word “divorce” four times.

7. Decide what it does when it is wrong. Not if. A working agent fails into a human: it flags what it could not handle and hands it over with context. An agent with no defined failure path is a liability with a friendly tone.

Where demos and working systems part company

A demo agent needs to succeed once, on a good example, while someone watches. A production agent needs to fail safely at 2am on an input nobody imagined. The distance between those two is where the real work sits, and it has recognisable shapes:

  • Invented facts and invented tools. Models will confidently reference a tool they do not have and an opening time you never gave them. The fix is grounding: the agent answers from your actual documents and systems, not from memory of the internet.
  • Loops. An agent that cannot finish will keep trying, cheerfully, until someone notices the bill. Step limits and timeouts are not optional.
  • Permissions nobody scoped. If the agent's email access can send to anyone, one day it will. Access is granted per-tool, narrowly, and irreversible actions get a human check.
  • No way to tell if it is working. “It seems good” is not a measurement. Decide up front what a correct outcome looks like and count them.

None of this is exotic engineering. It is the same discipline you would apply to a new member of staff who is fast, tireless, extremely well-read and has no common sense whatsoever.

Need Help with AI Solutions?

Get in touch with our team or try our AI assistant.

How We Build an AI Agent at AgentHub

We are an Irish AI agency, and building custom agents for firms like that Dublin practice is most of what we do. Our method is unglamorous and it starts nowhere near a keyboard: read the real work first, write down the limits second, build against live systems third, and let the agent act on its own only once the people who own the risk have agreed with what it produces.

We read a month of real enquiries first. Not a description of them — the actual messages. Every firm believes its enquiries are unpredictable. They are, at the edges. The middle is four or five recurring shapes, and the edges are precisely where the routing rules have to be explicit rather than clever.

Then we write down what it may not do. Before any building. For a solicitors' firm that list is short and firm: it never gives legal advice, never quotes a fee, never tells a client a limitation period. It acknowledges, classifies, summarises and routes. Everything on the wrong side of that line goes to a person, and the agent says so plainly.

Then we build it against the real systems — the actual inbox, the actual calendar — and run it in shadow mode, where it drafts but does not send, until the partners agree with what it produces. Only then does it get to act on its own.

Shadow mode is the step people want to skip and the one that earns its keep. For a week or two the agent does the whole job invisibly: it classifies each enquiry, writes the acknowledgement it would have sent, and files the summary it would have routed — into a folder nobody outside the firm ever sees. The partners read the drafts over coffee and say yes, no, or not like that.

What surfaces in that fortnight is never what anyone predicted. It is usually the vocabulary. One firm's clients kept writing “the house sale” for matters that were half conveyancing and half family law, and the agent routed them by the first word it recognised. That is a fifteen-minute fix once you can see it happening, and an awkward phone call if you find out from a client instead.

We also agree what “working” means before it goes live, in numbers rather than impressions: what share of enquiries got acknowledged inside a minute, what share reached the right person first time, and how many the agent correctly refused to handle. That last one matters most. An agent that hands over cleanly when it is out of its depth is doing its job; one that has never handed anything over has not been tested properly yet.

Illustration of an AI agent sorting incoming client enquiries into trays in a calm solicitor's office
Triage, acknowledge, route. The judgement stays with the solicitor.

Three routes, honestly compared

We would rather you chose the right route than the one that pays us. Here is the comparison we give people who ask:

ConsiderationBuild it yourself (no-code)Build it with a frameworkHave it built for you
Time to something workingAn evening or twoWeeksDays, then testing
Who fixes it at 7amYouYour developerUs
Handles client data safelyOnly if you configure it that wayYes, if built for itYes — it is the starting requirement
Best forInternal jobs, learning, low-risk tasksTeams with developers and unusual needsClient-facing work where mistakes cost you

Genuinely: if the job is internal and low-risk, make your own AI agent this weekend. You will learn more about your own process in four hours than any consultant will tell you in four meetings. Call us when the agent needs to touch client data, live systems, or the firm's reputation.

The bit the tutorials skip: telling people it's an AI

Every guide we read while researching this article ends at “deploy”. Not one mentioned that if your agent talks to customers in the EU, you now have a legal duty to tell them what it is.

Article 50 of the EU AI Act applies from 2 August 2026. Its requirement is refreshingly plain: AI systems intended to interact directly with people must be designed so that those people are informed they are interacting with an AI system — at the latest at the first interaction, unless it is obvious from the context. There is no small-business exemption. A two-person firm with a website chatbot is in scope exactly as a bank is.

Worth knowing, because the reporting has been muddled: the EU's Digital Omnibus, politically agreed in May 2026, deferred the high-risk obligations to December 2027 and August 2028, and gave a short extension for watermarking content produced by systems already on the market. It did not move the disclosure duty. That date stands.

In practice this is a one-line change, not a project — the agent introduces itself. We build it in by default now, on our systems and our clients', because the alternative is retrofitting honesty later. The chat bubble on this page names itself as an assistant for exactly this reason.

What happens after launch

An agent is not a kettle. Models get updated, your services change, someone adds a new appointment type and nobody tells the machine. Left alone for a year, a good agent quietly drifts into a mediocre one.

So the last question in any build is the least technical: who owns this on a Tuesday when it does something odd? We keep that seat ourselves for the systems we run — including our own. The chat agent on this site, the inbox automation we use internally, and the pipeline that published this article are our own systems in production. We are the first to notice when one misbehaves, which is a useful arrangement for everyone.

If you want the honest version of what your process would take, tell us what happens to your enquiries at 5.40pm on a Friday. Every enquiry lands with me personally, and I reply within 24-48 hours. If the answer is that you don't need an agent, that is what you'll get — it happens more often than you'd expect from a company that sells them. For the two most common starting points, most firms begin with the AI Receptionist for the phone or Leads Outreach for enquiries that need chasing.

Need Help with AI Solutions?

Get in touch with our team or try our AI assistant.

Creating an AI Agent: FAQs

Do I need to know how to code to create an AI agent?

No. Platforms like n8n, Make and Zapier let you build a working agent by connecting boxes and writing instructions in plain English. Code becomes necessary when the agent needs to touch an unusual system, handle sensitive data under strict rules, or run at volumes where every second of latency costs money.

How long does it take to build an AI agent?

A first working version of a narrow agent takes hours to a few days. Getting that same agent trustworthy enough to run unsupervised on real customers takes considerably longer, because the time goes into edge cases, permissions and testing rather than into building the thing itself.

What is the difference between an AI agent and a chatbot?

A chatbot answers. An agent acts. A chatbot can tell a caller your opening hours; an agent can check the real diary, book the appointment, write it into your calendar and email a confirmation. The difference is tools: an agent has been given things it can actually do.

Do I have to tell customers they are talking to an AI?

In the EU, yes. Article 50 of the EU AI Act applies from 2 August 2026 and requires that people are told they are interacting with an AI system, at the latest at the first interaction, unless it is obvious from the context. It applies regardless of company size.

Can I build an AI agent on my own data without it leaking?

Yes, but it depends on choices you make deliberately: which model provider you use, what their data-retention terms say, what the agent is allowed to read, and where the logs live. Decide this before you build, not after. For regulated work in Ireland it is the first conversation, not the last.

Should I build an AI agent myself or hire someone?

Build the first one yourself. It is the cheapest way to learn what your process actually looks like, and a weekend on a no-code platform teaches more than any guide. Bring in help when the agent needs to touch live systems, handle client data, or run without someone watching it.

What happens when the AI agent gets something wrong?

That depends entirely on what you let it do. A well-built agent fails into a human: it flags what it could not handle and hands it over with context. The dangerous design is one that can take an irreversible action, such as sending or deleting, with no check and no log.

Back to that Friday evening in Dublin. The probate enquiry still arrives at 5.40pm, because that is when people finally get a minute to deal with the thing they have been avoiding. What changes is what happens next: an acknowledgement within the minute, a summary sitting in the right solicitor's inbox for Monday morning, and a note flagging that the sender sounded worried about a deadline. No advice given, no fee quoted, no judgement made. The building is still empty. The enquiry just stopped being lost in it.

If you'd like to see one working before you build one, the chat bubble on this page is an AI agent doing a real job — or read how other Irish firms have approached it.