How to Build Your First AI Agent (Step-by-step Tutorial)

HubSpot Marketing · Beginner ·📣 Digital Marketing & Growth ·1mo ago

Key Takeaways

Provides a step-by-step tutorial on building a first AI agent, covering the basics and frameworks

Full Transcript

Every Monday morning from here on out, our whole YouTube team will get this briefing in our Slack channel. It tells us what competitors dropped that week, what topics are blowing up, what our audience is searching for. Everything we'd want to know walking into the week. Nobody needs to write it, nobody needs to do the research. I just set it up once and it's in the channel before anyone even opens their laptops. [music] That's just one of the many things an AI agent can do. In this one, I just challenged myself to set it up as fast as I could. The final result, just over 6 minutes from start to finish. So, stick around to see how I did it. In this video, we're going to answer every question you should be asking about AI agents right now. And by the end, you'll know exactly whether you need one, where to start, and how to build it. Everything we're talking about today is covered in way more detail in a free guide HubSpot put together. With this playbook, you'll get the practical frameworks and expert insights needed to make AI and your team work better together. I've linked it below, so grab it now and build along with me. All right, let's start with the most uncomfortable question of them all. Is your marketing team breaking? If your answer is, "I'm not sure," that's usually a yes. And here's how to tell. Marketing teams don't fail because they're not creative. They fail because their work is all over the place. Strategy sits in one doc, content lives in another tool, ads run somewhere else, and leads sit in the inbox nobody checks. Every gap between those steps is where speed, quality, and revenue leak out. The old fix was to hire more people or write more SOPs. The 2026 fix is different. You assign each gap to an AI agent that can reason, take action, and hand off cleanly. Here's a shift that matters most. Most marketers approach AI by looking at their to-do list and asking, "What can I automate?" But that's the wrong starting point. Task or individual, outcomes are systemic. And when you start with outcomes, you stop building one-off automations and start building something that compounds. Our good friend Kevin Hudson from Futurepedia said it best, "Stop asking what task can I automate and start asking what system of agents can I build to handle this entire function?" That's the reframe, and it changes everything about how you build. Agents aren't here to replace your team. They fill the gaps your team can focus on the work that actually requires judgment and taste. So, if you feel like you need to hire someone or things keep falling through the cracks, yeah, your marketing is breaking. So, naturally, the next question becomes what actually is an AI agent? A lot of people think copying and pasting into Claude is an AI strategy. It's not. Here's the distinction that actually matters. A chatbot responds to a prompt. You ask, it answers. ChatGPT in its default mode is a chatbot. "Draft me an email" is a chatbot task. And automation follows a fixed script. If this happens, do that. Like an automation that sends a welcome email when someone signs up. The problem with automation is it breaks the moment something unexpected happens. An AI agent is different. It has a goal. It reasons through multiple steps. It uses tools to take action, and it adapts when conditions change. "Send a personalized follow-up to every lead who visited our pricing page twice this week." That's an agent job. Here's the simplest way to think about it. A chatbot answers a question, an automation runs a playbook, and an agent does a job. That distinction shapes everything else in this video, so keep it in mind. So, if you've been relying on chatbots and automations, and wondering why things still fall through the cracks, now you know why. AI agent adoption is accelerating faster than most people realize. And the [music] gap between early movers and everyone else is already opening up. Let's talk about why. The AI agents market nearly doubled this year, and it's on track to hit $50 billion by 2030. That's not a trend, my friend. That's infrastructure. Gartner predicts that by 2028, 60% of brands will use agentic AI to deliver one-to-one customer interactions. They're calling it the end of channel-based marketing as we know it. Right now, more than half of all companies are already using some form of conversational AI. But most of it is still just chatbots answering questions. The teams running actual agents doing multi-step autonomous work still a small group. So, that's the gap. That's the edge. But, I'm going to be honest with you. Gartner also says over 40% of agent projects will be canceled by the end of 2027 because teams rushed in without a plan, without a clear outcome, and without governance. Building the wrong agent is just as expensive as building nothing, which is exactly why the fundamentals matter. So, let's start with the most important one. What's actually inside an AI agent? Every working agent, simple or complex, has the same five building blocks. If any one of these is missing or weak, the whole thing falls apart. The first is the brain. That's the underlying language model doing the reasoning. For most marketing use cases, any other major AI models will do the job. Claude, GPT-5, Gemini, the model matters less than you think. The second is the instructions. This is the system prompt, the job description for your agent, who it is, what it does, what it's allowed to do, and what it must never do. And this is the one that I want you to remember. Weak instructions equal a weak agent. The system prompt is 80% of the quality of what comes out the other end. The third is the tools, what the agent can actually do. Web search, CRM read and write, email send, calendar actions. Without tools, your agent is just a chatbot with a fancy hat. The fourth is the memory, what it remembers. Short-term, this conversation. Long-term, your brand guidelines, product info, customer contacts, and past sessions. And there's a non-negotiable fifth element, a human in the loop. Think of your agent like a new hire, eager, tireless, and never complains, but needs clear instructions and someone checking their work. Any agent that touches money, messaging, or the customer needs a review step in the first 30 days, no exceptions. Use humans for judgment and agents for execution. That's the operating principle for everything we're building today. So, now you know what's inside one. The next question is, which one do you actually build first? Because not all agents are equal, and starting with the wrong one is one of the most common mistakes teams make. So, with that being said, which agents should you build first? We won't start with the flashiest or the most complex ones, but let's start with the agents that cover the three outcomes your marketing team actually needs. Here's the system. Agent one, the intelligence agent. Top of funnel, the outcome is simple. Every Monday morning, your team has a clear briefing on what the market is doing, what competitors launch, and what your audience is actually asking. It monitors your top competitors' blogs, social posts, and content. It tracks trending topics, it surfaces what your audience is asking, and it delivers a plain English briefing to Slack. Just like the example that I showed you earlier. I'll show you exactly how I built it shortly. Agent two, the content production agent. Mid-funnel, once a human approves a topic, one long-form input becomes a full multi-channel content cascade and your brand voice. A blog becomes a LinkedIn post, a next thread, a short script, and an email newsletter, all queued for human review before anything goes live. And agent three, the revenue operations agent. Bottom of funnel, every new lead gets enriched and qualified automatically. It scores them against your ICP, writes a personalized first touch email based on how they came in, and flags the hot ones to a human rep with full context so no one falls through the cracks. Here's how these three chain together. Agent one tells you what to say, agent two turns it into distribution, and agent three converts the demand the first two create. That's the difference between automating tasks and designing a system. So, those are the three agents worth building first. But the next question people ask is, what platform should you build on? Honestly, it matters less than you think. What matters is picking one and shipping something. Here's how to choose based on where you are right now. If you're already on HubSpot Professional or Enterprise, start here. Breeze has pre-built agents for prospecting, content, customer support, and data enrichment, plus over 20 more in the marketplace. And because your CRM, email, and reporting already live in HubSpot, there's basically zero setup overhead. It's the fastest way to your first working agent if you're already in the ecosystem. If you want to build without any code and you're doing research or content-heavy work, Claude is what I'd reach for. You give it persistent knowledge, instructions, and connected tools. Strong reasoning, fast to test, and it's actually what I'm using for the live build today. If you're more of a visual thinker, Gumloop is worth a look. Drag-and-drop workflow builder connects to hundreds of apps and mixes AI steps with regular automation steps. There's a free tier, so you can try before you commit. If you're already on Zapier, Zapier agents lets an AI take over decisions inside your existing Zaps, lead routing, reply drafting, and light operational stuff. This one has a minimal learning curve. And then there's Open Claude. This one's different. It's open source, it runs locally on your machine, and it literally controls your computer the way a human would, clicking through browsers and apps directly. Marketers are interested in this because it unlocks automation for tools that nothing else can touch, legacy CRMs, industry-specific platforms, and internal tools with no API and no integration. But, be careful. A security audit found that over a third of Open Claude's skills had at least one flaw. One of its own maintainers has said publicly, "If you can't run a command line, this isn't safe for you." If any of the tools we just covered do what you need, start there. Open Claude is the one you reach for when you have a specific piece of software that nothing else can connect to. Think of it as a last resort that unlocks the unlockable. So, now you know what to build and what to build it in. The next question is, "How?" I'm going to show you how to build an AI agent step-by-step because it's the easiest first build. And then I'm going to show you just how fast it can be done. Step one, start with the outcome. Before you open anything, write down three things: what information you'll give, what output you want back, and clear boundaries. Basically, what the agent is never allowed to do. For the HubSpot YouTube Intelligence agent, this looked like three competitor URLs as the input, a structured briefing posted to our Slack channel every Monday morning as the output, and the boundary, never send external emails, never post outside the designated channel, and never stores contact data. The most common mistake is opening the platform before you define what you actually want. You'll end up automating a task instead of owning an outcome. Step two, write the instructions. Structure your system prompt using this robot framework. Role, objective, boundaries, output, tone. Every great agent prompt has all five. Every line in that prompt is doing a job. The more specific you are here, the better the result. If vague instructions equal vague output, every time. Step three, choose your platform and connect the tools. This is where you choose what you're building in and what it's going to connect to. We're using Claude. It's what the HubSpot marketing team uses day-to-day. It's built exactly for this kind of research and content work, and the connector setup is straightforward. Whatever platform you choose, one of the first things you want to look at is what it can actually connect to. Every agent platform has a list of integrations or tools it can use to take actions in the real world. These are what turn a chat window into something that actually does work. For this agent, we need two. Web search, it's built in. Just toggle it on so it pulls live competitor data every week. And Slack, so it posts a briefing directly to our channel. Once those are connected, the agent can research and deliver. If you want to run it automatically every Monday without touching it, you'd add a Zapier schedule on top, but that's optional and a separate five-minute setup on their website. Step four, feed it memory. This is what separates a generic bot from one that actually understands your business. Instead of starting from scratch every time, you give it context about who you are, who you serve, and what good looks like for you. In Claude, you add knowledge documents directly to the project. I just included some text with context about our channel, like our audience description, our competitor list, our content pillars, and our goal. But yours might look different. If you're an e-commerce brand, it's your product catalog and customer personas. If you're a B2B company, it's your ICP and your positioning doc. And if you're an agency, it's your client brief. Whatever it is, upload it. The more context [music] it has, the more it sounds like your team. Step five, test it, break it, fix it. Run it three to five times. Every time it produces something off brand or surface level, don't make the mistake of giving up. Go back to the system prompt and tighten it. That's how you fine-tune it. Every time you get something wrong, write it down. That's your fix list. Step six, add a human in the loop for the first 30 days. Review every output before it goes anywhere. After 30 days, if it's consistently solid, loosen the review and let it run. Skip this and you risk a weird auto reply going to 4,000 leads. It happens. In step seven, measure it with these two questions. Is it saving you at least two hours a week? Is the output better than what you produce manually? If both are yes, expand it. If either is a no, go back and rebuild it. Don't let dead agents live in your stack. So, that's the full build, the logic, the prompt, the platform, the tools, the setup. Now, the question I actually wanted to answer was, how fast can you do all of this once you know what you're doing? So, I challenged myself. Okay, timer's running. Let's go. I've just opened up Claude and the first thing I'll do is create a new project. I'll call this one HubSpot Marketing Intelligence Agent. Now, this is the agent's home. Everything I add here stays connected. Next up, the instructions. This is the job description. I'm going to paste the one I built using the Robot Framework. And keep in mind I'm not typing this from scratch. I wrote it beforehand. In a normal scenario, you'd spend some time writing this, but once it's done, you're good to go. All right, now memory. I'm adding our channel context that I wrote previously. This is what makes it sound like our team. All right, now for the tools. There's just two of them. Web search, make sure that's toggled on so it pulls live data, and Slack so it posts directly to our channel. Okay, everything's connected. Now, let's test it. And now we wait. Watch what happens. It's searching our competitors, pulling live data, and writing the briefing in the exact format we defined. It's going to take a few seconds, so we're going to speed this up. There it is. Now, let's go over to Slack. Briefing in the channel, competitor moves, trending topics, one content opportunity, and one audience signal. Everything we need walking into the week. 6 minutes and 19 seconds. Project prompt memory tools done. And once I set up a schedule on Zapier, it'll run automatically every Monday morning without me touching it. All right, now it's your turn. Pause this, follow the steps from the last section, set a timer, and drop your time in the comments. I want to see how fast you can do it. AI agents aren't a future prediction. They're happening now, and 2026 [music] is the year every marketing team shifts their first one. But don't try to build everything at once. Start with one gap, the workflow that costs your team the most time every week. That's your first agent. The teams building agent systems right now will have a compounding advantage over the ones who wait. As Kevin Hudson puts it, the bottleneck stops being how many hours you can work. It becomes how well you can direct the agents doing the work. If you want to go deeper on any of this, I highly recommend checking out the free guide link below. It's put together by some of the best in the business. You'll get data, frameworks, templates, and decision tools to help you build and scale your first agent. If this video helped in any way, give it a like to let us know, and make sure to share it with your team so everyone is on the same page. For more helpful marketing content and resources, make sure to subscribe to HubSpot Marketing for weekly videos that help you stay ahead of the curve. My name is Carl. Thanks for hanging with me, and I'll see you on the next one. >> [snorts]

