Agentic Engineering from First Principles All chaptersLecturesLabDownload the book
Part I · What Is an Agent?

Chapter 1: From an LLM to an Agent

Central questionWhat actually changes when a large language model becomes an agent? It sounds like a simple question. But the word agent is used so loosely that it's worth answering precisely.

Lecture

Chapter principle

Agency begins when model decisions can cause actions, whose consequences become observations for subsequent decisions.

Key takeaways

Experiments

Every experiment in the book is small, runnable and printed with its real output. In the Lab you can replay a recorded real run of each one, with no programming, and watch what the model and the agent do.

Experiment 1: A model call

Can a language model do exact arithmetic on its own?

A language model receives text and returns text. Here a real model is asked what 27611 × 2033 is, and told to reply with the number only. The program then compares the reply with the true answer. This is one recorded run. A new run will probably give a different number.

Experiment 2: From model to agent

What changes when the model can ask for a tool?

The same multiplication, but now the model is told that a calculator exists. Nothing in the request says to use it. If the model asks for the calculator, the program runs it, adds the result to the conversation, and asks the model again. This is a recorded run of a real model. A new run may word the answer differently.

All the code for this chapter: github.com/agentic-engineering-book/code

This is Chapter 1 of Agentic Engineering from First Principles: thirty chapters, a case study and fifty-nine executable experiments, from a single model call to controlled, self-improving agents.
Download the bookBrowse all chapters
Chapter 2: Structured Decisions →