Select Page
How to build an AI agent
Listen to the article
What is Chainlink VRF
In the wake of ChatGPT’s release by OpenAI on November 30, 2022, the subsequent year saw a surge in AI chat applications, marking 2023 as the year of conversational AI. Competitors emerged, and the development of chat apps using Retrieval Augmented Generation (RAG) became increasingly popular. As we step into 2024, the focus is shifting towards AI agents, which promise to extend the capabilities of AI beyond mere question-answering. These agents integrate Large Language Models (LLMs) with specific tools and memory, enabling them to perform a variety of tasks to enhance their functionality and assist users in more sophisticated ways.

AI agents are gaining recognition in the AI trends matrix, with their potential for adoption being increasingly acknowledged. They can operate autonomously to varying degrees, from executing simple tasks like fetching information in a “web browser” to formulating and executing multi-step plans for more complex objectives. Beyond traditional robotic process automation (RPA), AI agents are becoming more adaptable and intelligent, capable of supporting ongoing business processes.

One notable example is Thoughtworks‘ project with a Canadian telecoms company, where AI agents were used to modernize fragmented systems, demonstrating the potential for fully autonomous agents to solve problems in the background. Semi-autonomous approaches are also viable, where a customer service representative can instruct an AI agent to implement a solution.

The ability of AI agents to interface with corporate systems and real-world data via APIs is particularly intriguing. The integration of OpenAI’s GPT models with tools like Zapier, which connects to over 6,000 corporate systems including Trello and Jira, exemplifies this development. Other platforms like Amazon’s Bedrock and Google’s Duet AI are also exploring the possibilities of AI agents in interfacing with various systems and data sources.

As the landscape of AI continues to evolve, AI agents are poised to play a crucial role in advancing the capabilities of AI in business and beyond.

The goal of this article is to provide a comprehensive understanding of AI agents and to guide readers through the steps of how to build an AI agent system using AutoGen, a platform that simplifies the orchestration, optimization, and automation of large language model workflows. This article also delves into Vertex AI Agent Builder, facilitating developers in effortlessly crafting and deploying enterprise-ready generative AI experiences. It offers tools ranging from a user-friendly, no-code console for constructing AI agents using natural language to open-source frameworks like LangChain on Vertex AI.

Understanding AI agents

An AI agent is a highly efficient, intelligent virtual assistant that autonomously performs tasks by leveraging artificial intelligence. It is designed to sense its environment, interpret data, make informed decisions, and execute actions to achieve predefined objectives.

In a corporate context, AI agents enhance efficiency by automating routine tasks and analyzing complex data, thereby allowing employees to concentrate on strategic and creative endeavors. These agents complement human efforts rather than replace them, facilitating a more productive and effective workforce.

AI agents are characterized by their proactivity and decision-making capabilities. Unlike passive tools, they actively engage in their environment, making choices and taking actions to fulfill their designated goals.

A critical aspect of AI agents is their capacity for learning and adaptation. Through the integration of technologies such as Large Language Models, they continuously improve their performance based on interactions, evolving into more sophisticated and intelligent assistants over time.

In case of Autonomous AI Agents, multiple agents collaborate, each assuming specialized roles akin to a professional team. This collaborative approach allows for a more comprehensive and efficient problem-solving process, as each agent contributes its expertise to achieve a common objective.

Let’s imagine a scenario with Jordan, a salesperson, and their custom AI assistant.

Jordan starts their day by checking their emails and finds a message from a potential client, Sam, who’s interested in their company’s premium services. Jordan’s AI assistant, which is connected to their email, has been keeping track of these interactions. Using what it has learned from Jordan’s past replies and the company’s information, the AI agent drafts a response. This includes a summary of the premium services, their advantages, and a tailored suggestion for Sam based on his interests and needs.

Jordan looks over the draft in their email, adds their personal touch, and sends it off. The AI agent then proposes follow-up steps, like setting up a call with Sam, sending a detailed brochure, or reminding Jordan to follow up if there’s no reply in a week.

Jordan agrees to these steps, and the AI organizes their calendar, emails the brochure, and sets reminders in their digital planner. With the AI handling these routine yet important tasks, Jordan can concentrate on other critical aspects of their job.

Types of AI agents

Recently, Google wrapped up its Google Cloud Next event, a significant conference where they announced a slew of new updates on AI models, chips, and products. The spotlight, however, was on AI agents, a central theme of the event. During his keynote speech, Google Cloud CEO Thomas Kurian stressed the importance of AI agents that are specifically designed to assist users in achieving their objectives. He highlighted their ability to connect with other agents to collaboratively accomplish tasks. Kurian also introduced six types of AI agents that Google sees as pivotal for the future:

1. Customer agents

