"How to build an AI agent in 10 practical steps: pick the job, map the rules, choose a model, choose no-code (n8n, Zapier, Make, Copilot Studio) or code (OpenAI Agents SDK, LangGraph, Claude Agent SDK), connect tools and data, add guardrails, test, monitor and stay on the right side of UK GDPR."
Key Takeaways
- 1To build an AI agent, start with one narrow, repetitive job, write its steps and rules down, then give a model the tools and instructions to do it. OpenAI describes every agent as three parts: a model, tools and instructions.
- 2No-code builders (n8n, Zapier, Make, Microsoft Copilot Studio) get a first version running fastest. Coding frameworks (OpenAI Agents SDK, LangGraph, Claude Agent SDK) give more control over permissions, testing and hosting.
- 3The AI is the easy part. Most of the real work is connecting tools safely, adding guardrails and a human hand-off, and testing on real past cases before launch.
- 4MCP (Model Context Protocol) is an open standard that lets one set of tool connections work across different AI applications and model providers.
- 5In the UK, an agent that touches personal data falls under UK GDPR. Check your lawful basis, sign a processing agreement with your model provider, and consider a DPIA. The ICO publishes specific guidance on AI.
- 6Build it yourself when the job is simple and low risk. Get help when the agent writes to core systems, handles personal or payment data, or has no clear owner after launch.
The short answer: how to build an AI agent
To build an AI agent, pick one repetitive job, write down its steps and rules, choose a model, then build it in a no-code tool (n8n, Zapier, Make, Copilot Studio) or a coding framework (OpenAI Agents SDK, LangGraph). Connect only the tools it needs, add a human hand-off, test on real past cases, and monitor it after launch.
This is a practical guide to how to build an AI agent, written for UK business owners and the people who end up doing the building: an operations lead, a tech-minded founder, or a developer asked to "try this AI agent thing". It is useful wherever you are, but the data protection section is written for UK GDPR. We cover the whole path in order, from choosing the job to keeping the agent healthy after launch, and then, briefly and fairly, how to tell when it is worth getting outside help.
Quick vocabulary, once. An AI agent is software that is given a goal and a set of tools, and decides its own steps to reach that goal: it can look something up, make a decision, and act in a real system, such as updating an order or creating a support ticket. A model(or LLM, large language model) is the AI that does the reasoning, such as OpenAI's GPT models, Anthropic's Claude or Google's Gemini. A toolis anything the agent can call to act, usually an app's API (the way one piece of software talks to another). A workflow is a fixed sequence of steps that always runs the same way.
If you are still deciding whether to build at all or rent an off-the-shelf tool, read our build vs. buy framework for AI agents first. This guide assumes you have decided to create an AI agent and want to do it properly.
What this guide covers
What you are actually building when you build an AI agent
Strip away the hype and every AI agent has the same three parts. OpenAI's A practical guide to building agents names them as the model that reasons and decides, the tools it can use to take action, and the instructions that set its rules and guardrails. Almost every useful business agent adds two more: memory, so it keeps track of what has happened in a conversation or task, and a human hand-off, so a person takes over when it gets stuck.
The other idea worth getting straight before you start is the difference between a workflow and an agent. Anthropic's engineering team, in Building effective agents, describes workflows as systems where the model and tools follow predefined code paths, and agents as systems where the model directs its own process and tool use. Their advice is to find the simplest solution that works and only add complexity when you need it.
That matters for you because many jobs people call "AI agents" are better built as a workflow with one AI step in the middle. Sorting enquiries into three buckets? A workflow with an AI classifier is simpler to run, faster and easier to test. Handling a return where the agent has to check the order, read the policy, look at the photos and decide what to offer? That is where a true agent earns its place.
How to build an AI agent in 10 steps
These steps apply whether you build an AI agent from scratch in Python or click one together in a no-code builder. Skipping the early ones is the most common reason agents look great in a demo and then fail on real work.
1. Pick one narrow, repetitive job
Good first jobs happen often, follow rules a person could write down, and have an outcome you can check. Examples from UK small businesses: triaging website enquiries, answering "where is my order" emails using your ecommerce and Royal Mail tracking data, chasing unpaid invoices politely, or drafting product descriptions from a supplier spreadsheet for someone to approve.
Bad first jobs are vague ("help with marketing"), rare, or high stakes with no easy way to check the result. Write the job as one sentence: "When X arrives, the agent does Y, and hands to a person when Z." If you cannot write that sentence, you are not ready to build yet.
2. Map the steps, rules and exceptions
Sit with the person who does the job today and write down exactly what they do: what they look at, in which system, what they decide, and what they do when something is odd. Draw it as boxes and arrows. OpenAI's guide recommends basing agent instructions on existing documents such as operating procedures, support scripts or policy documents, so gather those too.
The exceptions are the valuable part. "If the customer is in the Channel Islands, shipping rules differ." "If the order is over a set value, a manager approves the refund." Every exception you write down now is a failure you avoid later.

