Constructing an AI agent is a multi-step course of. Entrepreneurs have to outline the agent’s process, join accredited information and instruments, and set limits on its actions. As soon as they grasp the fundamentals, anybody — entrepreneurs, gross sales reps, or buyer groups — can construct brokers with ease.
Right this moment, AI agent adoption is rising. A 2026 survey of 5,000 U.S. adults from Menlo Ventures discovered that one in four AI users has used an agent, with 24% of respondents citing common use.
To profit from the tech, groups want to seek out the best use instances and begin experimenting. This publish covers the best way to construct an AI agent for these simply getting began. Uncover the best way to deploy, take a look at, enhance, and set guardrails on your first AI agent.
What’s an AI agent?
An AI agent is software program that makes use of an AI mannequin to work towards a aim autonomously, or without human input. Agents can choose among approved tools, review the results, and decide what to do next until they finish the task or reach a set limit.
Agents need pre-defined goals or functions. For a marketing team, that could be to review a campaign’s performance and recommend optimizations. The agent would need to examine channel metrics, compare results with the campaign objective, identify likely causes, and explain the recommended change.
Looking to build your first agent? HubSpot users now have access to a no-code AI agent builder. Marketers can describe the automation they want to create, and Agent Builder will do the remainder.
AI Agent vs. Chatbot vs. Guidelines-Based mostly Automation: Explaining the Distinction
Brokers, chatbots, and workflows have completely different problem-solving capabilities and serve completely different features:
- Chatbots reply to queries or conversations, answering questions that the consumer inputs.
- Brokers are capable of make selections on their very own and problem-solve independently.
- Rule-based automations carry out a predefined process primarily based on a set set off. For instance, if a purchaser adjustments deal phases, an e mail could also be despatched with a reduction code.
Brokers, chatbots, and automations may work collectively. A chatbot, for instance, can act because the dialog window for an agent, in addition to a predefined workflow may embrace an agentic step
The 4 Constructing Blocks of an AI Agent
An efficient customized AI agent wants a repeatable job, related information, a transparent start line, and a measurable outcome, as outlined by Elle Oshiro, a professor at HubSpot Academy. These 4 constructing blocks assist entrepreneurs flip an concept right into a workflow they will put to make use of.
1. Repeatable Work
AI brokers excel at common duties that must be carried out constantly. For instance, a advertising and marketing crew may evaluate misplaced offers every month to determine purchaser issues. Though every deal accommodates completely different proof, the agent’s job stays the identical: study the priority, verify present belongings, and advocate a subsequent step.
That stated, select a process that the crew can describe clearly and expects to carry out time and again.
2. Information Already in Your CRM
AI agent improvement depends on high-quality coaching information. CRM information offers the AI context it might probably use to make selections. Related info may embrace deal properties, firm particulars, gross sales notes, and recorded buyer conversations.
Earlier than constructing an agent, verify whether or not the required info exists, is present, and is accessible to the agent.
3. A Set off That Fires Below the Proper Circumstances
A set off determines when the agent begins its work. It could possibly be a guide request, a schedule, or a change to a CRM report. With HubSpot, entrepreneurs and gross sales ops can use any of those choices by means of Agent Hub workflow triggers.
4. A Clearly Outlined, Measurable Final result
Outline what the agent should ship, what an accurate outcome appears like, and the way the crew will measure success. For a marketing campaign evaluate, the output could possibly be a report that flags underperforming channels and recommends one change to check. Every advice ought to cite the related metrics, clarify the rationale, and acknowledge information gaps.
Is an AI agent the best match on your workflow?
AI brokers are price a more in-depth look when a process is repeatable, tedious, and requires decoding info and deciding what to do subsequent. If all you want is a abstract of textual content or information evaluation you paste right into a chat, a single AI immediate could do the job. Even Anthropic recommends beginning with the only strategy that meets the necessity, since brokers can add price and delay.
Three inquiries to ask earlier than you construct:
- The place does the duty require judgment?
- Can the agent entry sufficient info to do the job?
- Will it save work after human evaluate?
When Guidelines-Based mostly Automation is Higher
Select rules-based automation when the subsequent steps are clear. Automations work nicely when outcomes observe one or a number of outlined branches. Every step of the method ought to observe a call tree that the crew can outline upfront and automate.
Widespread examples for rule-based automation embrace:
- Assigning a result in a regional crew primarily based on its nation subject
- Making a follow-up process after a demo request
- Notifying an account proprietor when a renewal date approaches
- Excluding unsubscribed contacts from a promotional e mail viewers
Even a fancy lead-routing course of can work nicely with rules-based automation. A workflow may verify territory, firm measurement, and product curiosity, then assign the result in an eligible rep. If no person accepts a lead inside a set interval, it might probably alert a supervisor or reassign the contact.
The best way to Construct an AI Agent With out Code
For groups studying the best way to arrange an AI agent, begin with a transparent aim. Outline what an agent has to do and its output. Then, write clear directions for the agent and take a look at it earlier than full deployment.
Seeking to create a customized agent? HubSpot now gives an AI agent builder. Simply describe your mission in plain language, and Agent Builder will do the remainder. HubSpot customers even have entry to pre-built brokers that may assist with duties like data management or prospecting.