Customer agents are designed to listen, understand needs, and provide tailored recommendations, much like a skilled sales or service representative would. These agents are versatile, operating across various channels and seamlessly integrating into product experiences. They can be customized based on conversation flows, languages, and specific subject matters, knowing precisely when to transition to human assistance when needed.
Mercedes-Benz showcased multiple customer agent experiences, both inside the car and for customizing models for purchase. Mercedes-Benz CEO Ola Källenius highlighted this, stating, “The sales assistant helps customers seamlessly interact with Mercedes-Benz when booking a test drive or navigating through offerings.”

Customer agents represent a new frontier in customer service, enhancing engagement and providing personalized assistance across different touchpoints.

2. Employee agents

Employee agents are designed to enhance productivity and foster better collaboration among workers by automating repetitive tasks, providing quick answers to queries, and assisting in communications. Many of the employee agent implementations showcased were powered by Gemini models integrated within Google Cloud Workspace. With Vertex AI extensions, these models can seamlessly connect to a wide range of external or internal APIs, enhancing their versatility and integration capabilities.
Uber CEO Dara Khosrowshahi highlighted the development of employee agents to support teams, summarize user communications, and optimize marketing agency spending.
Employee agents enhance workplace efficiency, by streamlining workflows and empowering employees to focus on high-value tasks.

3. Creative agents

Creative agents assist teams in designing creative content, boosting the efficiency of design and production workflows across various formats such as images, slides, and other modalities. The benefits of creative agents can be substantial for enterprises, as they can help avoid media waste and reduce associated costs throughout a campaign. Also, these agents enable quick creation and iteration of storyboards and other creative elements. Canva, for instance, utilizes Vertex AI to power its Magic Design for Video feature, allowing users to skip time-consuming editing steps.
Creative agents represent a transformative toolset for design and production teams, optimizing processes and enabling faster, more effective content creation.

4. Data agents

Data agents search, analyze, and summarize vast repositories of documents, videos, and audio to extract valuable insights. A powerful data agent not only answers specific questions but also suggests new questions that should be explored.
Suresh Kumar, CTO of Walmart, highlighted the use of data agents to comb through BigQuery and uncover insights crucial for personalization, monitoring supply chain signals, and enhancing product listings.
Data agents are versatile and can be deployed across various stages of data management, including preparation, discovery, analysis, governance, and creating data pipelines. They also offer real-time notifications when key performance indicators (KPIs) are met or at risk. These intelligent data agents play a pivotal role in modern data-driven organizations, facilitating informed decision-making and proactive management based on actionable insights extracted from diverse data sources.

5. Code agents

Code agents assist developers in building and maintaining applications and systems, enhancing productivity and efficiency in software development workflows.
Goldman Sachs CEO David Solomon highlighted the potential of generative AI to significantly enhance developer productivity. “There’s compelling evidence that generative AI tools for assisted coding can substantially boost developer efficiency, and we’re excited about this prospect,” said Solomon.
These code agents are designed to streamline coding tasks, suggest code improvements, automate repetitive processes, assist in debugging processes and optimize code quality. They leverage machine learning and natural language processing to understand context and provide targeted assistance tailored to developer needs. Code agents represent a valuable innovation in the developer toolkit, empowering teams to deliver high-quality software more efficiently and effectively.

6. Security agents

Security agents are designed to utilize data and intelligence to deliver insights and incident response rapidly. They support security operations professionals by automating monitoring tasks and safeguarding data. They present a significant advantage in cybersecurity by analyzing large volumes of malicious code efficiently, providing a multiplier effect for cybersecurity analysts.
Companies like Charles Schwab and Pfizer are among Google Cloud’s security customers, leveraging these technologies to enhance their security posture.
The primary goal of a security agent is to swiftly identify and address threats, summarize findings, explain detected issues, and recommend immediate next steps and remediation playbooks. Over time, security agents aim to automate response actions, further enhancing cybersecurity defenses.
Security agents play a critical role in modern cybersecurity strategies, enabling organizations to proactively defend against evolving threats and respond effectively to security incidents.

Working mechanism of an agent

Building autonomous agents requires emulating human cognitive processes and strategically planning task execution. In this phase, LLM agents have the ability to decompose large and intricate tasks into smaller, more manageable segments. Furthermore, these agents possess the capacity for self-reflection and learning from previous actions and errors, thereby enhancing future performance and improving outcomes.

Let’s begin by defining an agent as a software program that performs tasks on behalf of a user. The ability of Large Language Models (LLMs) to emulate human-like cognitive processes opens up new avenues for tasks that were previously challenging or unfeasible.

At its most basic, an LLM-based agent is a program that encapsulates ChatGPT with a text interface capable of executing tasks such as document summarization.

