BLOG · AGENTIC AI

AI agents explained: roles, architecture and how agentic AI finishes end-to-end tasks

Agentic AI · · 9 min read · By Adnyesh (Adi) Dalpati, Founder, ZNOS

A technical but plain-English guide to AI agents and agentic AI: the roles agents play, what happens inside one, how a team of them finishes a real task, and where they fail.

How AI agents think, act and finish the job: a think, act, observe loop around a goal
In this guide (9 parts)
  1. What are AI agents?
  2. The roles AI agents play
  3. AI agent architecture: what is inside one agent
  4. How do AI agents work? The ReAct loop
  5. Multi-agent systems: orchestrators and hand-offs
  6. How agents finish end-to-end tasks
  7. Where AI agents fail, and the guardrails that work
  8. Where agentic AI is going
  9. Frequently asked questions

Ask a chatbot why yesterday's orders dropped and you get a list of possible reasons. Ask an AI agent and it opens your analytics, checks the checkout, finds the discount code that expired at midnight, and asks whether you want it extended. One answers. The other finishes the job.

That gap is what AI agents and agentic AI are about. Below: the roles agents play, what happens inside one, and how a team of them takes a goal from brief to done, with five original diagrams of the generic architecture.

Quick answer An AI agent is software that uses a large language model to pursue a goal by itself. It plans the steps, calls tools such as APIs or a browser, reads the results and repeats until the job is done or a person needs to decide. OpenAI's guide puts it in one line: "Agents are systems that independently accomplish tasks on your behalf."2

33%of enterprise software apps will include agentic AI by 2028, up from under 1% in 2024Gartner
40%+of agentic AI projects will be cancelled by the end of 2027Gartner
40%of large organisations report scaling AI agents, up from 27% a year earlierMcKinsey, 2026
+34 ptsabsolute success-rate gain for ReAct agents on the ALFWorld benchmarkYao et al.

What are AI agents?

The clearest line comes from Anthropic. Workflows are "systems where LLMs and tools are orchestrated through predefined code paths". Agents are "systems where LLMs dynamically direct their own processes and tool usage, maintaining control over how they accomplish tasks."1 Google's agents whitepaper says much the same: an agent "attempts to achieve a goal by observing the world and acting upon it using the tools that it has at its disposal."3

"Agentic AI" is the wider idea: AI that acts with some autonomy toward a goal. An AI agent is one working system built that way. Agentic software is any product with agents inside it. Here is how an agent compares with the tools people mix it up with.

ChatbotWorkflow automationAI agent
Who decides the stepsThe user, one prompt at a timeThe developer, in advanceThe model, at run time
Uses toolsRarelyFixed integrationsChooses tools as it goes
Handles surprisesExplains themBreaksRe-plans
Ends whenIt has repliedThe last step runsThe goal is met or a stop rule fires

In practice you stop managing messages and start managing outcomes, as we explain in giving AI tasks instead of prompts.

The roles AI agents play

Textbooks sort agents by how they decide. IBM's list of the five types of AI agents covers simple reflex, model-based reflex, goal-based, utility-based and learning agents.19 In real deployments it is more useful to sort them by the job they do in a team:

At ZNOS we package these roles as AI employees. Tanmay handles marketing, Suri handles design and Raghu runs operations. Each works in the business's own tools, with only the access the owner chooses.

AI agent architecture: what is inside one agent

The 2023 survey by Wang et al. reduced dozens of agent designs to one framework "composed of a profiling module, a memory module, a planning module, and an action module."4 Production systems add a few layers around that. Figure 1 shows the full stack.

Single AI agent architecture diagram: perception inputs feed context assembly, a large language model reasoning core works with a planner and short- and long-term memory, guardrails check each action, a structured tool call goes through APIs, MCP servers or a browser to the outside world, and results loop back as observations
Figure 1. One agent, ten parts. The dashed line at the bottom is what makes it an agent rather than a chatbot. Tap to enlarge.

1. Perception and context assembly

