← All lessons
0140

Agents

A language model on its own only produces text. An agent wraps it in a loop so it can take actions in the world: search, run code, call an API, then read what came back.

The model thinks, then emits a tool call instead of a final answer. The system runs that tool and feeds the result back as new context. The model observes, thinks again, and repeats until the goal is met. The LLM is the brain deciding what to do; the tools are the hands. This loop is what turns a chatbot into something that gets tasks done.

LLMtool
thinkGoal: weather in Delhi tomorrow
1/5

Check yourself

The LLM cannot fetch live weather by itself. So how does the agent end up giving tomorrow's forecast?

Go deeper (free): Lilian Weng — LLM Powered Autonomous Agents

Next: Tool Use