wAIpoint
Italiano

LLM-based agents & tool use

Level: Intermediate

What it is

An LLM agent is a language model placed in a loop where it can act: it thinks about what to do, calls a tool (a search, a calculator, a program), reads the result and decides the next step, until the task is done. ReAct showed the value of interleaving reasoning and actions; Toolformer showed that models can learn when to call tools.

What it is for

Tasks that need several steps and outside information: researching a question across sources, fixing a bug by running the tests, booking or filling in forms, analysing a spreadsheet. The more freedom you give an agent, the more useful and the more risky it is.

How to do it

The process, step by step. Libraries and tools change; these steps stay.

  1. Define the goal and what "done" looks like in a way you can check.
  2. Choose the tools it needs, and no more: each tool has a clear name, a short description and inputs it expects (tools can come from MCP servers).
  3. Write instructions that say how to work: plan first, use the tools, check results, and ask you when unsure.
  4. Run it on an easy case and read every step it took, not only the final answer.
  5. Add limits: a maximum number of steps, a spending cap, and your approval before anything irreversible (sending, deleting, paying).
  6. Collect a handful of test tasks and re-run them after every change, because agents fail in new ways whenever the model or prompt changes.

Lately

Timeline

  1. 2022ReAct: language models interleave reasoning traces and actions to use external sources (Yao et al.). source
  2. 2023Toolformer: language models teach themselves which tools (APIs) to call and how (Schick et al.). source

Sources