How to create an AI agent in 2026: step by step, with a worked example
How to create an AI agent in 9 beginner-friendly steps, from picking a task to testing and publishing, with a complete inbox triage example.

To create an AI agent, pick one small job, choose a builder (a no-code tool like Zapier Agents or an SDK if you code), write plain instructions, connect the tools the agent may use, then test it on real examples before you switch it on. That is the whole recipe. The rest of this guide walks you through each part slowly.
By the end you'll have a working inbox triage agent that reads new emails, logs them in a spreadsheet and drafts replies for you to check, in about 30 minutes. We put this guide together from the official docs of Zapier, OpenAI and Anthropic, plus published tutorials, as of late October 2026. Nobody at the site ran hands-on tests for it, so the screen labels below come from each vendor's help pages. If you want the theory first, read our explainer on what agentic AI is and how AI agents work.
What you need before you start
- One repeatable task. Something you do every day or week, with clear inputs and outputs.
- A free Zapier account. The Agents Free plan costs $0 and lets an agent "run automated behaviors up to 400 times per month".
- The apps the agent will touch. For the worked example: a Gmail account and a Google Sheet with the columns Date, Sender, Topic, Urgency and Summary.
- Five to ten real examples. Old emails you know the right answer for. You'll use them to test.
Tip: You don't need to code for this guide. If you do code, Step 2 shows where the SDK route fits.
Step 1: Pick one small, repeatable job
Start smaller than you think. Anthropic's engineering guide on building agents recommends "finding the simplest solution possible, and only increasing complexity when needed." The same guide draws a useful line: workflows follow "predefined code paths", while agents "dynamically direct their own processes and tool usage." If your task never changes, a plain automation may be enough.
Write your job as one sentence. Example:
When a new email arrives, decide what it is about and how urgent it is, log it in my sheet, and draft a reply for anything urgent.
You should now have one sentence with a trigger (new email), a decision (topic and urgency) and actions (log, draft).
Step 2: Choose your builder
Each option below suits a different reader. Pick the row that matches you.
| Builder | Best for | Coding needed | Notes (checked October 2026) |
|---|---|---|---|
| Zapier Agents | Beginners who live in everyday apps | No | Free plan with 400 activities a month; Pro is $33.33/month billed annually (Zapier pricing) |
| n8n | Tinkerers who want visual workflows they can host | No (some setup) | Uses an AI Agent node with a chat model, memory and tools (Hostinger tutorial) |
| ChatGPT workspace agents | Teams on ChatGPT Business or Enterprise | No | Built from the Agents sidebar; can run on a schedule or in Slack (OpenAI Help Center) |
| OpenAI Agents SDK or similar | Developers building agents into a product | Yes | OpenAI points code-based users to the Agents SDK (OpenAI) |
Watch out: OpenAI's visual Agent Builder is going away. A June 2026 update on its launch post says OpenAI is "winding down the Agent Builder and Evals products", which leave the platform on 30 November 2026. Don't start a new project there.
This guide uses Zapier Agents because it is free to start and needs no setup. The same steps apply in every builder.
Step 3: Create the agent and write its instructions
Go to agents.zapier.com. In the left sidebar, click + New agent, then choose a custom agent. Zapier's help page says to describe "what should trigger the agent, what tasks it should do, and which apps it should use." Paste this and click Create agent:
You are my inbox assistant. Each time a new email arrives in Gmail:
1. Read the email.
2. Pick one topic: billing, meeting request, support, sales or other.
3. Rate urgency: high, medium or low. High means a deadline within 48 hours or an upset customer.
4. Add one row to my Google Sheet "Inbox log" with Date, Sender, Topic, Urgency and a one-sentence Summary.
5. If urgency is high, create a Gmail draft reply. Never send the email.
If you are unsure about the topic, choose "other" and say why in the Summary.
Zapier then asks you to connect the apps it spotted. Pick your Gmail and Google Sheets accounts from the dropdowns and click Create. You should now see the Configure screen.
Tip: Zapier warns that long instructions can hit token limits. Keep them short and move big reference material into a knowledge source (Step 6).
Step 4: Set the trigger
A trigger decides when the agent wakes up. In Zapier, use Add trigger. According to Zapier's own guide, you can run an agent on demand, on a set schedule, from a Zap, or from another app. Choose the Gmail new email trigger. If you want only some emails, filter them with a Gmail label first.
You should now see the trigger at the top of the Configure screen.
Step 5: Give it tools
Tools are the actions your agent may take. Open Insert tools, click + Add tool, choose the app and pick the action. Add two: a Google Sheets action that creates a row, and a Gmail action that creates a draft.
Name and describe tools clearly. Anthropic advises that "Tool definitions and specifications should be given just as much prompt engineering attention as your overall prompts." In plain terms: if a human intern would be confused by the tool, the agent will be too.
Watch out: Give the agent only the tools it needs. "Create draft" is safer than "Send email" while you're learning.
Step 6: Add knowledge and memory
Knowledge sources hold the facts your agent should look up, such as a price list or FAQ. In Zapier, add one from Insert tools under data sources. For the example, a short doc of your standard replies works well.
In n8n, memory is a separate piece. Hostinger's tutorial notes that without a memory sub-node such as Simple Memory, follow-up questions lose context.
Step 7: Test with real examples
Use the test panel on the right of the Configure screen. Paste in your five to ten old emails one at a time and check each result against the answer you expected. Zapier says that testing doesn't consume agent activities, so test freely.
Try this tricky test input:
Subject: Invoice question + can we meet Thursday?
Hi, our invoice #2231 looks double-charged. Could we also grab 20 minutes on Thursday to discuss renewal? Thanks, Priya
You should see one row with a single topic and a high urgency rating. If the agent logs two rows or picks a random topic, add a rule such as "If an email has two topics, pick the one with money involved" and test again.
Step 8: Add guardrails and approvals
Guardrails stop small mistakes from becoming big ones. Anthropic recommends "extensive testing in sandboxed environments, along with the appropriate guardrails." Three easy ones:
- Draft, don't send. Keep a human between the agent and your customers.
- Require approval for risky actions. In ChatGPT workspace agents, write actions default to "Always ask". Leave it that way at first.
- Use a test sheet. Point the agent at a copy of your spreadsheet until you trust it.
Step 9: Publish and monitor
Click Publish to switch the agent on. Then check All activity in the left panel each day for the first week. Zapier's guide says the "Needs action" view shows runs waiting for you, such as missing information or a broken connection.
You should now see a new row in your sheet each time an email arrives. Congratulations: you've created an AI agent.
Example: a complete worked example
Here is the inbox triage agent from start to finish, so you can see it all in one place.
- Job: Sort new emails, log them and draft replies to urgent ones.
- Builder: Zapier Agents, Free plan.
- Trigger: New email in Gmail with the label "Triage".
- Instructions: The prompt from Step 3.
- Tools: Google Sheets (create row) and Gmail (create draft).
- Knowledge: A one-page doc called "Reply snippets" with your standard answers on billing and scheduling.
- Test: Ten old emails, including the two-topic example above. Target: at least nine correct topics.
- Guardrails: Drafts only, a copy of the real sheet for week one.
- Go live: Publish, then check All activity daily.
A run looks like this. An email from a client asking to move a meeting arrives. The agent tags it "meeting request", rates it medium, adds a row with a one-line summary and creates no draft. An angry billing email ten minutes later gets "billing", "high", a row and a polite draft waiting in Gmail. You review the draft and press send yourself.
How far does the free plan go? Each run counts as activity, and the Free plan covers 400 a month. If you get more than about a dozen triage emails a day, narrow the Gmail label or budget for Pro.
Common mistakes and how to fix them
- The job is too big. "Run my inbox" fails; "label and log new emails" works. Split large jobs into several small agents. Zapier lets one agent call another through "Call an agent".
- Vague instructions. "Flag important emails" means nothing to a model. Define what high, medium and low mean, as in Step 3.
- Too many tools. Every extra tool is another way to go wrong. Remove what the job doesn't need.
- No test set. Testing on one email proves little. Keep your ten examples and rerun them after every change.
- Silent failures. Broken app connections stop runs. Check the activity log, and in n8n set up an error workflow; Hostinger notes these fire only on automatic runs, not manual tests.
Tips to get better results
- Give examples inside the prompt. One sample email with the correct row teaches more than a paragraph of rules. Our guide to AI prompt engineering covers this in depth.
- Tell it what to do when unsure. A fallback like "choose other and explain" stops guessing.
- Change one thing at a time. Then rerun your tests so you know what helped.
- Add complexity only when it pays. Anthropic says to add it "only when it demonstrably improves outcomes."
Next steps
Once your first agent runs smoothly, try a second one with a schedule trigger, such as a Monday summary of last week's log. If you work in a team on ChatGPT Business, compare it with a workspace agent, which OpenAI calls "an evolution of GPTs." If you want to code, an AI coding editor helps a lot; see our Cursor review. For the bigger picture, read what AI agents at work mean for jobs, and if the jargon trips you up, start with what an AI model is.
FAQ
How to create AI agents?
Pick one repeatable task, choose a builder such as Zapier Agents, n8n or an SDK, and write clear instructions. Then connect only the tools the agent needs, add a trigger, and test it on five to ten real examples. Keep risky actions behind human approval, publish it, and check its activity log daily at first.
How to make AI?
Most people don't build a model from scratch. Instead you take an existing large language model and shape it with instructions, data and tools. That is what an AI agent builder does. Training your own model needs large datasets, machine learning skills and a lot of computing power, so it rarely makes sense for a first project.
How to create an AI?
For a personal or business assistant, create an AI agent on top of an existing model. Use a no-code tool like Zapier Agents, describe the job in plain English, connect your apps and test. If you code, frameworks such as the OpenAI Agents SDK let you build the same thing inside your own software.
How to build AI agent?
Every agent needs four parts: a model, instructions, tools and a trigger. Memory and knowledge sources are optional extras. Build the simplest version first, test it against real inputs, then add one feature at a time. Anthropic's guidance is to add complexity only when it clearly improves results.
How to make your own AI?
Start with a free no-code builder and a task you already do by hand, like sorting email or summarising notes. Write step-by-step instructions, give it access to one or two apps, and have it draft rather than send. Within an hour you can have your own working AI assistant.
Sources
- Building effective agents (Anthropic)
- Zapier pricing (Zapier)
- Create an agent in Zapier Agents (Zapier Help Center)
- Start an agent from a Zap (Zapier Help Center)
- Zapier Agents guide (Zapier blog)
- How to build an AI agent with n8n (Hostinger)
- Workspace agents (OpenAI Help Center)
- Introducing workspace agents in ChatGPT (OpenAI)
- Introducing AgentKit (OpenAI)



