Agents & Tool Use
Theory
An LLM becomes an agent when it gains a tool inventory and runs inside a loop: reason β select tool β invoke with structured args β read result β loop or finish.
Tool taxonomy:
| Category | Examples | Risk level |
|---|---|---|
| Knowledge | web search, RAG, SQL reads | Low β read-only |
| Computation | calculator, code interpreter | Low β no side effects |
| Write actions | email, file writer, DB updates | High β irreversible |
Calling protocol: each tool has a name, description, and JSON schema. The model emits structured JSON; the runtime parses + executes.
Thinktask + context
Selectfrom inventory
Executecall + observe
Gate / Doneconfirm or answer
A step cap stops loops; only a confirmation gate stops irreversible harm. Next: ReAct formalizes the loop with explicit reasoning traces.