AI Agents
What Is Agentic AI? How AI Agents Work, Types, Examples and Limits
By Amjid Ali · · 9 min read

In this article
Agentic AI is AI that works toward a goal by deciding its own next steps: a large language model plans, calls tools such as search, databases or APIs, checks what happened and repeats until the job is done or it is stopped. A chatbot answers a question and waits; an agent takes actions. That ability to act is what makes agentic AI useful, and also what makes it slower, costlier and riskier than a plain model call.
Quick answer
- Definition: a system where an LLM "dynamically directs its own processes and tool usage" (Anthropic's wording), instead of following a fixed code path.
- Parts: model + tools + memory + a loop + guardrails.
- Good for: open-ended tasks where you cannot predict the steps in advance (debugging code, research, messy support tickets).
- Bad for: anything you can write as rules. If a function or a fixed workflow can do it, use that.
- Is ChatGPT agentic? Normal chat, no. ChatGPT's agent mode, yes (details below).
What agentic AI actually means
The word "agentic" gets stuck on everything from chatbots to scheduled scripts, so it helps to use a precise definition. Anthropic's engineering team draws the line between two kinds of LLM system:
- Workflows: "systems where LLMs and tools are orchestrated through predefined code paths."
- Agents: "systems where LLMs dynamically direct their own processes and tool usage, maintaining control over how they accomplish tasks."
Anthropic's Claude Agent SDK documentation gives the short version: an agent is "an application that completes a task by planning its own steps and calling tools." Google Cloud describes the same thing as AI that "can set goals, plan, and execute tasks with minimal human intervention," and IBM as a system that "can accomplish a specific goal with limited supervision."
The common thread is who decides the next step. In normal software, you do, in advance. In an agent, the model does, at run time. Everything else (tools, memory, multi-agent teams) is detail. For how the two terms relate, see AI agents vs agentic AI, and for the line between creating content and taking action, see agentic AI vs generative AI.
How AI agents work: model, tools, memory, loop and guardrails
Every agent framework, from the OpenAI Agents SDK to LangGraph and n8n, is built from the same five parts.
1. The model (the reasoning engine)
A large language model reads the goal, the conversation so far and the results of earlier steps, then decides what to do next: call a tool, ask a question or give a final answer. Stronger reasoning models plan better over long tasks, but cost more per step.
2. Tools (how the agent acts)
Tools are functions the model can call: search the web, query a database, send an email, run code. The model does not run them itself. It outputs a structured request (this is function calling), your code runs the function, and the result goes back to the model. The Model Context Protocol is the open standard for plugging tools and data sources into agents without custom glue for each one.
3. Memory (what the agent knows)
- Short-term: the conversation and tool results inside the model's context window.
- Long-term: facts stored outside the model (a database, files, a vector store) and fetched when relevant.
What you put into that window, and what you leave out, decides most of an agent's quality and cost. That discipline is called context engineering.
4. The loop (what makes it an agent)
The loop is the core of every agent. The OpenAI Agents SDK documentation describes its runner plainly: call the model; if the output is a final answer, stop; if it asks for tools, run them, append the results and call the model again. If the run goes past a turn limit (max_turns), it raises an error instead of looping forever.
goal -> model decides -> tool call -> result -> model decides -> ... -> final answer
(stop on: answer, turn limit, budget, or human "no")
The code that wraps this loop (the tool runner, permissions, context management, retries) is often called the agent harness. Claude Code and Codex are agent harnesses; so are the SDKs you can build on.
5. Guardrails (what keeps it safe)
Guardrails are checks around the loop: input and output validation, tool allowlists, spending limits, turn limits and human approval for high-impact actions. OWASP calls the failure here "excessive agency": too many tools, too many permissions or too much autonomy. Guardrails are not optional extras; they are the difference between a demo and something you can leave running.
Types of AI agents
There are two useful ways to classify agents: the classic textbook types and the practical shapes you will meet in 2026.
The classic five (from AI textbooks)
IBM's summary of the standard taxonomy:
| Type | How it decides | Example |
|---|---|---|
| Simple reflex | Fixed condition-action rules on current input, no memory | A thermostat |
| Model-based reflex | Rules plus an internal model of the world | A robot vacuum mapping a room |
| Goal-based | Plans actions toward an objective | A route planner |
| Utility-based | Scores outcomes and picks the best trade-off | A pricing engine balancing margin and volume |
| Learning | Improves from feedback over time | A recommender that adapts to clicks |
LLM agents are mostly goal-based: you give a goal, they plan toward it.
The practical shapes of LLM agents
| Shape | What it does | Typical tools |
|---|---|---|
| Tool-calling assistant | Answers by calling a few APIs | Order lookup, CRM, calendar |
| Coding agent | Reads, edits and tests a codebase | Shell, file edit, git |
| Research agent | Searches, reads and summarizes sources | Web search, fetch, notes |
| Computer or browser agent | Clicks and types in a real UI | Virtual browser, screenshots |
| Multi-agent system | A manager hands sub-tasks to specialist agents | Other agents as tools |
Examples of agentic AI in 2026
- Coding agents: tools like Claude Code, Codex and Cursor read a repository, plan a change, edit files and run the tests.
- ChatGPT agent mode: OpenAI's help center describes it as reasoning, researching and "taking actions on your behalf" with a visual browser, code interpreter, terminal and connected apps.
- Customer support: an agent reads a ticket, looks up the order, drafts a reply and proposes a refund that a person approves.
- Business workflows: in n8n, an AI Agent node picks which connected tools to call inside a larger, mostly fixed workflow.
- Research and analysis: an agent searches, reads documents, cross-checks claims and writes a cited summary.
Is ChatGPT an agentic AI?
It depends on the mode. A normal ChatGPT conversation is generative AI: it produces text or images in response to you and then stops. It may call a tool such as web search, but you drive each turn.
ChatGPT's agent mode is agentic. According to OpenAI's help article, you start it from the tools menu or by typing /agent, describe a task, and the agent plans and executes it, pausing "for clarification or confirmation when needed." It can sign into websites and use connected apps, and OpenAI lists safeguards including "user confirmations for high-impact actions," prompt injection monitoring and a "watch mode" on certain sites. As of October 2026 the help article lists monthly agent limits per plan (for example 40 messages a month on Plus and 400 on Pro). OpenAI's own article also warns that when the agent can read your email or files, prompt injection becomes a real risk.
So the honest answer: ChatGPT is a generative AI product that includes an agentic mode.
The angle most guides skip: most automation should not be an agent
Read the top vendor pages on agentic AI and you could conclude that every process should become an agent. In practice, the opposite is usually true. Most business automation is a known sequence of steps with a few decisions, and that is exactly what deterministic code and workflow tools are good at.
The builders say this themselves:
- Anthropic recommends "finding the simplest solution possible, and only increasing complexity when needed," and notes that agents trade "latency and cost for better task performance," with a risk of "compounding errors."
- Microsoft's Agent Framework documentation is blunter: "If you can write a function to handle the task, do that instead of using an AI agent."
A simple rule: deterministic first, agent where judgment is needed
| Part of the job | Use | Why |
|---|---|---|
| Moving data between systems, scheduling, validation, calculations | Plain code or a workflow (n8n, Make, a script) | Same input, same output; cheap; easy to test |
| Reading messy input (an email, a PDF, a free-text ticket) | One LLM call with structured output | Language understanding, but no open-ended loop |
| Choosing among several actions based on context | An agent with a small, scoped toolset | Real judgment is needed here |
| Anything irreversible (payments, deletions, sending to customers) | Agent proposes, human or rule approves | Mistakes are expensive |
A typical good design is a fixed workflow with one agentic step in the middle. For example: a webhook receives a support email (deterministic), an LLM classifies it and extracts the order number (one call), an agent looks up the order and drafts a resolution (agentic), and a rule checks the refund amount before a person approves it (deterministic plus human). You get the judgment where you need it and predictability everywhere else.
Why it matters: each agent step is a model call, so a loop that runs 15 times costs at least 15 times a single call (more, as the context grows), adds latency, and gives 15 chances to go wrong. A deterministic step costs almost nothing and fails the same way every time, which makes it easy to fix.
Where AI agents fail
Agents fail in predictable ways. Knowing them is most of the work of building reliable ones.
- Compounding errors. A small mistake in step 2 becomes the premise for step 3. Long loops amplify this.
- Confident false completion. The agent reports success when the tool call failed or never happened. Always verify outcomes in code (did the row change? did the email send?), not by trusting the final message.
- Hallucinated tool use. It invents parameters, IDs or results. Strict tool schemas and validation reduce this.
- Looping and runaway cost. The agent retries the same failing call. Turn limits, budgets and timeouts stop it.
- Context overload. Too many tools, documents or instructions in the window make the model slower, more expensive and less accurate. This is why well-written agent skills load detail only when needed.
- Prompt injection. Text the agent reads (a web page, an email) contains instructions, and the agent follows them. This is the top risk in OWASP's LLM list.
- Excessive permissions. The agent can do far more than the task needs, so any mistake or injection has a large blast radius.
These are not theoretical. OpenAI now publishes a page of misalignment reports from its own testing; it lists cases such as a model that "used leaked API keys found on public GitHub" and an agent that reached a public chatbot "through a DNS filtering gap in its training sandbox." The pattern in most incidents is ordinary security hygiene: exposed credentials, weak sandboxes, missing monitoring. We cover them, and a practical checklist, in AI agent security.
How to get started with agentic AI
- Pick one narrow task with a clear success test (for example "answer order-status emails").
- Write the deterministic parts first. Only the step that needs judgment gets an agent.
- Give the agent two or three tools, with strict inputs and read-only access where possible.
- Set limits: a turn cap, a budget, timeouts and human approval for anything irreversible.
- Log every tool call and review real runs before widening scope.
When you are ready to write code, our step-by-step guide on how to build an AI agent walks through a working Python example, and AI agent frameworks compared helps you pick a framework.
The bottom line
Agentic AI is a loop: a model decides, a tool acts, the result comes back, repeat. It is genuinely useful when the steps cannot be known in advance and someone would otherwise spend time making judgment calls. It is the wrong tool when the steps are known. Build the predictable parts as plain automation, give the agent the smallest set of tools and permissions that does the job, and keep a person in the loop for anything you cannot undo.
Frequently asked questions
Is ChatGPT an agentic AI?+
A plain ChatGPT conversation is generative AI: it answers and waits for you. ChatGPT's agent mode is agentic, because it plans a task and acts on your behalf with a browser, code interpreter, terminal and connected apps, pausing for confirmation on high-impact actions.
What is an agentic AI system in simple terms?+
It is software where a language model decides the next step, calls tools such as search, databases or APIs, looks at the result and repeats until a goal is met. The model directs the process instead of following a fixed script.
What is the difference between agentic AI and automation?+
Traditional automation follows rules you wrote in advance, so the same input always takes the same path. Agentic AI lets a model choose the path at run time, which handles messy inputs but is less predictable, slower and more expensive.
What are examples of agentic AI?+
Coding agents that edit and test a codebase, support agents that look up an order and issue a refund with approval, research agents that search and summarize sources, and browser agents that fill in forms or book things for you.
Is agentic AI safe to use?+
It can be, if the agent gets only the tools and permissions it needs, high-impact actions need human approval, and everything it does is logged. Most real incidents so far came from exposed credentials and weak containment, not from clever attacks.
Sources
- Building effective agents, Anthropic
- Agent SDK overview, Anthropic
- What is agentic AI? Definition and differentiators, Google Cloud
- What is Agentic AI?, IBM
- Types of AI agents, IBM
- ChatGPT agent, OpenAI Help Center
- Running agents (agent loop and max_turns), OpenAI Agents SDK docs
- Microsoft Agent Framework overview, Microsoft Learn
- LLM06:2025 Excessive Agency, OWASP GenAI Security Project
- Misalignment reports and notices, OpenAI
The weekly AI briefing
Get the guides like this one, once a week
Keep reading
AI AgentsAgentic AI vs Generative AI: The Difference ExplainedGenerative AI creates content when prompted; agentic AI uses the same model to plan and take actions toward a goal. Differences, a table, examples and costs. · 8 min read
AI AgentsAI Agents vs Agentic AI: What's the Difference?An AI agent is one system that pursues a task with tools; agentic AI is the wider approach of letting models plan and act. The difference, a table and examples. · 8 min read
AI AgentsAI Agent Security: Risks, Recent Rogue-Agent Incidents and a Practical ChecklistAI agent security in 2026: prompt injection, excessive permissions, data theft and rogue actions, the latest real incidents, OWASP guidance and a checklist. · 9 min read