The concept of “agent orchestration” introduces a higher level of complexity. For instance, two specialized agents could collaborate on your code—one focusing on code generation and the other on code review. Alternatively, you could enhance an agent with a tool like an API that provides access to internet search. Or you could improve an agent’s intelligence and reliability by providing additional context through techniques like Retrieval Augmented Generation (RAG).

The most advanced agents are termed “autonomous.” These are programs capable of handling sequential tasks, iterating, or pursuing objectives with minimal or even no human intervention. Consider fraud detection—an autonomous agent can adjust its behavior to identify intricate and evolving patterns of fraud, significantly reducing false positives, ensuring legitimate transactions are not mistakenly flagged as fraudulent. It can also detect and prevent fraud in real-time by determining the appropriate actions to take, thereby saving both time and resources.

The graphic below illustrates a basic framework of an autonomous agent that processes inputs from users or triggers from applications.

Working mechanism of an agent

The described autonomous agent is a sophisticated system comprising various specialized agents collaborating seamlessly. An observer agent evaluates incoming information, enriches it with pertinent context, and then either stores it in its memory or adds it to the task queue. For instance, in a business process analyzing credit card transaction events for fraud, a single use of a credit card may not be significant, but two uses within a short time frame across different continents could indicate fraud.

The initial event might lead the agent to simply store the information in memory. However, the second event would prompt the agent to create a task to investigate the observation for potential fraud, taking into account the context provided by the first event.

A prioritization agent then assesses and ranks the task, potentially initiating real-time execution by the execution agent.

The execution agent’s role is to carry out the tasks and steps, such as analyzing the observations for fraud in this example. It can access additional context, such as historical transaction data and the customer’s credit card usage patterns, through techniques like Retrieval Augmented Generation (RAG). It may also utilize tools to access external services, like the Google Maps API, to gather travel and distance information for the locations where the card was used. Additionally, the agent could interact with the customer through an app, SMS, or even initiate a phone call to aid in the analysis.

Build Powerful AI Agents Now!

Unlock the potential of AI agents with LeewayHertz’s expertise.
Tailored solutions for your unique needs.


The different functional architectural blocks of an autonomous AI agent

To build an AI agent, it is essential to understand its architecture. Here is an overview of the same.

functional architectural for autonomous AI agent

The diagram presents a high-level functional architecture for autonomous agents, comprising several key components, which will be explored next.

Agent and agent development framework

An agent is essentially software that can be either purchased off the shelf and customized or developed from scratch. Developing software from scratch entails creating an abstraction layer to the foundational model APIs for various use cases, ranging from chatbots to orchestration foundations. This process involves building a scalable execution layer and integrating it with existing databases, external APIs, and emerging frameworks.

Alternatively, you can utilize an existing orchestration framework that offers numerous essential features for managing and controlling LLMs. These frameworks simplify the development and deployment of LLM-based applications, enhancing their performance and reliability.

Several orchestration frameworks are available, with LangChain and LlamaIndex being two of the most prominent. LangChain is a leading open-source framework designed to assist developers in creating applications powered by language models, particularly large language models (LLMs). It streamlines development by providing standardized interfaces for LLM prompt management and external integrations with vector stores and other tools. Developers can construct applications by chaining calls to LLMs and integrating them with other tools, thereby improving efficiency and usability. The fundamental concept of the library is that different components can be linked together to develop more advanced use cases surrounding LLMs.

Another two most promising agent development frameworks are Microsoft Autogen and crewAI. Microsoft’s AutoGen is a platform that facilitates the creation of applications based on Large Language Models (LLMs) by leveraging multiple agents. These agents can engage in iterative conversations with one another to accomplish tasks. They offer customization options, support human involvement, and can function in diverse modes that incorporate a mix of LLMs, API calls, and custom code.

Large Language Models

Large Language Models (LLMs) are crucial in the development of AI agents, acting as the foundation for natural language processing and generation. The primary purpose of incorporating LLMs into AI agents is to enable them to understand and generate human language effectively. This allows AI agents to interpret user queries, extract information from extensive text data, and maintain engaging conversations with users. Moreover, LLMs provide AI agents with contextual awareness, ensuring that responses are not only relevant but also coherent with the ongoing dialogue. As language evolves, LLMs enable AI agents to learn from new data and adapt to changes, keeping their responses up-to-date.

Different LLMs can be utilized depending on the specific needs of the AI agent. General-purpose models like GPT-3 or BERT offer versatility and can be applied across a variety of tasks, from chatbots to content generation. For more specialized applications, such as legal or medical assistance, domain-specific LLMs trained on relevant data can provide more precise and pertinent responses. Additionally, organizations can develop customized LLMs tailored to their unique requirements by training them on proprietary data.