Original Description

Learn how to build AI agents for beginners, which ones to start with, and watch a live step-by-step build completed in 6 minutes. *Get the free Guide to AI Agents — the frameworks and templates you need to build and scale your first AI agent:* 🔗https://clickhubspot.com/90r0 AI agents are changing how marketing teams operate in 2026 — and in this AI agents tutorial, you'll learn exactly what they are, why they work, and how to build your first AI agent in 6 minutes. Whether you're a marketer, entrepreneur, or looking to make an AI agent for small business, this is the guide you need to stop automating tasks and start building systems that compound. In this video, you'll learn: -What is a chatbot vs an AI agent (AI agents explained) -Why the AI agents market is racing toward $50B by 2030 — and what it means for your team -The 5 building blocks inside every working agent -The 3 agents every marketing team should build first (Intelligence, Content, Revenue Ops) -Which platform to build on based on your current stack -A live, step-by-step build of a Marketing Intelligence Agent 0:00 Building Your First AI Agent 1:00 Is Your Marketing Team Breaking? 2:13 What is an AI Agent? 3:20 Why Everyone Is Building AI Agents? 3:14 What's Inside an AI Agent (5 Building Blocks) 5:47 Which AI Agents Should You Build First? 7:15 What Platform Should You Use? 9:06 How to Build an AI Agent Step by Step 12:22 Live Build Challenge Subscribe for more HubSpot 🔗 https://clickhubspot.com/t90m 📙 FREE Certification Courses Digital Marketing Certification: 👉 https://clickhubspot.com/od6 Social Media Marketing Course: 👉 https://clickhubspot.com/Social-Media-Certification SEO Training Course: 👉 https://clickhubspot.com/SEO-Training-Course Email Marketing Course: 👉 https://clickhubspot.com/Email-Marketing-Certification About HubSpot HubSpot is a customer platform that provides education, software, and support to help businesses grow better. The platform includes marketing, sales, se
Watch on YouTube ↗ (saves to browser)
Sign in to unlock AI tutor explanation · ⚡30

