Overview

8 AI agents: The rise of autonomous AI systems

AI agents are systems that perceive their environments and take autonomous actions, moving beyond simple reflexive devices to goal-directed, tool-using collaborators powered by large language models. The chapter traces their rapid rise—from early demonstrations that captured public attention to dramatic gains on benchmarks—showing how agents now plan, remember, and coordinate multi-step workflows across personal productivity, enterprise operations, research, software development, cybersecurity, and physical robotics. It also highlights the growing importance of multi-agent designs, where specialized agents communicate and divide labor to accomplish complex, cross-application tasks.

Under the hood, agents are enabled by models that map generated tokens to structured actions and tools, taught via fine-tuning, prompting, or reinforcement learning, and supported by scaffolds that handle memory, planning, parallelization, and reflection. Retrieval-augmented generation supplies domain knowledge at inference time; protocols like the Model Context Protocol standardize secure, two-way integration with data and tools; and GUI-native “computer-using” agents extend reach by operating software like a human with vision and control over cursor and text. Evaluation is shifting from static accuracy tests to agentic benchmarks that measure end-to-end task completion and tool use, while orchestration frameworks make it easier to build, deploy, and monitor these systems.

With greater autonomy come distinctive risks: misalignment and unintended behaviors, corrupted or privacy-sensitive memory, unsafe or exploited tool use (including indirect prompt injection and multimodal “zero‑click” attacks), fragile dynamics in multi-agent settings, and human factors such as automation bias. The chapter argues for human-in-the-loop safeguards, permissioning and sandboxing, auditable logs, anomaly detection, and continuous monitoring, alongside emerging governance and policy measures tailored to dynamic, goal-seeking systems. Looking ahead, agents will gain more persistent memory, adaptive planning, and collaborative capabilities; realizing their benefits while containing their downsides will depend on rigorous evaluation, thoughtful design, and robust oversight.

An agent receives information from an environment and takes actions based on that information, its context, and prior training.
Example workflow of a personal assistant coordinating a scheduling task using contextual data from messages, calendar events, and user intent
Workflow of an AI coding agent embedded in an IDE, from task planning to deployment
Coordinated multi-agent workflow with specialized agents handling distinct subtasks
A basic implementation of an LLM-based agent
A sample system prompt that demonstrates how the model should invoke tools and describes a tool for file reading
The general agent architecture allowing for multiple actions per response
A sample execution flow for a task with planning and parallelization
The architecture of retrieval-augmented generation (RAG)
An illustration of the interaction between MCP servers and clients

Summary

  • Agents are systems that can interact with their environment and take actions autonomously.
  • LLMs can learn when to execute actions through training and become agentic when deployed in a setting that connects model outputs to actions.
  • Agents are often built using common architectural patterns, including retrieval-augmented generation (RAG) and the Model Context Protocol.
  • AI agents are improving rapidly in evaluations of general web use, research, and software development, and have been adopted in commercial settings for these use cases and others.
  • In addition to the risks and considerations introduced by generative AI, agents pose a novel set of risks due to their autonomy, memory, state persistence, tool access, and emergent behaviors in real-world, multi-agent systems.
  • To prevent misaligned behavior or the hijacking of agents vulnerable to prompt injection, agents should be thoroughly evaluated before deployment and closely monitored once in production.
  • Agents are getting more modular, flexible, and persistent, with active open source ecosystems accelerating development and adoption.

FAQ