Outline a slender aim and success standards.
First, write down the guide process you need the agent to take over. For instance, evaluate misplaced offers and advocate content material that addresses consumers’ unanswered questions.
Earlier than you open the Agent Builder, put collectively a brief temporary for the duty. That clarification ought to cowl the agent’s aim, scope, and what you hope it delivers. See an instance beneath.
- Aim: Assist entrepreneurs determine content material wants from documented purchaser issues.
- Scope: One chosen closed-lost deal and an accredited content material catalog.
- Deliverable: A brief temporary with the priority, supporting proof, and a advice to reuse, replace, or create content material.
- Reviewer: A marketer who checks the advice earlier than anybody acts on it.
Notice: Give your first agent entry to only one deal, so reviewers have a manageable set of information when high quality assessing the agent’s work.
Subsequent, outline your success standards, or the checks you’ll use to guage whether or not the agent accomplished the duty appropriately. For this instance, right here’s what success appears like:
- Every purchaser concern has a supply reference you may confirm.
- Any really useful present asset seems within the accredited catalog and addresses the priority.
- A proposed content material temporary states the customer’s query and what the content material ought to clarify.
- The agent flags lacking proof or issues that content material can’t clear up.
- Embrace instances the place no content material advice is acceptable
Write clear directions.
Studying the best way to prepare an AI agent? Begin by turning your notes into clear directions the agent can observe. Clarify how the agent ought to study the proof, select a advice, and deal with lacking info.
For entrepreneurs utilizing HubSpot, open the chosen agent in Agent Builder and evaluate its present directions. Replace the Instructions field to mirror the duty you outlined. Cowl the position, aim, strategy, and anticipated output.

Right here’s a place to begin for our instance. Discover how these directions clarify what to do in several conditions:
Position and aim: You assist entrepreneurs determine content material wants from one chosen closed-lost deal.
Method: Learn the accessible deal particulars and related related information. Establish a documented purchaser concern, then evaluate it with the accredited content material catalog. Distinguish direct purchaser suggestions from a salesman’s interpretation.
Suggest an present asset when it solutions the customer’s query. If an asset solely partly solutions it, specify what wants an replace. Suggest new content material solely when the equipped catalog lacks an appropriate asset.
Lacking proof: If the information don’t help a conclusion, clarify what info is lacking. If content material can’t tackle the priority, state why. Don’t assume that lacking content material precipitated the deal loss. A request for an unsupported integration needs to be flagged as a product limitation.”
Output: Return a brief temporary with 4 sections: Purchaser concern, Supporting sources, Content material advice, and Data gaps.
Add instruments and permissions.
Relying on the job, an agent may want to look the net, retrieve CRM information, or replace buyer info. It might additionally want connectors to achieve different apps, resembling Zoom, Appcues, or Google Docs. For our lost-deal evaluate, the setup is straightforward: the agent solely must retrieve related CRM info and evaluate it with accredited advertising and marketing content material.
In Agent Builder, use Data for reusable reference materials and Inputs for info that adjustments with every run, such because the buyer or deal to evaluate. For instance, a service agent may reference your help insurance policies whereas reviewing a specific buyer’s problem.
Agent Builder lets customers create a knowledge vault supporting photos, web site pages, weblog articles, and uploaded paperwork, together with spreadsheets, PowerPoints, and PDFs.

