Resources
Back
featured Customer

Saved 100s of hours of manual processes when predicting game viewership when using Domo’s automated dataflow engine.

Watch the video
About
Back
Awards
Recognized as a Leader for
29 consecutive quarters
Spring 2025 Leader in Embedded BI, Analytics Platforms, Business Intelligence, and ELT Tools
Pricing
report
No items found.

Heading

This is some text inside of a div block.
No items found.

How to Build an AI Agent

Haziqa Sajid

Data Scientist and Content Writer

16 min. read
Wednesday, June 4, 2025

Imagine your part of a marketing team struggling to keep up with the overwhelming amount of disorganized and disconnected data you have to handle, your data arriving from various sources, like social media, email campaigns, and customer feedback. Your team labors for hours going over the numbers, manually generating reports, and trying to make sense of it all to inform the next campaign.  

As deadlines loom and pressure mounts, time slips away on repetitive tasks. 

But what if we could automate all these tasks, allowing your team to focus on creative strategy and innovation? 

This is where AI agents come in. 

According to a report from PwC, businesses that adopt AI-driven automation see 20-to-30 percent gains in productivity, with AI agents leading the charge in transforming workflows. Furthermore, 82 percent of organizations plan to integrate AI agents within the next 1 to 3 years, aiming to enhance automation and efficiency. 

While traditional automation tools follow pre-set rules, AI agents can learn, adapt, and make real-time decisions. They act as intelligent assistants managing complex, multi-step tasks without constant human guidance. 

In this guide, we’ll walk you through everything you need to know about building an AI agent. We’ll break down the components and help you create your very first AI agent using Domo