In summary, LLMs play a vital role in building AI agents by enabling them to understand and generate human language, maintain context in conversations, and adapt to linguistic changes. The choice of LLM depends on the intended application of the AI agent, with options ranging from general-purpose to domain-specific and customized models.


In the architecture of AI agents, a key component is the ability to integrate with external services and APIs, commonly referred to as “Tools.” These tools extend the capabilities of agents beyond mere language processing, enabling them to access additional data and systems to perform a wider range of tasks. For instance, an agent might use a simple tool like a calculator for numerical operations or a more complex tool such as an API to interact with enterprise backend services.

The integration of tools provides agents with the autonomy to choose the most appropriate resource for a given task, whether it’s retrieving information or executing an action. This flexibility enhances the agent’s effectiveness in completing assignments.

The ecosystem of available tools is constantly expanding, with a variety of public services and APIs that agents can utilize. Additionally, agents can access operational data stores or vector stores to incorporate relevant domain-specific data into their processing. For example, an agent might use a tool that accesses a vector store based on AstraDB/Cassandra to retrieve product documentation. Instead of relying solely on a language model for answers about a product feature or code samples, the agent can perform a vector search query against its own knowledge database to provide a more accurate response.

Memory and context

Agents, by their very nature, do not retain state and thus require a mechanism for storing information, necessitating both short-term and long-term memory layers. Consider the example of a coding agent; without memory, it cannot recall its previous actions. Therefore, if posed with the same question, it would invariably begin from scratch, reprocessing the entire task sequence anew. Implementing a memory feature becomes crucial in this context.

As the memory has the potential to rapidly expand into a vast dataset, envision it as a memory stream filled with numerous observations pertinent to the agent’s current context, such as logs of questions, responses, and interactions within multi-user environments. Utilizing a vector search for retrieval, supported by a low-latency and high-performance vector store like Astra DB, becomes an efficient solution. This approach ensures that the agent can quickly access relevant information, enhancing its ability to respond to queries and perform tasks more effectively.

For an agent to effectively operate within or comprehend your specific domain context, such as your products, industry, or enterprise knowledge, it is not feasible to rely solely on an off-the-shelf Large Language Model (LLM).

This doesn’t necessarily mean that you need to train your own model from scratch. However, an existing pre-trained model may require fine-tuning to adapt to your domain context, or it may need to be supplemented with this context using techniques like Retrieval Augmented Generation (RAG). Often, a combination of fine-tuning and RAG is effective, especially in scenarios with stringent data privacy requirements. For instance, you may want to avoid storing sensitive company intellectual property or customer personally identifiable information directly in the models.

Additionally, when new context data is frequently added, or when there is a need to optimize performance metrics such as latency and throughput, or to minimize the costs associated with model invocation, injecting data via RAG becomes the preferred method. This approach integrates a retrieval model over a knowledge base with the LLM through its input prompt space, providing context that was not included in the model’s initial training corpus.

Building an AI agent – the basic concept

In the field of artificial intelligence, an agent refers to software that can sense its environment (such as a game world) and take actions (like a character moving and making decisions) based on specific rules or algorithms.

Agents vary in complexity. Some, known as simple reflex agents, react solely to their immediate perceptions, like a thermostat. Others, called goal-based agents, consider future outcomes and act to achieve their objectives. The most sophisticated, learning agents, can adapt their behavior based on past experiences, much like humans learning from mistakes.

The power of agents lies in their ability to automate intricate tasks, make smart choices, and interact with their surroundings in a way that emulates human intelligence. The exciting part is that anyone can create these agents. By developing AI agents, you unlock a world of potential, where you can develop systems that are not only efficient and effective but also capable of learning, adapting, and evolving.

While more complex agents may need expert knowledge, starting with simple agents is a great way to learn and grow in this fascinating area.

The development of autonomous agents powered by Large Language Models (LLMs) has gained significant attention due to the rapid advancements in LLM technology. Over the past year, numerous new technologies and frameworks have been introduced based on this concept.

In our exploration of available options, we encountered AutoGen, an open-source agent communication framework developed by Microsoft.

AutoGen addresses a crucial need that many new technologies have overlooked: enabling multiple agents to collaborate toward a shared objective. It provides essential functionality to support the initialization and collaboration of multiple agents atop an LLM. It facilitates one-to-one communication channels between agents and group chats involving multiple agents. This feature was particularly crucial for our use case. However, before delving into the specific use case let’s have an overview of our selected framework, i.e. Autogen.

Microsoft Autogen – an overview

Microsoft Autogen