With HubSpot, groups may set AI context for brokers. With Context stuffed out, AI will know just about all the things about you and your corporation.

Groups should additionally determine who can use an agent and who has the power to edit it. Agent Builder permits customers to designate who on the crew has permission.
Check with consultant situations.
Attempt the agent on information you perceive nicely sufficient to guage its reply. Examine that the agent reviewed the meant deal or metrics, used the accredited references, and supported its advice. Remember to vet the cited materials your self.
Professional tip: Check runs in Agent Builder don’t price further credit. Repeat testing till the output is constant and meets your necessities.

Examine the time wanted to verify and proper the agent’s consequence with the time wanted to do the duty manually. A helpful agent ought to produce dependable work and save the crew some effort.
Iterate on scope and directions.
A failing take a look at isn’t essentially a failure! It’s a possibility to determine what wants fixing. This is a chance to revise directions and retool prompting. Change one factor at a time, then rerun the failed instance and a beforehand profitable one. This helps groups see whether or not the change mounted the issue with out creating one other.
Check, Consider, and Enhance
After an agent is constructed, ongoing analysis helps groups determine whether or not it really works correctly and delivers worth. Groups ought to evaluate brokers after their directions are edited and when instruments, permissions, fashions, or related information sources change. Schedule month-to-month opinions and run a take a look at after a reported error.
Construct a sensible take a look at set.
A take a look at set is a group of examples of the work an agent sometimes handles, resembling analyzing closed-lost offers. On this case, every closed-lost deal counts as one instance within the take a look at set.
Hold the take a look at set in a spreadsheet so you may evaluate what you anticipated with what occurred. Analyze every instance earlier than working an agent. Fill in your expectations within the spreadsheet. Subsequent, run every deal by means of the agent and rating its output.

Professional tip: Run chosen instances a number of occasions. Mannequin outputs can range between makes an attempt.
Assessment failures and edge instances.
Hold a failure log within the take a look at sheet. For every drawback, add a column for “reviewer notes” and clarify what went incorrect and what wants checking. Be extraordinarily particular about errors. Subsequent, group comparable failures, examine the trigger, and apply the suitable repair. Rerun the affected instances after adjustments are made. Document the change and the brand new outcome alongside the unique so you may evaluate them.
Widespread agentic failures and fixes are as follows:
- Outdated solutions. Examine which supply an agent used. Substitute out of date paperwork or take away them from its accredited references.
- Lacking info. Examine whether or not the required supply is related and accessible. If the data doesn’t exist, instruct an agent to request it or flag the hole.
- Unsuitable report or recipient. Examine the enter handed to an agent and the way it identifies its goal. Use a singular report ID.
- Unsupported conclusions. Require supporting proof and clarify when an agent ought to depart a query unanswered.
- Undesirable actions. Take away pointless instruments or limit their permissions. Require human approval for consequential adjustments.
Observe success metrics.
Use the take a look at spreadsheet to measure whether or not an agent completes helpful work and reduces the hassle your crew spends on it. Add columns for Assessment time, Corrections wanted, Run price, and Agent model.
After every take a look at, report how lengthy you spent checking and correcting the outcome. Enter the run price if accessible. Then summarize these measures in a separate tab, calculating process success price, correction price, human time spent, and value per profitable process.
Examine human time with the time wanted to finish comparable duties manually. For instance, if getting ready a buyer handoff takes 20 minutes manually and eight minutes with an agent, that’s 12 minutes saved — offered the outcome meets the identical high quality necessities.
Add guardrails and human handoff.
AI guardrails outline what the agent could deal with, what information it shouldn’t contact, and when an individual ought to take over. Set these guidelines earlier than launch to cut back the danger of unauthorized actions, information publicity, and malicious directions hidden in prompts or supply materials.
Right here’s how groups ought to strategy setting guardrails:
- Outline the job’s boundaries within the agent’s directions, together with the best way to deal with unrelated requests and directions present in supply materials.
- Restrict the agent’s instruments and permissions to what the job requires.
- Implement entry restrictions by means of the related apps’ controls.
- Share solely crucial personal info and limit who can view the output.
- Specify when the agent should cease and who ought to take over.
- Require a certified individual’s approval earlier than delicate or high-impact actions, enforced by means of the workflow or instrument.
- Check the whole handoff.
Agent Builder permits groups to set guardrails throughout 4 dimensions: directions, actions, information vault, and permissions. Construct secure brokers for advertising and marketing and gross sales functions by means of Agent Hub.
Select the primary deployment floor.
A deployment floor is the place folks use an agent or obtain its work. An inside inbox, a CRM workflow, and a customer-facing chat fall below completely different deployment surfaces. Select one floor that your agent helps.
Subsequent, outline the best way to run the agent primarily based on the next classes.
- On demand: An individual decides when to start out the duty and provides the inputs.
- Occasion-triggered workflow: The duty ought to begin when one thing occurs, resembling a type submission or report replace.
- Scheduled workflow: The duty ought to run at a set time or interval.
For any workflow, outline the beginning situation, the inputs handed to the agent, and the place its outcomes go. With Agent Hub, groups can move and connect workflow actions and brokers with out breaking the general logic.

