What is an AI agent?

An AI agent is a computer program powered by artificial intelligence that can autonomously carry out complex tasks on behalf of human users.

Learning Objectives

After reading this article you will be able to:

  • Define agentic AI
  • Describe how AI agents work
  • Understand how AI agents take actions

Copy article link

What is an AI agent?

An AI agent is a computer program powered by artificial intelligence (AI) that can perform tasks autonomously to assist human users, even without definite instructions. Unlike other AI-powered software, such as chatbots, AI agents can operate outside of a specific prompt-based context. They can go outside of their training data and take a look around at the world, so to speak, to find information. Then they can, on their own, take actions based on that information in pursuit of a larger goal.

AI agents can make decisions, learn from past experiences, and adapt their actions accordingly. They can even consult with other AI agents to obtain relevant information. Humans set goals for AI agents, but it is up to the agents to figure out how to carry out those goals. They can operate independently or with very little human input.

AI agents can either power hardware (as in robotics) or operate only in software.

Agentic AI vs. AI agents

AI agents are the software programs described above: They make decisions and handle tasks on their own. Agentic AI is the field of AI development that enables the construction of AI agents. (Think of the difference between generative AI and individual large language models, such as Microsoft Copilot, or the difference between "cooking" and a specific meal.)

Agentic AI vs. generative AI

Generative AI (GenAI) refers to a type of deep learning model that can generate content in response to prompts. It is the category of AI to which LLMs like ChatGPT belong. Agentic AI is built on top of GenAI. But while an LLM can only respond to prompts through a specific user interface or API, an AI agent can go outside of a defined context and perform actions even without prompts.

A sales executive at a large company might prompt a large language model (LLM) by saying, "Write an email that I can send to 10 of our biggest customers, inviting them to a dinner." But with agentic AI, the executive might instead prompt an AI agent by saying, "Invite 10 of our biggest customers to dinner." In other words, the LLM can generate text, but the AI agent should be able to both generate the email text, find the 10 biggest customers in a CRM, and send personalized email invites to the event (provided it has sufficient permissions to do so).

How do AI agents work?

Large language models (LLMs)

AI agents are built on LLMs. An LLM is a type of AI model that has been trained on large sets of sample data, enabling it to comprehend human-created content and generate content of its own. LLMs understand even imprecise human prompts and requests.

Because they are built on LLMs, AI agents can process and interpret a wide range of data and content, from conversational requests from users to web-hosted video content. AI agents can interpret content from multiple types of media: code, text, audio, video, and so on. They can then use what they learn from that content to refine their actions.

External integrations and interactions

Additionally, AI agents have ways to interact with the world. In robotics, this can include physical sensors and cameras. For software-only AI agents, this can take several forms:

  • Agents can plug directly into external applications via APIs
  • Some AI agents can interact with web apps just like a human user, filling out forms, reading webpages, and so on (they may use a headless browser for this purpose)
  • An emerging standard called Model Context Protocol (MCP) connects AI agents to a variety of tools (email clients, CRMs, billing systems, etc.) with the proper authentication and authorization allowed for the agent

These ways of interacting with the world outside the context of the AI agent's environment enable the AI agent to take actions. Organizations can establish guardrails for AI agents to help ensure the actions they take are correct, just as human users may have limited permissions within an IT environment. In addition to programming policies into the AI agents, organizations can also employ a human-in-the-loop approach, in which humans verify the accuracy of AI agent responses or approve agent actions.

Learning via data flywheel

AI agents can learn as well, using results of past actions and input from human users to refine their actions in the future. They have "memory" — not just in the computational sense of RAM, but in the sense of remembering past interactions and outcomes. This learning takes place through a feedback loop called a data flywheel: Records of an agent's interactions are used by the underlying model to improve future performance.

What are the types of AI agents?

There are two main types of AI agents:

  • Background agents: They perform tasks, especially routine tasks, in the background, with little user interaction. Background agents are like the janitors or maintenance workers keeping the office clean and the lights on.
  • Surface agents: They interact more directly with human users. Chatbot, customer service, and assistant AI agents are in this category. Surface agents are like front-desk workers in an office building, interacting with the people who come in and fulfilling certain tasks as needed.

There are also single-agent and multi-agent systems. Single-agent AI systems are built on just one model. Multi-agent AI systems combine the capabilities of multiple agents that consult with each other to solve problems.

What is an agentic AI chatbot?

Agentic AI chatbots are, like traditional chatbots, able to interact conversationally with people. Agentic AI chatbots can, however, go outside of their chatbot context — leave the chat — to take actions on behalf of the person they are interacting with. A traditional chatbot might be able to provide instructions on filing a support ticket. An agentic AI chatbot would be able to file the ticket itself.

Agentic AI chatbots vs. non-agentic AI chatbots

Non-agentic AI chatbots are reactive, responding to user prompts in accordance with their training data. They may still be powered by an LLM, but they are better at providing users with helpful content or directions than at performing actions on behalf of users. Agentic AI chatbots are able to take action outside of the context of their interaction with a user. Agentic AI chatbots can also learn from a range of sources beyond their training data.

How does Cloudflare support agentic AI?

The Cloudflare developer platform provides all the tools needed to build and deploy AI-powered agents that can:

  • Autonomously perform tasks
  • Communicate with clients in real time
  • Call AI models
  • Browse the web
  • Query a database
  • Support human-in-the-loop interactions

In addition, Cloudflare's global network allows developers to build AI agents with code running anywhere in the world, as close to end users as possible. Learn how to start building AI agents on Cloudflare.