📖

What is AI Agent?

An AI agent is a software system that uses a large language model to perceive its environment, make decisions, and take actions toward a goal, often by calling tools, retrieving information, or interacting with other systems. Unlike a single chatbot turn, an AI agent plans, executes, and adjusts across multiple steps, sometimes autonomously over longer horizons.

An AI agent is a software system built around a large language model (LLM) that can pursue goals on its own rather than only answering one prompt at a time. It observes input, reasons about what to do next, and takes actions, such as calling an API, searching the web, running code, or writing to a database, then evaluates the result and decides its next move. This loop of perceive, reason, and act is what separates an agent from a plain chatbot.

How an AI agent works

Most AI agents combine three ingredients: a foundation model as the reasoning core, a set of tools the model is allowed to invoke, and a control loop that keeps the model working until the task is done. When given a goal, the LLM typically produces a plan, selects a tool, observes the tool's output, and updates its plan. This pattern is often called ReAct, short for reasoning plus acting.

For example, an agent told to "summarize this week's customer complaints" might list recent files, read each one, extract themes with a language model call, and write a report to a document, all without a human choosing each step. Many agents also keep short or long-term memory so they can carry context across turns and recover from errors. Frameworks like LangGraph, the OpenAI Agents SDK, and Anthropic's tool-use API expose these primitives to developers.

Why it matters

AI agents turn language models from passive responders into systems that can complete real workflows, which is why the term "agentic AI" has spread quickly across enterprise software. They are used for research assistance, coding copilots that open pull requests, customer support bots that look up account data, and operations tasks like scheduling or data entry. Because agents can chain actions and use tools, they can also fail in new ways, through wrong tool calls, infinite loops, or prompt injection from untrusted content, so they are usually deployed with guardrails, human review, and limited permissions.

Key types

  • Single-step tool users: models that make one or two tool calls to answer a question, such as a chatbot that searches the web once.
  • Multi-step task agents: systems that plan and execute several actions in sequence, like a research agent that reads, summarizes, and writes a report.
  • Multi-agent systems: setups where specialized agents hand off work to each other, for example a planner, a coder, and a reviewer collaborating on a software task.
  • Computer-use and embodied agents: agents that drive a browser, control a desktop, or operate robots by translating goals into UI or physical actions.

As foundation models improve at structured reasoning and tool use, AI agents are shifting from demos to production systems that handle end-to-end work, though reliability, evaluation, and safety remain the hard parts.

Frequently Asked Questions

What is the difference between an AI agent and a chatbot?
A chatbot mainly generates a reply to a single user message and stops. An AI agent plans across multiple steps, uses tools such as search, code execution, or APIs, and keeps working until a goal is met or it decides it cannot proceed. The agent pattern is about acting over time, not just responding in one turn.
Do AI agents require a large language model?
Nearly all modern AI agents are built on top of a large language model because the LLM provides the reasoning and planning ability that lets the system choose tools and interpret results. The agent itself is the surrounding loop, memory, and tools, while the LLM is the brain inside it.
What are the main risks of AI agents?
Agents can take unintended or harmful actions because they call real tools with real side effects, such as sending emails or modifying databases. Common risks include hallucinated tool calls, infinite loops, leaking data through logs, and prompt injection from untrusted web content. Production systems usually add permission scopes, human approval steps, and continuous monitoring to reduce these risks.
What are popular frameworks for building AI agents?
Common options include LangGraph and LangChain for orchestrating tool-using agents, the OpenAI Agents SDK and Anthropic's tool-use API for native model integrations, and open frameworks like CrewAI and AutoGen for multi-agent collaboration. The ecosystem changes quickly, so most teams choose based on which models and tool integrations they need.