Related Reads

📰
From Anomaly to Action: Generating Win-Back Drafts from Behavioral Signals
Learn how to generate win-back drafts from behavioral signals using a rules engine and draft template structure, and discover how to apply this to project management SaaS and micro SaaS campaigns
Dev.to AI
📰
Google Meet Replacement in 2026: What to Consider Before Switching
Learn what to consider before switching from Google Meet to an alternative in 2026, especially for teams needing AI features
Dev.to AI
📰
How to Use ChatGPT for Your Small Business: 15 Practical Ways to Save Time and Grow
Discover 15 practical ways to use ChatGPT for your small business to save time and drive growth
Medium · ChatGPT
📰
The Most Reliable $1,000/Month Skill I Know
Learn about a reliable skill that can generate $1,000/month, and why it matters for career growth and financial stability
Medium · SEO

Chapters (9)

Building Your First AI Agent
1:00 Is Your Marketing Team Breaking?
2:13 What is an AI Agent?
3:20 Why Everyone Is Building AI Agents?
3:14 What's Inside an AI Agent (5 Building Blocks)
5:47 Which AI Agents Should You Build First?
7:15 What Platform Should You Use?
9:06 How to Build an AI Agent Step by Step
12:22 Live Build Challenge
Up next
Unlock Website Growth with Semrush MCP #shorts
Income stream surfers
Watch →