Microsoft’s AutoGen is a framework designed to facilitate the development of applications utilizing Large Language Models (LLMs) through the collaboration of multiple agents. These agents are capable of conversing iteratively to accomplish tasks, are customizable, allow for human participation, and can operate in various modes that integrate LLMs, API calls, and custom code.

AutoGen is built around four key concepts: Skill, Model, Agent, and Workflow.

  • Skill: This is akin to OpenAI’s Custom GPTs. It enables a combination of prompts and code (e.g., accessing APIs) and can be employed by Agents to execute tasks more efficiently and accurately, as they are curated by human experts. For instance, generating a creative quote of the day and sending it to a Telegram bot via API could be a skill. The LLM might excel in generating the quotes, while the action of sending them via the Telegram API could be more effectively executed by custom code.
  • Model: This refers to the configuration of any LLM that is intended for use. Selecting the most suitable LLM for a specific task is crucial.
  • Agent: This is the actual “bot” configured with the chosen Models, Skills, and a pre-configured prompt (also known as a System Prompt) to optimally perform the designated task(s).
  • Workflow: This is a comprehensive encapsulation of all the Agents required to collaborate to complete all tasks and achieve the desired goal.

AutoGen Studio is an open-source user interface layer that overlays AutoGen, streamlining the rapid prototyping of multi-agent solutions. It provides a user-friendly interface for configuring and linking Skills, Models, Agents, and Workflows, eliminating the need to manipulate configuration files and execute scripts manually.

As previously mentioned, AutoGen is a framework based on Large Language Models (LLMs) for agent communication. It enables the creation of agents with distinct personas, which can collaborate through one-to-one message passing or group chats, where each agent contributes in turn.

AutoGen includes several built-in agent types with varying capabilities, such as:

  • User Proxy Agent: Acts as a user representative, capable of retrieving user inputs and executing code.
  • Assistant Agent: Equipped with a default system message, this agent functions as an assistant to complete tasks.
  • Conversable Agent: Possesses conversational skills and serves as the foundation for both assistant and user proxy agents.
  • Additionally, AutoGen features experimental agents like the Compressible Agent and GPT Assistant Agent.

While AutoGen primarily supports OpenAI LLMs like GPT 3.5 and GPT 4 for agent creation, it can be configured to work with local or other hosted LLMs as well.

AutoGen Group Chat: Group chats in AutoGen enable multiple agents to collaborate in a group setting. Key features include:

All agents can see the messages sent by others in the group.

The group chat continues until a termination condition is met, such as an agent sending a termination message, the user exiting the chat, or reaching the maximum chat round count.

A manager agent oversees message broadcasting, speaker selection, and chat termination.

AutoGen supports four methods for selecting the next speaker in each chat round: manual, random, round-robin, and auto (where the LLM chooses the next speaker based on chat history).

These features make AutoGen group chat suitable for agent collaboration, but they also present challenges in terms of controlling agent interactions within this environment.

AutoGen for application development: Currently, AutoGen is designed for scenarios where the user has full visibility of all internal communication between agents. Integrating AutoGen into an application where such transparency is not desired can be challenging.

For instance, in a system where multiple agents act as sales assistants, revealing their internal planning and strategy selection to the user may not be ideal. Additionally, exposing users to the complexity of internal communication can be overwhelming.

Moreover, integrating an AutoGen agent system with an API poses challenges, as AutoGen is primarily a CLI tool and lacks a consistent method for ending chat sequences without explicit user input.

Fortunately, certain customizations supported by AutoGen can help overcome these issues, enabling satisfactory integration with an API. The following sections will detail how we achieved this integration.

How to build AI agents with Autogen: Essential steps

Discover the essential steps on how to build AI agents with AutoGen, a powerful tool for creating intelligent, automated systems

Setting up AutoGen Studio

To begin using AutoGen Studio, you must first install it on your local computer. The installation process is simple and can be completed using the pip package manager. It is advisable to install AutoGen Studio within a conda environment to prevent any package conflicts. Additionally, you will need to acquire an API key to access your language models and securely authenticate with OpenAI. AutoGen can work with any Large Language Model (LLM), including those hosted locally, such as LLAMA 2 or Mixtral, by simply configuring API endpoints for AutoGen to interact with. For those just beginning, utilizing OpenAI’s services is likely the most straightforward and convenient option. You can set up your secret key on the OpenAI platform. After installing AutoGen Studio and configuring your API key, you can initiate it via a command line. AutoGen Studio will operate on a local server and offer a web-based interface for developing and experimenting with applications.

Developing skills

