liveBook · Manning

Tool usage

As explained in AI Agents in Action, Second Edition

A tool call is a structured request from an AI system to invoke a tool and obtain its result.

Tool usage lets an LLM or agent perform functions or gather information beyond its direct response. A tool call is a task inside a larger workflow, where the result can guide the next decision. section 2.2.2

Unlike ordinary prompt instructions, tool usage connects an agent to executable capabilities and external data. The agent can choose a source, call a tool, inspect its result, and continue toward the goal. section 3.1.1 section 2.2.2

A practical tool-use loop has four parts:

  • Describe the task and the decision rules clearly in the prompt. section 2.2.2
  • Expose or register the required function as an available tool. section 2.5
  • Let the agent call the tool to perform work or gather information. section 2.2.2
  • Inspect the result and trace to verify that the call happened before the final response. section 2.5

Searching for research sources

An agent receives a research task, calls get_research_sources, and then returns its response. Registering the function with tools=[get_research_sources] and checking the trace confirms that one tool call occurred before the LLM response. section 2.5

Figure 3.1 The leading challenges developers face when building agents include fragmented tool integration, inconsistent data access, complicated multiple-agent orchestration, and security and control.

Use the figure to compare fragmented tool integration with inconsistent data access, multi-agent orchestration, and security concerns. section 3.1.1

How AI Agents in Action, Second Edition covers it

How deep it goes
Explains tool calls as workflow tasks and demonstrates registration and tracing, but defers implementation details of tool internals.
Examples
Demonstrates an internal research-sources tool, a search workflow, function registration, and trace inspection.
What you can do after
Apply it via OpenAI Agents by registering a function, prompting its use, and verifying the resulting tool call in traces.
How it connects
Connects tool usage with large language models, agents, prompt engineering, external data access, and tool integration.

Also explained in

Compare how 13 books explain tool usage →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of AI Agents in Action, Second Edition. The section links point to the parts of the book it draws on.