liveBook · Manning

AI agent

As explained in AI Agents and Applications

An AI agent is a software system that works with a large language model to perform multi-step tasks by selecting actions, invoking tools, and adapting to intermediate results.

A travel assistant may need to find destinations, check their weather, and combine the results into an answer. An AI agent handles this kind of multi-step task by working with a large language model (LLM) to choose actions, call tools, and adapt to intermediate results. It can operate autonomously or under constraints set by its developer. section 1.1 section 11.0

A typical agent loop works as follows:

  • Give the LLM the request and descriptions of the available tools. section 1.1.3
  • Let the LLM select a tool and generate its query; the agent executes the call and collects the result. section 1.1.3
  • Provide results to the LLM so it can choose another action or produce a final response. Repeat as needed until a stopping condition is reached. section 1.1.1 section 1.1.3

The distinction is where decisions happen. An engine generally runs a predefined chain, while an agent can choose and revise its approach at runtime. An agentic workflow can use an LLM to choose among predefined paths, but an agent dynamically selects and combines tools. This flexibility trades some predictability for adaptability. section 1.1.1 section 5.1

A holiday-planning agent

A booking request can lead the agent to consult flight, hotel, car rental, weather, and internal deals services. The LLM selects relevant tools and generates queries; the agent executes them and returns the collected data to the LLM for a summarized holiday plan. Multiple iterations may be needed. section 1.1.3

Figure 1.5 Workflow of an AI agent tasked with assembling holiday packages
figure

Follow the holiday request through tool selection, data collection, and the final plan. section 1.1.3

A practical starting point is a single travel-information tool backed by a vector store of destination content. Add a weather tool to answer questions that need both destination and current conditions. LangGraph can manage branching and cycles; prebuilt components can reduce the code needed for tool calling. section 11.1 section 11.0 section 5.3 section 11.9.2

Do not assume a tool was called correctly just because an answer looks plausible. Debug the registered tools and inspect execution traces to verify calls. For critical actions in high-stakes settings, include human review. section 13.4.5 section 1.1.3

How AI Agents and Applications covers it

How deep it goes
Builds tool-calling mechanics from scratch, then simplifies them with prebuilt LangGraph components and traces execution.
Examples
Builds travel assistants that retrieve Cornwall destination information and check weather, alongside a holiday-package planning scenario.
What it assumes
Introduces agents from a simple Python script while drawing on earlier retrieval and vector-store foundations.
What you can do after
Apply it via LangGraph to build and debug a multi-tool travel agent.
How it connects
Connects agents to agentic workflows, retrieval-augmented generation, memory, planning, and multi-agent systems.

Also explained in

Compare how 46 books explain AI agent →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of AI Agents and Applications. The section links point to the parts of the book it draws on.