The initial phase in constructing a multi-agent application using Autogen Studio involves developing skills. Developing a new skill entails crafting a function to execute a particular task. Skills are essentially functions that enable your language models to carry out particular tasks or produce specific outputs. For example, you can create a skill to generate images or retrieve data from a designated source. While Autogen Studio offers a range of default skills, you also have the option to create your own tailored skills. To develop a skill, you must describe its purpose and implement the required code in Python. These skills will then be utilized by the agents in your application to execute various tasks.

Leveraging models

Autogen Studio offers the versatility to employ both locally hosted language models and those available through Azure or OpenAI. Local models let you run multi-agent apps on your own, without needing external services, by just setting the model’s path in your app. Conversely, utilizing models from Azure or OpenAI necessitates the provision of your API key for authentication purposes. A diverse selection of models is available to suit your specific needs. Autogen Studio streamlines the integration of these models into your application, enabling you to concentrate on developing your multi-agent workflows.

Configuring agents

In your multi-agent application, agents are the components that carry out tasks and engage with users. With Autogen Studio, you have the capability to configure agents, assigning them particular skills and models. For each agent, you can designate a primary model that will be utilized by default for handling user inquiries. The roles and responsibilities of agents can vary depending on the skills you assign to them. Autogen Studio includes a user proxy agent that acts on behalf of the user and executes code on the user’s system. Additionally, you have the option to create custom agents with tailored functionalities and incorporate them into your application.

Developing workflows

In Autogen Studio, workflows outline the series of steps and interactions among agents within your application. They coordinate the performance of tasks and regulate the exchange of information among agents. Depending on your application’s needs, you can develop various workflows. For instance, you might design a workflow for data visualization in which one agent retrieves data, another creates visualizations, and a third agent displays the outcomes. Autogen Studio offers an intuitive interface for designing workflows and determining the sending and receiving agents for each workflow.

Leveraging Autogen playground

Autogen playground is a robust feature offered by Autogen Studio that enables you to test and illustrate workflows. It facilitates the interactive development and execution of workflows, allowing you to track agent activities and visualize outcomes. You can initiate by crafting a new workflow and defining the participating agents. Autogen playground offers pre-built sample tasks as a foundation. You can pose queries, activate particular skills, and watch how agents collaborate to accomplish tasks. Additionally, Autogen playground generates Python code for each task, providing you with complete control over the implementation details.

An example of Autogen-based tour agent system

Autogen-based tour agent system

We’ll explore a simple tour agent system powered by Autogen. This system comprises two Autogen Assistant Agents and a User Proxy Agent, all working together in a group chat. Here’s a brief overview of their roles:

  • Tour agent: This is the primary agent responsible for replying to user queries. It gathers necessary information before crafting a final response for the user.
  • Location researcher: This assistant agent aids the tour agent by conducting location research. It utilizes function calls to query Google Maps via the Search Engine Results Page (SERP) API, gathering details about attractions, restaurants, accommodations, and more.
  • User proxy: This agent acts as a proxy for the user within the group chat, facilitating communication between the user and the other agents.


First, we set up a common configuration for all agents in the system. This involves specifying the model and API key for the services we’ll be using.

  • Creating Assistant Agents: Next, we create the Tour Agent and Location Researcher. The Tour Agent has a customized prompt outlining its role and responsibilities, while the Location Researcher is equipped with a function for searching Google Maps.
  • User Proxy: The User Proxy is created to handle user messages and detect when to end a reply sequence before sending the response to the user. It plays a passive role but is essential for managing the flow of communication.
  • Group Chat and manager agent: Finally, we set up a group chat and a manager agent to enable collaboration among the agents. The group chat allows for a structured conversation, while the manager ensures that the conversation flows smoothly and ends appropriately.

In summary, this Autogen-based tour agent system demonstrates how multiple agents can work together to provide a comprehensive service, from handling user queries to conducting research and managing communication.

Build Powerful AI Agents Now!

Unlock the potential of AI agents with LeewayHertz’s expertise.
Tailored solutions for your unique needs.


Benefits of Autogen

  • Enhances LLM workflows: AutoGen streamlines the management, refinement, and automation of large language model workflows, making them more efficient.
  • Adaptable and interactive agents: The platform provides agents that are both customizable and capable of engaging in dialogue, utilizing the power of sophisticated LLMs like GPT-4.
  • Human and tool integration: AutoGen overcomes the limitations of LLMs by enabling integration with human input and various tools, allowing for collaborative conversations among multiple agents.
  • User-friendly and modular approach: The framework simplifies the creation of complex multi-agent systems, offering a modular design that allows for easy reuse and combination of agents.
  • Dramatic reduction in coding effort: Utilizing AutoGen can result in a significant decrease in coding effort, potentially reducing it by more than four times.
  • Flexible agent functionality: Agents can be configured to employ LLMs, human input, tools, or a mix of these elements, providing a broad spectrum of functionalities.
  • Smooth user interaction: AutoGen facilitates smooth user interaction, allowing users to easily join or leave a chat through an agent, enhancing the user experience.
  • Dynamic group chat support: The platform supports dynamic group chats involving multiple agents, broadening the scope for collaborative endeavors.
  • Community-driven open-source project: As an open-source initiative, AutoGen encourages contributions from a diverse community, fostering ongoing development and innovation.

