Cognitive

Part 5 · Applied AI Systems

AI Agents and Tool Use

An agent is a model in a loop: it decides what to do, uses tools, checks the result, and keeps going.

3 min readBuilds on Instruction Tuning and RLHF, Retrieval-Augmented Generation

An agent repeats reasoning, tool use, and observation until a goal is met.

Key concepts

  • The agent loop repeats: reason, act, observe.
  • In function calling, the model requests a tool, and the surrounding application runs it.
  • Short-term memory lives in the context window. Long-term memory is stored outside.
  • Good agents need clear tools, stop conditions, and human checkpoints.
  • Small errors compound: 95% reliability per step becomes about 36% over 20 steps.

An agent is a model running in a loop with tools.

Figure 25.1. An agent is a model running in a loop with tools.
Small error rates compound quickly across many agent steps.

Formal view and evidence

  • Established. If steps are independent with success probability p, end-to-end success over n steps is pn. ReAct interleaves reasoning traces with environmental actions.
  • Debated. The right evaluation standard. Benchmark scores can be sensitive to environment details, harness design, and contamination.
  • Open problem. Reliable long-horizon autonomy, memory management, recovery from errors, and appropriate oversight.

Common misconception

Common belief

"Agents are a special kind of AI brain."

In practice

An agent is usually an ordinary model inside a loop with tools and memory.

Key takeaways

  • An agent is usually a model running in a loop with tools.
  • The surrounding application, not the model, executes tool calls.
  • Small per-step error rates compound across long tasks.

Explore next