Full the preflight verify.
Earlier than publishing an agent, look by means of its setup with meant customers. Examine for:
- Directions, instruments, and reference materials are appropriate.
- Pilot customers can full the job, and reviewers can open its output and supporting sources.
- The beginning situations are met (information, triggers, occasions).
- Credit score utilization per run and a month-to-month run restrict are set.
- A certified individual owns the evaluate.
- There’s a fallback (determine who completes the duty manually if an agent fails).
As soon as the checks are full, save and publish the agent model.
Monitor the primary dwell run.
Run a small pilot first, and evaluate each preliminary outcome. Comply with every process from starting to finish. In Agent Hub, groups can filter for the agent and examine its runs. Customers can verify the standing, output, sources, and estimated credit.
A Success standing means the run accomplished with out an execution error. A human nonetheless wants to guage whether or not the agent’s reply is helpful and correct.

The workflow’s Run history helps groups examine whether or not the workflow began and the place an execution failed. If a significant issue creeps in, pause the workflow, determine affected runs, and use the guide fallback whilst you repair and retest the workflow.
AI Agent Use Instances for Advertising, Gross sales, and Service
Marketing Use Case: Spot Influenced Deals Through Cross-References to LinkedIn Engagement
Not everyone who sees a LinkedIn ad clicks. But, that exposure may still influence a deal. Filippo Irdi, a senior demand advertising and marketing supervisor at Unmuted, constructed an agent that cross-references LinkedIn advert impression information with HubSpot closed-won offers to determine that affect. I requested Filippo to stroll me by means of a detailed agent setup.
Right here’s how one can recreate his work.
1. Pull LinkedIn impression information.
Utilizing the LinkedIn API, pull impression information week by week for a selected timeframe. The info exhibits which corporations have been served your advertisements and what number of impressions they obtained. LinkedIn doesn’t present granular company-level impression information. Weekly information is sufficient to determine helpful patterns.

2. Match it with HubSpot offers.
“For a similar timeframe — for instance, the final six months — pull deal information from HubSpot. For every deal, seize the corporate, when the deal was created, when it modified phases, and when it closed. Then match the 2 datasets,” Irdi suggests.
From there, now you can see whether or not an organization was uncovered to LinkedIn advertisements earlier than getting into the gross sales pipeline or closing a deal. Use the next configurations to tug the offers.

3. Construct a timeline.
Outcomes can be returned in two tables. I like to recommend reformatting outcomes right into a timeline that’s simpler to know. Entrepreneurs can then view the timeline by week or month, making it simpler to see the connection between advert publicity and gross sales exercise. That is what Irdi’s timeline appears like.

