liveBook · Manning

AI agent

As explained in The Complete Obsolete Guide to Generative AI

An AI agent is a software system that uses artificial-intelligence models to pursue goals by selecting and carrying out actions.

An AI agent is software that uses an AI model to pursue a goal through actions. Rather than returning a single answer, it can select tools, gather information, interpret results, and continue through a multistep operation. In one common setup, an LLM controls a virtual browser-like search workflow; in reinforcement learning, an agent instead learns decisions from rewards and penalties. section 7.2 section 10.9

A practical agent workflow can include:

  • Giving the model tools, such as web search and math utilities. section 7.2
  • Turning a prompt into a plan, searching for relevant evidence, and using observations to choose follow-up actions. section 7.2
  • Exposing progress notes so a person can inspect the agent’s thoughts, actions, and observations rather than treating the result as magic. section 7.2
  • Learning a policy from feedback when the task is reinforcement learning: act in an environment, receive rewards or penalties, and adjust strategy. section 10.9

Research agent with search tools

A LangChain agent can receive a question about an author’s technology-related titles, search the web for the author and their books, then use the findings to infer the most common topic. The model is configured with temperature 0 for accuracy, while SerpAPI supplies search access. It is a useful automation pattern, but its intermediate steps and final conclusion still deserve inspection. section 7.2

Entering new AgentExecutor chain… I should search for information about David Clinton’s books. Action: Search Action Input: “David Clinton books” Observation: DAVID CLINTON is a Linux server administrator with experience working in IT infrastructure in academic and enterprise environments. … Thought: I should look for more specific information about the books he has published. Action: Search Action Input: “David Clinton books published” Observation: Top David Clinton titles … The Complete LPI Web Development Essentials Exam Study Guide: Learn the basics of HTML, CSS, JavaScript, Express.js, and Node.js and … Thought: I should look for reviews of his books to determine the most common topic. Action: Search Action Input: “David Clinton books reviews” Observation: Books by David Clinton (Author of AWS Certified Solutions Architect Study Guide with 900 Practice Test Questions). Avg rating: 4.06 1,161 ratings 76 reviews. Thought: I now know the most common topic of David Clinton’s books. Final Answer: The most common topic of David Clinton’s books is web development and cloud computing.

Finished chain. “The most common topic of David Clinton’s books is web development and cloud computing.”

The execution trace makes the loop visible: the agent proposes a search, receives an observation, notices what remains unknown, and launches a more specific search. section 7.2

Autonomous code-review loop

Two generative models can be arranged so one produces application code and the other critiques it; the first revises repeatedly. Fully autonomous repetition is risky: a model can give flawed feedback or misinterpret it, even deleting working code, while API-token costs accumulate. section 11.25

Agents can extend AI into research, productivity work, and data analysis, especially when integrations provide live information. More autonomy is not automatically better: tool outputs, model feedback, and repeated iterations can all introduce mistakes or wasteful cost. section 7.13 section 11.25

How The Complete Obsolete Guide to Generative AI covers it

How deep it goes
Demonstrates tool configuration and an execution trace, while defining reinforcement-learning agents separately through rewards and policies.
Examples
Uses a web-search question about an author’s titles and a two-model code generation and critique loop.
What it assumes
Introduces the web-research workflow through guided Python setup, requiring API keys for OpenAI and SerpAPI access.
What you can do after
Apply it via LangChain by configuring search and math tools, initializing an agent, and inspecting its execution trace.
How it connects
Connects AI agents with LLMs, LangChain, SerpAPI, reinforcement learning, meta-learning, and productivity software integrations.

Also explained in

Compare how 33 books explain AI agent →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of The Complete Obsolete Guide to Generative AI. The section links point to the parts of the book it draws on.