Vertex AI agent builder: Enabling no-code AI agent development

Vertex AI Agent Builder is an advanced, no-code solution offered by Google Cloud, designed to facilitate the development, deployment, and management of advanced generative AI experiences. It empowers developers of all levels of expertise to create intelligent AI agents and applications, leveraging a variety of tools and frameworks within a unified platform.

Key features and capabilities

While generative AI models excel in content creation and analysis, effectively harnessing their capabilities within secure and user-friendly interfaces is crucial for AI applications. Moreover, AI agents must integrate seamlessly with external systems to provide personalized experiences and perform tasks on behalf of users. The Vertex AI Agent Builder addresses these challenges by simplifying the integration process. Below are some of its features:

1. No-code conversational AI development:

  • Rapid prototyping: Easily design and deploy conversational AI agents using natural language without writing extensive code.
  • Pre-built templates: Leverage pre-built templates and prompt-based agent builder tools for quick implementation and experimentation.
  • Multi-agent workflows: Seamlessly integrate multiple agents to streamline complex enterprise workflows and interactions across diverse channels.

2. Grounding in enterprise data:

  • Gemini API integration: Enhance agent responses with up-to-date information from Google Search using the Gemini API.
  • Vertex AI search: Utilize the out-of-the-box grounding system to connect agents with enterprise data sources with minimal configuration.
  • DIY RAG (Retrieval Augmented Generation): Implement custom RAG solutions using search components APIs for document processing, ranking, and validation.

3. Augmentation and action:

  • Extensions and function calling: Extend agent capabilities with pre-built Vertex AI extensions to connect to specific APIs or tools.
  • Automated actions: Enable intelligent function calling to dynamically select APIs or functions based on user queries, enhancing agent performance and responsiveness.

4. Low-code to high-code development:

  • LangChain on Vertex AI: Accelerate development with a combination of low-code APIs and code-first orchestration using the powerful LangChain framework.
  • Customization and optimization: Customize AI applications, inspect model outputs, and identify areas for improvement to deliver enhanced user experiences tailored to specific business needs.

5. Experimentation and deployment:

  • Comprehensive evaluation tools: Evaluate performance metrics and fine-tune generative AI models to optimize behavior and responsiveness.
  • Efficient deployment: Deploy AI applications to production environments seamlessly using Google Cloud’s scalable infrastructure, ensuring reliability and performance under varying workloads.

6. Security and compliance:

  • Enterprise-grade security: Benefit from built-in security features and compliance with industry standards such as HIPAA, ISO 27000-series, SOC-1/2/3, VPC-SC, and CMEK.
  • Data privacy and access control: Maintain strict data privacy and access controls, ensuring responsible use of AI models and adherence to regulatory requirements.

Common use cases

  • Conversational AI agents: Develop intelligent chatbots, virtual assistants, and process automation agents without the need for extensive coding, leveraging the no-code conversational AI development capabilities.
  • Integration with google search: Enhance agent responses by grounding models in real-time google search results, providing users with accurate and timely information.
  • Retrieval Augmented Generation (RAG) with Vertex AI search: Implement advanced RAG systems using Vertex AI Search, leveraging document processing, ranking, and validation APIs to enhance grounding in enterprise data.
  • Vector search for information retrieval: Build embeddings-based applications using scalable vector search capabilities, enabling efficient and accurate information retrieval for diverse use cases.
  • Custom agent orchestration with LangChain on Vertex AI: Create highly performant and customized AI agents using LangChain, a versatile open-source Python framework, integrated seamlessly with Vertex AI for enterprise-scale deployments.

Benefits of Vertex AI agent builder

  • Simplified AI agent development: Vertex AI Agent Builder provides intuitive tools and workflows, enabling developers to build sophisticated AI solutions with ease and efficiency.
  • Enhanced accuracy and relevance: Connect AI agents to trusted data sources and real-time information, ensuring accurate and contextually relevant responses.
  • Scalability and reliability: Deploy AI applications with confidence on Google Cloud’s enterprise-ready infrastructure, ensuring scalability, reliability, and performance under varying workloads.
  • Enterprise-grade security and compliance: Benefit from built-in security features and compliance with industry standards, ensuring data privacy, access control, and regulatory compliance.