4. Automate the evaluation.
Utilizing LinkedIn and HubSpot MCPs, an agent can deal with this course of by pulling each datasets, matching corporations, and producing the timeline routinely.
“I run the agent each month to have a repeatable option to determine overlap between LinkedIn advert publicity and closed offers, even when these clients by no means clicked an advert,” shares Filippo.
A Few Agent Guardrails to Get You Began
Earlier than Pulling Information
- Don’t question something till the advert account, precise date vary, time granularity, and output format are outlined.
- Don’t interpret obscure intervals resembling “Q3” or “final quarter.” Convert them to specific dates and make sure them.
- Present the anticipated API price of month-to-month vs. weekly granularity earlier than working the evaluation.
Time Intervals
- Outline the whole time grid earlier than pulling information.
- Mark partial weeks or months explicitly.
- Hold LinkedIn publicity bucketed by week/month, however preserve deal shut dates on their precise dates.
LinkedIn Information
- By no means use solely at present energetic campaigns for historic evaluation.
- By no means reuse one interval’s marketing campaign listing for one more interval.
- If company-level information comes again empty however marketing campaign efficiency exhibits impressions, deal with it as a probable campaign-selection drawback—not “no information.”
- Protect LinkedIn group IDs for deduplication.
HubSpot Information
- Retrieve the HubSpot portal timezone earlier than processing shut dates.
- Establish closed-won offers utilizing hs_is_closed_won, not hardcoded stage IDs.
- Use home-currency values when calculating totals throughout currencies.
Gross sales Use Case: An AI Gross sales Compensation Agent
Fee disputes not often stem from a single dangerous month. They arrive from reps not having the ability to see the mathematics. AI can assist.
Pushed, a gross sales fee platform, constructed an agent for HubSpot that takes a query or a planning doc. The agent opinions Pushed’s compensation information and returns an evidence grounded in particular offers and targets.
Andres De Jonge, co-founder at Driven, explains how the agent works.
- How reps use the agent: A rep asks, “Why is my payout decrease this month?” The agent pulls their payout, the credited offers, and quota attainment. It then explains the hole, for instance: “Two offers slipped to the subsequent interval, and attainment dropped beneath the 100% accelerator threshold.”

- How admins use the agent: An admin pastes a rule, uploads a plan PDF or Excel file, or selects CRM fields. The agent interprets it right into a structured draft plan, together with formulation, tiers, quota references, and filters. It additionally runs a preview in opposition to actual historic offers.