(If you're ready, you can jump ahead to the step-by-step tutorial).

What are AI agents? 

Let’s start by understanding what AI agents are and why they are being called the next big step in automation. AI agents are software systems that independently complete complex tasks based on defined goals and the data they process. They combine perception, reasoning, and action, powered by machine learning technologies, especially natural language processing (NLP) models and various integrated tools. 

In many ways, AI agents mimic our human workflows. For example, if you have an agent designed to produce meeting minutes, it would generally follow a process similar to what you would do. First, it would accept input, such as a meeting transcript, then understand context by identifying who said what, reason through the information by extracting action items, and finally act by sending a summary email. This ability to both understand and execute makes AI agents far more potent than traditional automation tools. 

General workflow of an AI agent | Source 

AI agents come in different forms depending on their level of autonomy and the complexity of tasks they handle.  

Here are some common types of AI agents: 

Reactive agents

These agents operate on condition-action rules. They respond to immediate inputs without storing past interactions. 

  • Example: A customer service chatbot that answers FAQs by analyzing a user’s query and pulling responses from a knowledge base. It doesn’t “remember” prior chats but provides instant, relevant replies. 

Deliberative agents 

These agents use memory and reasoning to plan actions for a specific goal. They analyze past interactions and data to make decisions involving multiple steps. 

  • Example: An AI agent that performs everyday tasks such as managing emails and scheduling appointments. It checks calendars, proposes times, and sends invites, while also learning from feedback to avoid conflicts. 

Learning agents 

They can learn from experiences and improve their performance over time. They also have the ability to adapt to new situations and optimize their behavior by incorporating feedback. 

  • Example: An AI agent that optimizes marketing campaigns by analyzing performance data, adjusting ad spend, and personalizing content based on user engagement trends. 

Conventional ML vs LLMs vs AI agents 

To understand the value of AI agents, it is helpful to see how they differ from earlier waves of artificial intelligence, conventional machine learning (ML), and large language models (LLMs). While they aim to make data-based decisions, they vary significantly in how they process information and generate outcomes. 

These approaches represent key stages in the evolution of AI: 

Conventional machine learning 

ML models are deterministic, meaning they consistently produce the same output for a given input against a specific task. They are trained on large data sets to recognize patterns and make predictions, but they do not make decisions or take actions on their own. 

LLMs 

LLMs, such as GPT or Claude, have a non-deterministic nature; their outputs can vary even for the same input. They are trained on large amounts of text data and excel in understanding context, generating human-like text, and reasoning across topics. However, LLMs are typically passive; they generate responses based on prompts but cannot inherently interact independently with external systems or perform actions based on their generated text. 

AI agents 

AI agents use the reasoning and language understanding capabilities of LLMs but integrate this with additional components that help them execute actions using tools. They interpret a goal automatically, break it down into steps, determine which actions are needed, and then use connected tools like APIs, databases, or other software to perform those actions. 

Why agents are simply intelligent workflows 

When we talk about AI agents performing complex tasks and making decisions, it may seem abstract. However, they are fundamentally goal-oriented systems that execute a sequence of tasks to achieve a desired outcome. 

Traditional workflows consist of a sequence of predefined steps with a final objective, like routing an invoice for approval. These workflows are rule-based and static, following a linear path, regardless of changing context. 

AI agents follow the same concept of sequential task execution, but with a critical difference: they are context-aware and flexible. The agent can evaluate the results of an action, incorporate new information it perceives, and adjust its plan or the next steps in real time to stay on track toward its goal. 

Payroll processing AI agent | Source 

The execution of the tasks might vary depending on the objective and the data. Still, the overall process remains a structured sequence of steps initiated and managed by the agent’s intelligence. 

Now that we understand AI agents and their types, what exactly makes up an AI agent? Let’s explore the key components of AI agents to understand their intelligent workflows. 

Components of an AI agent 

AI agents autonomously perceive, reason, act, and learn within dynamic environments. Their effectiveness relies on smoothly integrating various components, all contributing to the agent’s intelligence and adaptability. 

Perception: gathering and structuring input 

Perception is the agent’s sensory system, receiving data from various sources such as APIs, sensors, or user inputs. This component processes structured and unstructured data, including text, images, and audio, providing the agent with the necessary context and understanding of the current situation. 

Large language models: creating context 

Once the agent processes the data and understands the situation, it employs reasoning to make decisions. The agent’s reasoning engine uses an LLM like GPT or Claude, which turns input into a course of action. 

Tools: executing actions 

While the LLM provides intelligence and determines the necessary actions, the tools allow those actions to be executed. These tools may include connections to various external systems or functionalities, such as: 

  • Database connectors: To read from or write data to databases. 
  • API integrations: To interact with other software applications, such as sending emails, posting messages, updating CRM records, and accessing external data services. 
  • Code interpreters: To run code and perform calculations or data manipulations. 
  • Search capabilities: To find information online or within specific knowledge bases. 

The LLM also decides which tool is necessary for which step in the workflow and then uses the tool integration to execute the defined action. This access enables the agent to move beyond text generation and perform actions in the digital world. 

Memory: maintaining continuity 

For an AI agent to handle multi-step tasks or maintain continuity over a conversation or process, it requires memory. Memory helps agents to retain information about past interactions, observations, and decisions. 

  • Short-term memory (also known as context window): This typically involves keeping track of the immediate conversation history or the steps recently taken within a single task execution. This provides context for the next decision. 
  • Long-term memory: This can involve storing key facts, user preferences, outcomes of past tasks, or even learning from feedback loops to inform future decisions and improve performance over time.  

How to build an AI agent 

Building AI agents requires a structured approach to automate tasks, deliver insights, or solve real-world problems. Below, we outline the key steps to guide you from concept to deployment. 

1. Define the agent’s purpose and scope 

Clearly defining objectives and desired outcomes for the AI agent sets the stage for success. Establishing goals aligns the agent with your business needs and provides a way to measure their impact. 

  • Identifying the specific problem or task 
    What pain point or inefficiency will the agent address? For instance, automating customer support responses for common queries, summarizing daily sales reports, or monitoring system logs for anomalies. 
  • Defining the scope and limitations 
    What are the limits of the agent’s responsibilities? What tasks is it not explicitly designed to handle? This helps manage expectations and ensures the agent operates safely and effectively within its intended domain. 

2. Gather and prepare training data 

Data powers your AI agent. Collecting and refining the right data ensures the agent learns and performs effectively. This step can involve gathering data for two primary purposes: 

  • Training data (if applicable) 
    If your agent requires training a specific ML model (beyond using a pre-trained LLM out-of-the-box), you will need a relevant data set. This data should represent the situations the agent will encounter and the tasks it needs to perform. 
  • Operational data 
    This is the data the agent will perceive and use in real-time once deployed. It could be customer inquiries, sales figures, system logs, or any other information from the agent’s environment.  

This step involves collecting data from various sources, cleaning it to address missing values, transforming it into a usable format, and organizing it for efficient access by the agent. Remember, data quality is critical—an agent is only as good as the data it uses

3. Choose an AI/ML approach 

This step focuses on choosing the primary intelligence engine(s) to drive your agent’s decision-making and behavior. 

  • Selecting the LLM 
    A large language model is the agent’s brain for understanding language, reasoning, and planning. You will choose an LLM that fits the task’s complexity and your technical resources. 
  • Considering other ML models 
    Depending on the agent’s function, you might also need to integrate other specialized ML models for tasks like sentiment analysis or image recognition. 

4. Implement the agent’s architecture 

This step involves building the framework that brings the components together. Based on your chosen AI/ML approach, you will: 

  • Develop the perception layer 
    Build the interfaces (APIs, connectors, data feeds) that allow the agent to receive and process information from its environment. 
  • Integrate the reasoning engine 
    Connect the chosen LLM or other AI models into the agent’s workflow. 
  • Develop/Connect action tools 
    Build or integrate the tools (APIs to other systems, functions) that the agent will use to perform actions. 
  • Design the agentic loop 
    Implement the logic that orchestrates the flow of information and control between perception, reasoning, tool use, and memory, enabling the agent to operate autonomously. 

5. Train and optimize the agent 

If your approach involves training models, this is where you use the prepared data to train them. This phase optimizes the overall agent’s performance even when primarily using a pre-trained LLM. 

  • Model training (if needed) 
    Train any custom machine learning models on your data set. 
  • Prompt engineering and refinement 
    For LLM-based agents, optimizing involves refining instructions and prompts to elicit desired behaviors and responses. 
  • Testing and iteration 
    Thoroughly test the entire agent system using a variety of inputs and scenarios. Analyze its outputs and behavior against your defined goals and objectives. Identify errors, biases, or inefficiencies and iterate on the design, instructions, or underlying models to improve performance. 

6. Deploy and monitor the agent 

Once the agent is tested and refined, it's ready to be put into operation. 

  • Deployment 
    Integrate the agent into the target environment where it will perform its tasks. This can be within an existing application, on a server, or in a cloud environment. 
  • Monitoring 
    Set up continuous monitoring to track the agent’s activity, performance metrics, and any errors or unexpected behaviors in the live environment. 
  • Maintenance and updates 
    Agents need ongoing maintenance, updates to their underlying models or tools, and further refinement based on real-world performance and feedback. 

These steps can guide you in building AI agents that effectively address specific tasks and adapt to their environment. While these steps provide a solid framework, putting each piece into action and connecting them together can be a bit tricky and might require some technical know-how.  

But, with the right platform, such as Domo's Agent Catalyst, it’s much easier than you might think. So, let’s get started on building your first AI agent using Domo. 

Case study: Building an AI agent with Domo 

Domo’s Agent Catalyst makes building AI agents easier, faster, and better. With a user-friendly interface and flexible LLM options, easily integrate data and maintain enterprise-grade security. This no-code/low-code platform makes it simple for data analysts, business leaders, and IT professionals to build agents without needing extensive coding expertise.  

Let’s go through a practical, step-by-step example of how to build an AI agent using Domo. Here’s the scenario we’ll work through: 

Problem: Consider a marketing team seeking to automate follow-ups for their weekly strategy meetings. Currently, a team member spends hours transcribing notes, identifying action items, and emailing summaries—a process prone to delays and errors. 

Solution: Using Domo, they built an AI agent to streamline the follow-up workflow, saving time and improving accountability. 

To begin, ensure you have access to Domo’s Agent Catalyst. Visit the Domo website and log in to your account. If you don’t have an account yet, you can sign up for free. 

1. Create or identify your data source 

Before building your agent, determine what data it will need to interact with.  

For our use case, we are creating a simple data set that includes a “name,” “email,” and “role” for each team member using a web form in the Domo Data Center. 

  • Navigate to the Data Center (1) 
  • Click “Connect Data,” (2) 
  • Then click “Connectors” (3) 
  • Search for “webform” (4) and click the “Domo Webform.” (5) 
  • Give the webform a name (e.g., “email distribution list”) and define the necessary columns, such as email address, name, and role. (6) Note that we've substituted the original email address with a placeholder in the screenshot below. When you are creating an agent, please be sure to replace it with the actual working email.
  • Enter sample data rows, and then save the webform (7). This data set will serve as a reference for the agent. 

2. Access workflows 

Under the “more” button (1), navigate to the Workflows section (2) within your Domo instance. 

3. Create a new workflow 

Once in the Workflows section, create a new (1), blank workflow (2). 

Assign the workflow a descriptive name (e.g., “Meeting Transcripts Summarizer”) along with an optional description (3). After naming it, save the workflow (4). 

4. Add a customized start form 

The workflow begins with a default Start shape. Click on the Start shape on your canvas (1). Then, click the green button for “Customize Start Form” in the right-hand rail (2). 

  • Name the start form (e.g., “Meeting Transcription”) (3). 
  • Add questions to the form to collect the inputs your AI agent needs (4). The example added a question for “Transcription.” (5) 
  • Choose the appropriate input type for the question, such as we have chosen “paragraph” (6). Then, save the form (7).

5. Map start form inputs to variables 

The inputs from the start form need to be stored in workflow variables. Look in the lower right-hand corner of the workflow canvas where the parameters are listed. For the parameter, click the dropdown (1) and select your form (2). This creates corresponding variables listed on the left-hand side that will store the values entered into the form when the workflow is run. 

6. Add the AI agent task 

This is the core step where the AI agent logic resides. To add a new step, click the plus button on the workflow canvas (1). Then, select the “AI Agent task” from the available steps (2). 

7. Configure the AI agent task 

Select the AI Agent task shape on the canvas (1). Double-click the shape to give it a title or configure it in the right-hand rail (2). In the right-hand rail, click “Configure AI Agent.” (3) 

  • Instruct the agent: Write clear instructions in the provided text area telling the agent what you want it to do (4). For example, “You are an AI agent tasked with processing a conversation transcript from a team meeting. Your goal is to summarize the discussion, identify key points, track completed and pending tasks, query team member details from a data set, and send personalized emails to each team member with their name and the summary of the meeting accordingly. Follow these steps:..., Access the Conversation Transcript…, Summarize the Conversation…, Get Team Member Information…, Send Personalized Emails…, Additional Instructions…”.  
  • Then, you have to select the model; by default, the agent uses a DomoGPT model defined in the AI Service Layer. 
  • Define input parameters: In the “Input Parameters” section on the right, add custom parameters to pass data into the agent’s instructions (5). Click and add a parameter name, and then insert the corresponding workflow variable (6). 
  • Provide tools: The agent needs access to tools (code engine packages or functions) to execute the tasks you instructed it to do. Go to the “Tools” page (7). And then Click “Add Tools” (8). 
  • Search for and add the necessary functions (9). Our use case used: “Domo DataSet” package (10). 
  • Select “Query with SQL” from the Domo DataSet package (11) and save the function (12). 
  • Now, search for the “Domo notifications package” (13). 
  • Select “Send Email” (from the Domo notifications package) to send the email (15). Then, save it (16). 
  • Now, search for the “Domo AI Service Layer” (17-18).  
  • Select “Text Summarization” (from the Domo AI Service Layer) for transcription summarization (19). And save it (20). 

Best practice: Provide descriptions for each tool you add to help the agent understand when it’s helpful to use that tool. 

Now, we need to add our data set to the “Domo DataSet” so that our AI agent can query the team members’ details to send them meeting key points. In the beginning, we created a simple Web Form in the Data Center. This data set serves as the reference that the agent will use.  

  • Click on Domo DataSet (21), then select “Custom Value” from the lower right corner (22-23). 
  • Then click on “Dropdown” (24) and select “Custom” (25). 
  • Now, you can choose the specific data set you want the agent to interact with from the list of data sets available in your Domo instance (26). In our case, the “Team Email List” data set is chosen here (27). 
  • Click on the “Select” (28). 

8. Test the AI agent 

You can test the agent before deploying the workflow (29). Click the “Test” button. Then, emulate the input parameters by entering values for the Meeting transcript (30). Click “Run” to start the test (31).  

The test allows you to observe the agent’s reasoning process, including its decision-making steps, the tools it chose to use, and the outcomes of those actions. Be aware that the test will actually perform the actions the agent is instructed to take (e.g., send emails). Review the output (a JSON response) to understand how the agent interpreted your instructions and used the tools. 

This is a crucial step for “prompt engineering,” allowing you to refine your instructions and tool descriptions based on the test results and iterate until the agent performs as desired. 

Here is the mail we received from our AI agent.  

9. Complete the workflow 

To signify the end of the process, add an end shape to the workflow canvas by clicking on the “Plus” icon (1). 

Click the “Flow Controls” (2). 

And now select the “End” button (3). 

10. Deploy the workflow 

Once you are satisfied with your workflow and agent configuration, save and deploy it (4). To deploy, go to the upper right corner, click the three dots, and then click “Deploy” (5). 

Then click “Continue” (5). 

The deployed workflow containing the AI agent is now available for use. You can run it directly from the Workflows interface by clicking the play button. 

Note: Alternatively, you can incorporate the workflow into a Domo app to provide a user-friendly interface. 

Start building your AI agent today 

AI agents are no longer a thing of the future; they’re already changing the way we do business. These smart assistants go beyond simple automation to deliver real intelligence by combining perception, reasoning, tools, memory, and context to deliver meaningful outcomes. Whether summarizing meetings, automating customer support, or personalizing marketing, AI agents enable teams to focus on strategy, not busywork. 

With platforms like Domo, building AI agents has become more accessible than ever. With no-code interfaces, secure integrations, and built-in tools, data professionals can create intelligent workflows without writing a single line of code. 

For practice building an agent yourself, check out our hands-on AI tutorials. You can find it on our Events page; toggle to “Past Events” and look for the sessions labeled “AI Academy.” 

Author

Haziqa Sajid
Data Scientist and Content Writer

Haziqa Sajid, a data scientist and technical writer, loves to apply her technical skills and share her knowledge and experience through content. She has an MS Data science degree with over 5 years of working as a developer advocate for AI and Data companies.

Read more about the author
Table of contents
Tags
AI

Related Resources

Explore all