Goals, events, files, the last result and human feedback are assembled into one prompt with the instructions, tool descriptions and retrieved memories. Much of an agent's quality is decided here, before the model runs.

2. The reasoning core

A large language model reads that context and decides one thing: call a tool, or give the final answer. OpenAI's guide names the three essentials as the model, the tools and the instructions.2 Google calls the model "the centralized decision maker for agent processes".3

3. Planning

The planner breaks the goal into ordered sub-goals, re-plans when a step fails, and holds the stop conditions: maximum steps, a budget, and when to ask a human.

4. Memory

Short-term memory is the context window, and it is small. Long contexts also lose facts: one study found that models do best when key information sits "at the beginning or end of the input context", and do much worse when it is in the middle.14 So agents keep long-term memory outside the model and fetch only what they need (Figure 2).

Agent memory architecture diagram: a working memory context window in the centre, a read path that searches semantic, episodic and procedural long-term stores and scores results by relevance, recency and importance, and a write path that summarises each task and writes back to all three stores
Figure 2. Semantic memory holds facts, episodic memory holds what happened and procedural memory holds how to do things.

The retrieval scoring in Figure 2 comes from the Generative Agents paper, whose memory model "combines relevance, recency, and importance".13 The write path comes from Reflexion, where agents improve "not by updating weights, but instead through linguistic feedback" stored in an episodic memory buffer.15

5. Tools, actions and MCP

An action is a structured call (tool name plus typed arguments) checked against a schema before it runs. Tools can be APIs, a browser, a code sandbox or document search. The Model Context Protocol (MCP) standardises the plumbing. A host application creates "one MCP client for each MCP server", and servers expose three primitives: tools, resources and prompts.6 Anthropic open-sourced MCP in November 2024 and donated it to the Linux Foundation's new Agentic AI Foundation in December 2025, when it had "97M+ monthly SDK downloads".7

6. Guardrails

Before any action runs, a policy layer checks permissions, budget and risk. OpenAI's guide names two triggers for handing control to a person: "exceeding failure thresholds" and "high-risk actions".2

How do AI agents work? The ReAct loop

Almost every modern agent runs some version of ReAct, from Yao et al. in 2022. The model generates "reasoning traces and task-specific actions in an interleaved manner".5 It thinks, acts, reads the observation, and thinks again. On two benchmarks, ALFWorld and WebShop, ReAct beat imitation and reinforcement learning methods "by an absolute success rate of 34% and 10% respectively", with only one or two examples in the prompt.5

ReAct loop diagram: Thought, Action and Observation nodes on a cycle, a goal entering at Thought, an exit to the final answer when the goal is met, stop rules for step budget and human approval, and an example trace of an agent diagnosing a drop in orders caused by an expired discount code
Figure 3. The ReAct loop with an illustrative trace. Note step 3: the agent pauses for approval before changing a live offer.

Multi-agent systems: orchestrators and hand-offs

One agent with forty tools gets confused. The usual fix is several narrow agents under an orchestrator. Anthropic calls this the orchestrator-workers pattern, and pairs it with an evaluator-optimizer loop where one model's output is critiqued by another until it passes.1 LangGraph builds the same shape as a supervisor graph in which "specialized agents are coordinated by a central supervisor agent",9 and its interrupts "pause graph execution" until a human responds.21 Microsoft's AutoGen framework, now archived, framed it as agents "that can converse with each other to accomplish tasks".20

Multi-agent orchestration diagram: a human owner gives a goal to an orchestrator agent, which hands tasks to researcher, planner, creator, designer, executor and reviewer agents; the agents share a memory blackboard and a scoped tool layer; a reviewer loop sends work back for revision; final output passes a human approval gate before reaching the outside world, and rejections go back to the orchestrator
Figure 4. Shared memory stops agents from repeating each other's work. Scoped tools mean each agent can only touch what its role needs.

Two open standards now connect the pieces. MCP links agents to tools and data. Google's Agent2Agent (A2A) protocol, launched in April 2025 with more than 50 partners, lets agents "communicate with each other, securely exchange information, and coordinate actions".8

How agents finish end-to-end tasks