Inputs for this agent are natural-language questions, plan paperwork (PDF, Phrase, Excel), and CRM subject picks from HubSpot or Salesforce, synced into Pushed’s database. Outputs are payout explanations with linked offers, variance breakdowns between intervals, and draft plan configurations with calculation previews.
For those who attempt replicating this agent, it’s possible you’ll encounter a bump for the reason that agent mannequin by no means does the mathematics. Payouts are calculated by Pushed’s formulation engine with decimal.js for financial-grade rounding. The agent’s job is to fetch the calculation hint and clarify it, or to suggest a configuration that the engine then executes.
Service Use Case: Discover Recurring Assist Points With HubSpot and ChatGPT
Your help crew could reply the identical query dozens of occasions with out realizing how usually it comes up. Connecting HubSpot to ChatGPT enables you to examine recurring ticket subjects and determine which problem deserves higher documentation or a more in-depth look from the product crew.
Right here’s the way it works.
1. Join HubSpot to ChatGPT.
Ask your HubSpot Super Admin to approve the connector and grant entry to the ticket information you’ll evaluate. Then, in ChatGPT, open Settings > Apps > HubSpot > Join. Comply with the prompts to pick your HubSpot account and authorize the connection.
2. Select the tickets to analyze.
Begin with one help pipeline and an actual date vary. Open Deep analysis in ChatGPT and allow HubSpot below Apps. Then adapt this immediate:
Assessment HubSpot tickets created in [pipeline name] between [start date] and [end date]. Use the ticket names and descriptions you may entry. Group tickets by the underlying buyer drawback, depend every group, and hyperlink to supporting tickets. Hold unclear instances separate. State what number of tickets you analyzed and any retrieval limits. Don’t change information.
3. Flip the findings into suggestions.
As soon as the report is prepared, ask:
For the three largest teams, advocate what the service crew ought to examine subsequent. Distinguish questions which may profit from clearer directions from reported product issues. Clarify your reasoning utilizing linked tickets. Flag the place the proof is inadequate.
Deal with these as recommendations for evaluate. Bear in mind, seeing a symptom doesn’t set up its trigger.
4. Examine the proof and assign the subsequent step.
Open the linked tickets and verify that they belong of their teams. Examine the reported whole with the identical filters in HubSpot. Then, examine any mismatch earlier than presenting the findings as an entire image.
From there, give an accredited advice to the suitable proprietor. The deliverable is a brief, sourced problem report. Choose its usefulness by whether or not the groupings are correct, if the suggestions survive evaluate, and if the method takes much less time than your guide evaluate.
When to Think about Fashions, Protocols, or A number of Brokers
Your first agent is up and working. As you give it extra work, it’s possible you’ll discover breaking factors. Earlier than including complexity, determine when the system breaks. That can aid you determine whether or not to alter the mannequin, join one other instrument, or divide the work amongst brokers.
Selecting a Mannequin
The mannequin is the precise AI program that interprets directions, evaluates info, and chooses the agent’s subsequent step. Its capabilities have an effect on the standard, velocity, and value of the work. Examples embrace fashions from OpenAI’s GPT, Anthropic’s Claude, and Google’s Gemini.
The instruments you utilize could have a default AI mannequin. In case your platform enables you to select fashions, evaluate outputs utilizing the identical take a look at instances. Decide the least costly possibility that meets high quality and response-time necessities.
What Agent Protocols Imply
A protocol is how software program exchanges requests and outcomes. For brokers, there are two protocols:
- Model Context Protocol (MCP). This connects AI functions to instruments and information sources. For instance, an agent may use an MCP connection to look an accredited doc library.
- Agent2Agent (A2A). This permits impartial brokers to change duties and outcomes, together with brokers constructed on completely different platforms.
In Agent Hub, groups can join exterior instruments to HubSpot by means of MCP. This lets brokers entry dwell enterprise information and take motion throughout supported functions with out customized integrations or code.
When A number of Brokers Make Sense
A multi-agent setup divides work amongst brokers with separate tasks. One may collect analysis, whereas one other makes use of that analysis to organize a quick. Bear in mind: extra brokers imply extra outputs and handoffs to verify. Add an agent solely when the advance in high quality or velocity justifies the additional price and upkeep.
Think about splitting the work amongst brokers when:
- Totally different duties want distinct instruments, directions, or entry permissions.
- Impartial analysis duties may run on the identical time.
- Testing exhibits that one agent repeatedly mixes up tasks regardless of a transparent, slender setup.
Professional tip: At all times evaluate the mixed outcome together with your single-agent setup utilizing the identical exams.
Continuously Requested Questions About The best way to Construct an AI Agent
Do I want a developer to construct my first agent?
No, builders usually are not crucial when constructing AI brokers. Usher in a developer when the duty requires a customized integration or controls that your builder doesn’t help. You’ll be able to construct dozens of promoting, social media, and sales agents in a no-code builder like HubSpot Agent Builder.
How do I enhance an AI agent with out coaching a mannequin?
Use failed exams to determine what wants altering. That will embrace unclear directions, lacking reference materials, incorrect inputs, or unsuitable instruments. Repair the related half and rerun your take a look at set.
How ought to I deal with delicate actions like refunds or information deletion?
Set AI guardrails for high-impact actions. Have the agent put together the proposed motion for a certified individual to evaluate. Present precisely what would occur, together with the client, quantity, or information affected. Implement approval by means of the workflow or related instrument, and preserve execution blocked till approval arrives.
When ought to I transfer from one agent to a number of brokers?
Construct multi-agent programs when testing exhibits a transparent profit from separating tasks. For instance, completely different duties may want separate entry permissions. For those who add one other agent, outline what every one receives and returns, then evaluate high quality, velocity, and whole price together with your authentic setup.
What information can a no-code AI agent use?
Entry relies on every builder, its supported connections, and the permissions you grant. Widespread sources embrace CRM information, uploaded paperwork, assist articles, spreadsheets, and data equipped with every request. HubSpot’s knowledge vaults help recordsdata, photos, chosen HubSpot content material, and CRM segments.
Begin with one agent your crew can depend on.
When constructing your first agent, begin with one process your crew is aware of nicely. Give the agent the data and instruments it wants, then take a look at its work in opposition to clear expectations. And, earlier than you scale an agent, evaluate outcomes rigorously.
Already a HubSpot consumer? Agent Builder enables you to create brokers in plain language, no coding required. So get began, and see what you may construct.