3. Decide exactly what the agent may touch
List every system the agent needs and whether it needs to read or write. Start with read-only access wherever you can. An agent that can look up orders but not issue refunds is far safer to launch than one that can do both. Create a separate account or API key for the agent with the smallest permissions that let it do the job, so you can see its actions in logs and switch it off without affecting anyone else.
4. Choose a model
OpenAI's guide gives a sensible rule: build your prototype with the most capable model, measure how well it does, then try swapping in smaller, faster models for the steps that are simple. Classifying an email is easy. Deciding whether a refund meets your policy is harder. Different steps can use different models.
For a UK business, also check the boring things: the provider's business terms, whether they use your data to train their models (business API terms usually say no, but read them), where data is processed, and whether they offer a data processing agreement. Those answers matter more than a small difference in test scores.
5. Choose how you will build it: no-code or code
An AI agent builder (no-code or low-code tool) lets you create an AI agent by dragging steps onto a canvas and filling in settings. A coding framework is a library a developer uses to write the agent in Python or TypeScript. The right choice depends on who will build it and, more importantly, who will maintain it.
A fair rule of thumb: if the job is common, the systems already have connectors in the tool, and the person building it is not a developer, start no-code. If you need tight control over permissions, custom connections, automated testing or hosting in your own environment, use code. We compare the main options in the tools section below.
6. Connect tools and data
Tools are how the agent does things. Each tool should do one clear job with a clear name and description, such as get_order_status(order_number) or create_support_ticket(summary, priority). The model reads these descriptions to decide which tool to call, so vague descriptions cause wrong choices.
For knowledge the agent needs to answer from, such as your returns policy or product specs, give it a clean, current source rather than everything you have. Out-of-date documents are one of the quietest causes of wrong answers. If a system has no connector, this is where you either write a small bit of code or use MCP.
7. Write clear instructions
Instructions (sometimes called the system prompt) tell the agent who it is working for, what the job is, what steps to follow, what it must never do, and when to stop and hand over. Write them the way you would brief a sensible new starter: short numbered steps, the rules from step 2, and examples of good and bad outcomes. Put the tone of voice in plain words ("friendly, brief, British spelling") and tell it what to say when it does not know.
8. Add guardrails and a human hand-off
Guardrails are checks that stop the agent doing something it should not. OpenAI's guide describes them as layered defences: no single check is enough, but several together make the agent much safer. Practical guardrails include a limit on how many steps or retries it can take, blocking personal data from being sent where it should not go, checking outputs before they reach a customer, and requiring approval for anything that cannot be undone.
The same guide names two triggers for handing to a person: when the agent keeps failing (for example, it cannot understand what the customer wants after several tries), and when the action is high risk, such as cancelling orders, authorising large refunds or making payments. Decide who receives the hand-off, in which channel, and with what summary, so the person does not have to start from scratch.
9. Test on real past cases
Before any customer sees it, collect a set of real past cases (old tickets, orders, enquiries) with the correct outcome for each. This is called an evaluation set, or evals. Run the agent against all of them and score the results. Include the awkward ones: missing details, angry messages, requests it should refuse, and attempts to trick it into ignoring its instructions.
Agree the pass mark before you run the tests, not after. Keep the test set and rerun it every time you change the instructions, the tools or the model, because a fix in one place often breaks something elsewhere.
10. Launch small, then monitor
Launch to a slice of the work first: one inbox, one product range, or a draft mode where a person approves every action. Log every decision the agent makes and every tool it calls. Review a sample each week and add the failures to your test set.
Agents drift for reasons that have nothing to do with your build: a connected app changes its API, the model provider updates or retires a model, or your own policies change. Name one person who owns the agent after launch. An agent with no owner is the one that quietly starts giving wrong answers in month three.
AI agent builders: no-code tools and coding frameworks
There are dozens of ways to build AI agents. These are the ones UK teams ask us about most, grouped by who they suit. All of them are real, maintained products; we have no commercial tie to any of them, and the right one depends on the systems you already use.
No-code and low-code AI agent builders
A workflow automation tool with an AI Agent node. Strong when you want fixed workflow steps around an AI decision. Can be self-hosted, which appeals to teams that want data on their own servers. Popular for "n8n build AI agent" projects because the steps stay visible.
Agents that act across the very large library of apps Zapier already connects to. The easiest start if your business already runs on Zapier and the apps you need are in its catalogue.
Builds AI agents directly on the Make visual canvas alongside normal automations. Good for people who like to see branching logic laid out as a diagram.
Microsoft's platform for building and managing agents in natural language or a graphical interface. The natural fit if your business lives in Microsoft 365, Teams and SharePoint.
Coding frameworks for developers
A lightweight Python library for agents, tools, hand-offs between agents and guardrails. The examples in OpenAI's practical guide use it.
A lower-level framework for designing agents as graphs of steps, with human-in-the-loop controls. Suits longer, stateful processes that pause for approval.
Anthropic's library in Python and TypeScript, with built-in tools, permissions, hooks and MCP support. You can also call the Claude API directly and write the loop yourself.
You can also build an AI agent from scratch with no framework at all: a loop that sends the task to a model, runs whichever tool it asks for, and sends back the result. It is a great way to learn, and for small agents it is often enough.
Building an AI agent with MCP
MCP stands for Model Context Protocol. The official MCP documentation describes it as an open-source standard for connecting AI applications to external systems, and compares it to a USB-C port: one shared plug shape instead of a different cable for every device.
In practice, an MCP serveris a small program that exposes a set of actions, such as "search products" or "create a delivery note", in a standard way. An agent that speaks MCP can discover and use those actions without custom glue code. Many apps now publish their own MCP servers, and you can write one for an in-house system in a short piece of code.
To build an AI agent using MCP: pick an agent framework that supports it (the Claude Agent SDK and OpenAI Agents SDK both do), connect it to the MCP servers for your tools, and apply the same permission rules from step 3. MCP makes connecting easier; it does not make an unsafe permission safe. Only connect servers you trust, because a server can see whatever the agent sends it.
Halfway through a build and stuck on the integration?
Most DIY agents stall at step 6: the system you need has no connector, or the agent needs write access you are not comfortable giving it. Our UK AI agent team can review what you have built and tell you honestly whether to finish it yourself or get help with one piece.
Talk to the FounderUK GDPR and data protection when you create an AI agent
If your agent reads or acts on information about people (customers, staff, suppliers who are sole traders), it is processing personal data, and UK GDPR and the Data Protection Act 2018 apply just as they do to your CRM. The Information Commissioner's Office publishes detailed guidance on AI and data protection, covering lawfulness, transparency, fairness, accountability, DPIAs and solely automated decisions under Article 22. A plain checklist before launch:
- Know your lawful basis for each use of personal data, and update your privacy notice so people know an AI system is involved.
- Sign a data processing agreement with your model provider and any builder platform, and check where they process and store data, and whether they keep it.
- Send the minimum. If the agent only needs an order number and postcode, do not send the whole customer record to the model.
- Consider a DPIA (data protection impact assessment), a written check of risks and how you reduce them. It is required where processing is likely to be high risk.
- Keep a person in the loop for decisions with legal or similarly significant effects on someone, such as refusing credit or a job application. Solely automated decisions like that have extra rules under UK GDPR.
- Log and secure it. Keep records of what the agent did, restrict who can change its instructions, and store API keys securely, not in a shared spreadsheet.
No-code builder vs coding framework vs developer vs agency
Four realistic ways to build AI agents, compared on what actually decides the outcome. None is right for everyone.
| Factor | No-code builder (DIY) | Coding framework (DIY) | Freelance developer | Agency |
|---|---|---|---|---|
| Skills you need | Clear process thinking, comfort with app settings | Python or TypeScript, APIs, testing | A clear brief and time to review their work | A clear brief and a named owner in your business |
| Speed to a first version | Fastest, often a day for a simple job | Days to weeks, depending on experience | Weeks, depending on their availability | Weeks, including discovery and testing |
| Control | Limited to what the tool allows | Full control over logic, permissions and hosting | Full, if the contract gives you the code | Full, if the contract gives you the code |
| Maintenance | You, plus the platform's updates | You, including model and API changes | Depends on one person staying available | A team on a support agreement |
| Best for | Common, low-risk jobs on popular apps | Teams with developer time and custom systems | One well-defined build on a tight scope | Agents that touch core systems or personal data |
If you are weighing the last two columns, our guide on how to hire an AI agent developer covers the questions to ask and the red flags to watch for, so we will not repeat it here.
Common mistakes when building AI agents
- ✕Starting with a big, vague goal. "An AI agent for customer service" is a department, not a job. Start with one queue.
- ✕Building a team of agents on day one. One agent with good tools beats five agents passing work around.
- ✕Giving write access too early. Read first, draft second, act last, and only once tests pass.
- ✕Testing on made-up examples. Real past cases expose the problems invented ones never will.
- ✕No owner after launch. Someone has to read the logs, update the policy documents and rerun the tests.
- ✕Leaving data protection until the end. Changing what data flows where is much harder after you have built around it.
Signs it is time to get help building your AI agent
Plenty of businesses build a useful AI agent themselves, and if yours is a simple, low-risk job, you should try. It is worth bringing in outside help when one or more of these is true:
- ✓The agent must write to a core system: your Shopify or Magento store, ERP, accounts or warehouse system.
- ✓It handles personal, health or payment data, and you are not confident about the UK GDPR side.
- ✓You are spending more time working around the limits of a no-code tool than the agent saves.
- ✓The prototype works in a demo but you have no way to test it properly on real past cases.
- ✓Nobody in the business has the time or skills to own it after launch.
Not sure which applies? An hour with an independent adviser often saves weeks. Our UK AI consulting work starts exactly there: which jobs are worth automating, and whether you can build them yourself.
Where FactoryJet fits
We are one option among many, and for simple agents we will often tell you to build it yourself with one of the tools above. Where we help is the harder end: agents that connect to ecommerce platforms, CRMs, help desks and back-office systems, and need proper permissions, testing and support.
We design, build, integrate and support custom AI agents, and you own them: the code, the instructions, the configuration and the accounts sit with your business from day one. We stay on after launch on a monthly support agreement if you want us to, monitoring the agent, rerunning tests when models change and fixing integrations when a connected app updates. What we will not do is launch something and disappear.
FactoryJet was founded in 2014 and has worked with more than 500 businesses, most of them in commerce, from B2B wholesalers such as Bombay Petals to direct-to-consumer brands such as Belle Maison. If you want to know what an agent like this involves in practice, our guide to what an AI agent costs explains the cost drivers.
About the author.Bhavesh Barot is the Founder & CEO of FactoryJet. He has spent more than a decade building commerce systems and now leads the team that designs, builds and supports custom AI agents for UK, US and international businesses.
Further reading on AI agents
Built a prototype and want a second opinion?
Show us the job, the tools and what you have so far. We will tell you plainly whether to finish it yourself, get help with one piece, or have us design, build and support it, with you owning the result.
Want this done for you?
Get a free, no-pitch plan for your site.
Tell us where to send it. Bhavesh, the founder, reviews every request himself and replies within 24 hours, often the same day. Most sites ship in about 7 days.
Frequently Asked Questions
Can I build my own AI agent?
Can I create an AI agent for free?
Can you build an AI agent with ChatGPT?
Is it hard to build an AI agent?
What is the best tool to build AI agents?
Can I build AI agents with n8n?
Is n8n really AI?
How can I build an AI agent using MCP?
Is MCP basically an API for AI?
Can MCP be used with OpenAI?
Can you create an AI agent in Python?
Can I build an AI agent from scratch without a framework?
What are the main components of an AI agent?
What are the 7 types of AI agents?
What is a simple AI agent?
How long does it take to build an AI agent?
How much does it cost to build your own AI agent?
Can I build a personal AI agent?
Should I build one AI agent or a team of agents?
Do I need to know how to code to build an AI agent?
Which AI model is best for building agents?
Is it legal to build an AI agent that uses customer data in the UK?
Do I need a DPIA for an AI agent?
How do I test an AI agent before it goes live?
When should I get help building an AI agent?
If FactoryJet builds an AI agent for us, who owns it?

Bhavesh Barot
Founder & CEO
Founder & CEO of FactoryJet, an ecommerce and AI services company that has served 500+ businesses across the US, UK, UAE, and India. Writes about ecommerce builds, AI agents, and AI search.