Take one goal: "Run our festive-season campaign, two weeks, fixed budget." Figure 5 traces it.

End-to-end task flow swimlane diagram for a festive marketing campaign: the owner's brief becomes a task graph, a researcher reads analytics and the web, a planner proposes channels and budget, the owner approves the plan, writer and designer agents create assets with a reviewer loop, the owner approves final creatives, tools launch the campaign, the orchestrator monitors results, and learning feeds the next plan
Figure 5. Two human approvals, at the plan and at the final creatives. Everything between them runs on its own.
  1. Goal to plan. The orchestrator turns the brief into a task graph: research, strategy, creative, launch, monitor.
  2. Research. Last year's sales and ad data, plus competitors' public offers.
  3. Plan approval. A planner proposes channels, offers and budget. The owner approves, edits or rejects it.
  4. Create and review. Writer and designer agents work in parallel; a reviewer checks facts, offer terms and brand.
  5. Final approval, then launch. Nothing is published or paid for until the owner signs off; then executors schedule it through tool calls.
  6. Monitor and learn. Daily checks on spend, stock and replies; results and corrections go back into memory.

Step 6 is where most systems are weakest. In a 2026 paper on layered knowledge graphs, ZNOS founder Adnyesh Dalpati argues that feedback should flow backwards and fix the underlying records, not just the one answer.18 We explain why the approval step matters in human-in-the-loop AI.

Where AI agents fail, and the guardrails that work

Gartner expects over 40% of agentic AI projects to be cancelled by the end of 2027, "due to escalating costs, unclear business value or inadequate risk controls".10 The technical failures are well known:

The guardrails that work are unglamorous: least-privilege tools for each agent, schema-checked actions, step and spend budgets, a reviewer agent, a full activity log and a human approval gate on anything that sends, pays, publishes or deletes.

Where agentic AI is going

Gartner predicts that 33% of enterprise software applications will include agentic AI by 2028, up from less than 1% in 2024, and that at least 15% of day-to-day work decisions will be made autonomously by then.10 It also expects up to 40% of enterprise apps to include task-specific agents by the end of 2026.11 McKinsey's 2026 survey found that 40% of large organisations are already scaling AI agents.12 Expect fewer chat windows and more narrow agents with real jobs, open standards like MCP and A2A, and people approving the decisions that matter.

Key takeaways

Frequently asked questions

What are AI agents?

AI agents are software systems that use a large language model to pursue a goal on their own. They plan the steps, call tools such as APIs, a browser or a database, read the results and keep going until the task is done or a person needs to decide.

How do AI agents work?

Most AI agents run a loop called ReAct: the model reasons about the next step, calls a tool, reads the observation and reasons again. Around that loop sit a planner, short-term and long-term memory, a tool layer (often connected through the Model Context Protocol) and guardrails that send risky actions to a human for approval.

What is the difference between AI agents and agentic AI?

Agentic AI is the broader approach: AI that acts with some autonomy toward a goal. An AI agent is one working system built that way. Agentic software is any product that has agents inside it.

What are the 5 types of AI agents?

The classic five are simple reflex, model-based reflex, goal-based, utility-based and learning agents. In business deployments it is more useful to think in roles: an orchestrator or planner, researchers, executors, reviewers and specialists such as marketing, design or operations agents.

Is ChatGPT an AI agent?

A chat assistant on its own answers one message at a time, so it is not an agent. It behaves as an agent when it is given tools and allowed to take several steps toward a goal by itself, which is what agent modes in chat assistants do.

What is a multi-agent system?

A multi-agent system splits a goal across several specialised agents coordinated by an orchestrator. The agents share memory, each gets only the tools its role needs, a reviewer agent checks the work, and a human approves anything that sends, pays, publishes or deletes.