Vertex AI Agent Builder empowers organizations to leverage the transformative power of generative AI, enabling them to create smart and scalable AI experiences tailored to unique business needs. With its rich set of features, flexible deployment options, and enterprise-grade capabilities, Vertex AI Agent Builder is poised to drive innovation and efficiency in AI agent development across industries.

How LeewayHertz can help you build AI agents

LeewayHertz understands that AI agents are not merely technological advancements; they are transforming the future of businesses, lifestyles, and societal interactions. AI agents, from advanced virtual assistants and interactive chatbots to autonomous vehicles, are reshaping automation, decision-making, and customer engagement. In today’s fast-paced digital environment, adopting these intelligent entities is crucial for businesses seeking to excel and maintain a competitive edge.

As a leader in AI development, LeewayHertz empowers businesses across various sectors to harness the power of AI agents. Our expertise in AI and machine learning solutions enables us to enhance your business by integrating state-of-the-art AI agents into your technology ecosystem. Our dedicated team of AI specialists is committed to delivering custom AI agents that seamlessly align with your business goals, boosting operational efficiency, reducing costs, and fostering innovation.

As an experienced AI development company, LeewayHertz also leverages tools like AutoGen Studio and CrewAI for AI agent development, along with other approaches offering a comprehensive and collaborative approach. Here are some of the AI agent development services that we follow as part of our AI agent development:

  1. Strategic consultation: We provide strategic consultation services, assisting you in understanding the potential of AI agents for your business, identifying integration opportunities, and developing effective digital transformation strategies.
  2. Custom AI agent development: Specializing in the development of custom AI agents, we utilize AutoGen Studio for rapid prototyping and CrewAI for orchestrating collaborative agents. This ensures that your AI agents are tailored to your business needs and challenges, streamlining processes and achieving operational objectives with precision.
  3. Seamless integration: Our team excels in integrating AI agents into your existing systems using AutoGen Studio and CrewAI. This ensures smooth interoperability and minimal disruption while maximizing the benefits of intelligent automation and data-driven insights.
  4. Continuous support and optimization: Our commitment extends beyond deployment. We offer ongoing support, monitoring, and optimization services to ensure that your AI agents remain cutting-edge, delivering optimal performance and staying ahead of market trends.

In a future where AI agents are crucial for competitive advantage, LeewayHertz stands as your reliable technology partner, leveraging AutoGen Studio and CrewAI to develop and integrate AI agents that drive your business forward.


As we conclude our exploration of building AI agents, it’s clear that these intelligent systems hold immense potential to transform various aspects of our lives and industries. From enhancing customer experiences with personalized interactions to streamlining complex operations and making informed decisions, AI agents are at the forefront of technological innovation.

The journey of creating an AI agent is both challenging and rewarding, requiring a thoughtful approach to setting objectives, selecting the right technology stack, designing a robust architecture, and developing core capabilities. Training, testing, and continuously improving the agent are crucial steps to ensure its effectiveness and adaptability.

Moreover, deploying and monitoring the AI agent in real-world scenarios is a critical phase where the theory meets practice, and the true value of the agent is realized. Ensuring security and privacy in AI agent development is not just a legal requirement but a moral imperative to build trust and protect individuals’ rights.

As we look to the future, the possibilities for AI agents are boundless. With advancements in AI and machine learning, these agents will become even more intelligent, autonomous, and integrated into our daily lives. However, with great power comes great responsibility. It is essential to build AI agents ethically, considering their impact on society, the economy, and the environment.

In summary, building an AI agent is a journey of innovation, creativity, and responsibility. By following the steps outlined in this article and staying abreast of the latest developments in AI, you can create intelligent systems that not only meet the needs of today but also pave the way for a smarter, more efficient, and more connected world tomorrow.

Transform your business with intelligent AI agents: Partner with LeewayHertz AI experts for advanced AI agent development and stay ahead in the competition!

Listen to the article
What is Chainlink VRF

Author’s Bio


Akash Takyar

Akash Takyar LinkedIn
CEO LeewayHertz
Akash Takyar is the founder and CEO at LeewayHertz. The experience of building over 100+ platforms for startups and enterprises allows Akash to rapidly architect and design solutions that are scalable and beautiful.
Akash's ability to build enterprise-grade technology solutions has attracted over 30 Fortune 500 companies, including Siemens, 3M, P&G and Hershey’s.
Akash is an early adopter of new technology, a passionate technology enthusiast, and an investor in AI and IoT startups.

Related Services

AI Agent Development

Transform your workflow with our intelligent AI agents that excel in research, analysis, code generation, audits, and more.

Explore Service

Start a conversation by filling the form

Once you let us know your requirement, our technical expert will schedule a call and discuss your idea in detail post sign of an NDA.
All information will be kept confidential.


Follow Us