What is an AI agent and how does it differ from a traditional LLM?An AI agent is a system that perceives its environment and takes autonomous actions. LLM-based agents map generated tokens to actions (for example, calling tools, APIs, running code, or browsing) rather than only producing text. This lets them plan, act, and iterate toward goals across steps and over time. In short, LLMs answer; agents act.
Where are AI agents being used today?Agents are used in personal assistants (ChatGPT, Apple Intelligence, Microsoft Copilot), enterprise workflows (Salesforce Agentforce, Oracle Fusion, Dynamics, Google Agentspace), research and discovery (AgentLab, AI Scientist, AI Co‑Scientist, Deep Research), software development (Copilot, Cursor, Windsurf, Claude Code, CI/CD), cybersecurity (SOC triage, PentestGPT, XSOAR), and physical environments (industrial automation, robotics, autonomous vehicles, world models). They automate multistep tasks, integrate across tools, and increasingly operate with memory and context, usually with a human in the loop for higher‑risk actions.
What are multi-agent systems and when are they useful?Multi-agent systems coordinate teams of specialized agents that communicate, delegate, and synchronize to complete complex workflows. They divide a goal into modular subtasks (for example, HR, IT, and facilities for employee onboarding) and can run parts in parallel. Frameworks such as OpenAI’s Swarm/Agents SDK and Azure AI Foundry help define roles, memory, and handoffs. While powerful, they typically retain human oversight and introduce new coordination and reliability challenges.
How do LLMs become agents and learn to use tools?Models can be fine‑tuned to emit structured tool calls (as in Toolformer, which taught a model to decide when/how to call APIs), prompted with few‑shot tool examples in a system prompt, or trained via reinforcement learning for complex multistep tasks. Crucially, the scaffold around the model maps outputs to actions and routes results back into context, enabling iterative perception‑action loops. The agent learns not only how to call tools but also when tool use improves outcomes.
What is retrieval‑augmented generation (RAG) and why is it important for agents?RAG augments a model with external knowledge by embedding a document corpus, retrieving the most relevant chunks for a query, and injecting them into context before generation. It is essential for agents that must ground answers in organization‑specific or fresh information. Effective RAG requires careful chunking, high‑quality embeddings, and retrieval engineering; hierarchical representations can further improve precision. While the model need not be retrained, tuning the retrieval pipeline is critical.
What does a typical agent architecture look like?General agent loops let the LLM take multiple actions per task: choose a tool, observe results, update state, and repeat until ready to answer. Memory stores intermediate results and past interactions (short‑ and long‑term), often via an explicit “state” (for example, in LangGraph). Many systems add planning (to outline steps, parallelize independent subtasks) and reflection (to review and correct work). Safeguards such as action limits prevent costly or infinite loops.
What is the Model Context Protocol (MCP) and what problems does it solve?MCP is an open standard that enables secure, two‑way connections between AI clients and external data/tools via MCP servers. Servers expose resources, prompt templates, and executable tools in a consistent way; clients (backed by an LLM) can list, read, and invoke them. MCP reduces custom integration work, improves interoperability, and is supported by popular agent frameworks. Thousands of servers already exist across common apps and enterprise systems.
What are GUI‑native or computer‑using agents?GUI‑native agents perceive screens (images/HTML), then click and type like a human to complete tasks across arbitrary apps and websites. Examples include OpenAI’s Computer‑Using Agent (Operator) and Claude’s computer‑use mode. They promise coverage of the “long tail” of digital workflows without APIs, but remain error‑prone due to visual understanding and UI affordance challenges (for example, misreading colors or controls). As multimodal reasoning improves, their reliability is expected to rise.
How are agents evaluated and why does scaffolding matter?Benchmarks such as GAIA (general assistant tasks), AssistantBench (web interaction across multiple sites), and SWE‑bench (software bug fixing with code edits and tests) measure whether agents reach correct outcomes. Results depend not only on the base model but also on the scaffold (tools provided, memory, navigation, testing), which can significantly affect scores. Agentless settings isolate model ability, while tool‑enabled scaffolds measure end‑to‑end system performance.
What are the main risks of deploying autonomous agents and how can they be mitigated?Key risks include misalignment and unintended autonomy, memory corruption and privacy leakage, unsafe tool use and indirect prompt injection (including zero‑click exploits), emergent failures in multi‑agent coordination, and automation bias that erodes human oversight. Mitigations include human‑in‑the‑loop approvals, permission boundaries and sandboxing, input filtering, memory hygiene and segmentation, audit logs and anomaly detection, explicit planning and reflection steps, and continuous monitoring and governance. Clear objectives, escalation paths, and runtime guardrails are essential as agents act beyond pure conversation.

pro $24.99 per month

  • access to all Manning books, MEAPs, liveVideos, liveProjects, and audiobooks!
  • choose one free eBook per month to keep
  • exclusive 50% discount on all purchases
  • renews monthly, pause or cancel renewal anytime

lite $19.99 per month

  • access to all Manning books, including MEAPs!

team

5, 10 or 20 seats+ for your team - learn more


choose your plan

team

monthly
annual
$49.99
$499.99
only $41.67 per month
  • five seats for your team
  • access to all Manning books, MEAPs, liveVideos, liveProjects, and audiobooks!
  • choose another free product every time you renew
  • choose twelve free products per year
  • exclusive 50% discount on all purchases
  • renews monthly, pause or cancel renewal anytime
  • renews annually, pause or cancel renewal anytime
  • Introduction to Generative AI, Second Edition ebook for free
choose your plan

team

monthly
annual
$49.99
$499.99
only $41.67 per month
  • five seats for your team
  • access to all Manning books, MEAPs, liveVideos, liveProjects, and audiobooks!
  • choose another free product every time you renew
  • choose twelve free products per year
  • exclusive 50% discount on all purchases
  • renews monthly, pause or cancel renewal anytime
  • renews annually, pause or cancel renewal anytime
  • Introduction to Generative AI, Second Edition ebook for free
choose your plan

team

monthly
annual
$49.99
$499.99
only $41.67 per month
  • five seats for your team
  • access to all Manning books, MEAPs, liveVideos, liveProjects, and audiobooks!
  • choose another free product every time you renew
  • choose twelve free products per year
  • exclusive 50% discount on all purchases
  • renews monthly, pause or cancel renewal anytime
  • renews annually, pause or cancel renewal anytime
  • Introduction to Generative AI, Second Edition ebook for free