Sources

  1. Anthropic, "Building effective agents" (Dec 2024): https://www.anthropic.com/research/building-effective-agents
  2. OpenAI, "A practical guide to building agents": https://cdn.openai.com/business-guides-and-resources/a-practical-guide-to-building-agents.pdf
  3. Wiesinger, Marlow and Vuskovic, "Agents" whitepaper, Google (2024): https://www.kaggle.com/whitepaper-agents
  4. Wang et al., "A Survey on Large Language Model based Autonomous Agents" (arXiv 2308.11432): https://arxiv.org/abs/2308.11432
  5. Yao et al., "ReAct: Synergizing Reasoning and Acting in Language Models" (arXiv 2210.03629): https://arxiv.org/abs/2210.03629
  6. Model Context Protocol, architecture overview: https://modelcontextprotocol.io/docs/learn/architecture
  7. Anthropic, "Donating the Model Context Protocol and establishing the Agentic AI Foundation" (Dec 2025): https://www.anthropic.com/news/donating-the-model-context-protocol-and-establishing-of-the-agentic-ai-foundation
  8. Google Developers Blog, "Announcing the Agent2Agent Protocol (A2A)" (Apr 2025): https://developers.googleblog.com/en/a2a-a-new-era-of-agent-interoperability/
  9. LangChain, langgraph-supervisor (GitHub): https://github.com/langchain-ai/langgraph-supervisor-py
  10. Gartner, "Over 40% of Agentic AI Projects Will Be Canceled by End of 2027" (Jun 2025): https://www.gartner.com/en/newsroom/press-releases/2025-06-25-gartner-predicts-over-40-percent-of-agentic-ai-projects-will-be-canceled-by-end-of-2027
  11. Gartner, "40% of Enterprise Apps Will Feature Task-Specific AI Agents by 2026" (Aug 2025): https://www.gartner.com/en/newsroom/press-releases/2025-08-26-gartner-predicts-40-percent-of-enterprise-apps-will-feature-task-specific-ai-agents-by-2026-up-from-less-than-5-percent-in-2025
  12. McKinsey, "The state of AI in 2026: On the road to ROI": https://www.mckinsey.com/capabilities/quantumblack/our-insights/the-state-of-ai
  13. Park et al., "Generative Agents: Interactive Simulacra of Human Behavior" (arXiv 2304.03442): https://arxiv.org/abs/2304.03442
  14. Liu et al., "Lost in the Middle: How Language Models Use Long Contexts" (arXiv 2307.03172): https://arxiv.org/abs/2307.03172
  15. Shinn et al., "Reflexion: Language Agents with Verbal Reinforcement Learning" (arXiv 2303.11366): https://arxiv.org/abs/2303.11366
  16. OWASP Top 10 for LLM Applications 2025, LLM01 Prompt Injection: https://genai.owasp.org/llmrisk/llm01-prompt-injection/
  17. OWASP Top 10 for LLM Applications 2025, LLM06 Excessive Agency: https://genai.owasp.org/llmrisk/llm062025-excessive-agency/
  18. Dalpati, A. (2026), "Reverse is Forward: Domain-Specific Modeling with Layered Knowledge Graphs and Large Language Models": https://doi.org/10.5281/zenodo.24414472
  19. IBM, "Types of AI agents": https://www.ibm.com/think/topics/ai-agent-types
  20. Wu et al., "AutoGen: Enabling Next-Gen LLM Applications via Multi-Agent Conversation" (arXiv 2308.08155): https://arxiv.org/abs/2308.08155
  21. LangChain docs, LangGraph interrupts (human-in-the-loop): https://docs.langchain.com/oss/python/langgraph/interrupts

Related: What are AI employees? How ecommerce founders run operations with AI agents · Agentic AI employees which every brand needs desperately · Human in the loop AI: why a confirm button matters most · All articles

About the author

Adnyesh (Adi) Dalpati · Founder, ZNOS

Founder of ZNOS, where brands recruit an AI team. Uses ZNOS every day to run a direct-to-consumer brand.

Follow AdiLinkedInX @adnyeshInstagram @adnyeshFollow ZNOSX @znos_ai

Currently invite only. Put a team of AI agents to work, with you approving what matters. ZNOS lets you recruit AI employees for marketing, design, operations and more, and nothing is sent, posted or paid until you approve it.

Talk to Sophia