A Guide to Building AI Agents with Leading LLMs

Large Language Models (LLMs) from tech companies like Google, Microsoft, and Anthropic have revolutionized what’s possible with AI. These models, including Gemini, Copilot, ChatGPT, and Claude, can be applied to diverse tasks, from creating images to analyzing complex files. This article explores the process of creating AI Agents using these powerful LLMs.

AI Agents are autonomous systems that can perform specific tasks without direct human intervention. Their 24/7 availability makes them ideal for customer service, information retrieval, and task automation, significantly reducing organizational workload. The emergence of LLMs has greatly simplified the creation of sophisticated AI Agents. A fundamental requirement for building a functional AI Agent is a knowledge base, which can range from unstructured data like product catalogs to structured data like website sitemaps.

Create AI Agent using OpenAI Swarm

Swarm, an open-source framework from OpenAI, facilitates the building of AI Agents that support multi-agent collaboration. This means you can create multiple specialized agents that dynamically communicate and share tasks based on user input.

Routines and Handoffs are central to Swarm’s functionality. Routines are sets of instructions that an agent follows to achieve a given task, defined using natural language prompts and tools (functions). Handoffs enable communication between multiple agents, allowing for collaborative problem-solving.

Step 1: Access the OpenAI Swarm GitHub repository.

Step 2: Clone the repository to your local machine.

git clone https://github.com/openai/swarm

Step 3: Install the necessary dependencies.

pip install -r requirements.txt

Step 4: Define routines using natural language prompts within the code.

# Example routine for answering a question about a product
routine = "Answer the user's question about the product features."

Step 5: Implement handoffs to allow communication between agents, specifying the conditions under which agents should transfer control.

Step 6: Deploy your multi-agent system.

Create an AI Agent with Copilot

Microsoft’s Copilot Studio Agent Builder provides a platform for creating AI Agents.

Step 1: Visit the Copilot Studio Agent Builder.

Step 2: Sign in with your work account.

Step 3: Name your agent, provide a description, and add instructions.

Step 4: Add a Knowledge Base by clicking Add Knowledge and uploading a relevant file.

Step 5: Click on the Create button to create the Agent.

Step 6: Configure actions, triggers, and topics for your AI Agent.

  • Actions: Help the agent complete specific tasks.

  • Triggers: Activate when certain events happen.

Create an AI Agent with Gemini

To create an AI Agent with Gemini, Google’s Vertex AI Agent Builder platform is used.

Step 1: Visit the Vertex AI Agent Builder.

Step 2: Sign in with your Google account.

Step 3: Click the Create A New App button and select the Agent app type.

Step 4: Name your Agent and click Create.

Step 5: Select Gemini AI.

Step 6: Assign a Goal and Instructions to your agent.

For example, if you’re creating an agent for a clothing store, the Goal could be: “Answer questions related to our clothing products.”

Step 7: Define instructions like greeting the user or asking for additional details.

Step 8: Define a tool (product catalog, website sitemap, etc.).

Step 9: Create a Bucket for your tool and then create a Function for your AI Agent to work properly.

Build AI Agent with Claude AI

AI Agents can be developed with Claude AI using direct API access, allowing for the implementation of various patterns in a few lines of code.

Step 1: Access the Anthropic Cookbook on GitHub for sample implementations.

Step 2: Enhance the LLM with augmentations such as retrieval, tools, and memory. Implement these augmentations through the Model Context Protocol.

Step 3: Choose a workflow, such as Prompt Chaining (decomposes a task into a sequence of steps) or Routing (classifies an input and directs it to a specialized follow-up task).

What AI assistants are like Gemini?

Copilot, ChatGPT, Claude AI, and DeepSeek are alternatives to Gemini. DeepSeek is a Chinese AI assistant known for solving reasoning and mathematical problems.

Is Claude AI free?

Yes, Claude AI offers a free version for chatting on the web, iOS, and Android, including document uploads. Pro, Team, and Enterprise plans are also available.


Building AI agents has become more accessible than ever, thanks to tools like OpenAI Swarm, Copilot Studio, Vertex AI Agent Builder, and direct API access with Claude AI, providing developers with multiple avenues to explore.