A code-first book about useful autonomy

Agentic Engineering
from First Principles

Building, Controlling, and Scaling LLM Agents in Practice

Build the smallest possible agent. Run it. Break it deliberately. Then engineer the failure.

30chapters
59experiments
1tiny agent kernel
Cover of Agentic Engineering from First Principles
CONCEPT→CODE→RUN→BREAK→ENGINEER→PATTERN→SCALE
The central model

Strip away the terminology.

An agent is a software system in which a model participates in decisions that can affect an environment. Most of the field can be understood through five components.

Agent = Model + Context + Actions + State + Control
01

Model

Proposes decisions. It is a component, not the whole system.

02

Context

The information selected and made visible for the current decision.

03

Actions

Capabilities whose consequences can change an external environment.

04

State

What persists: working state, memory, artifacts, checkpoints and experience.

05

Control

What may happen, how execution proceeds, what resources are available, and when it stops.

THE CONTROL LAWAutonomy ↑  ⇒  Control Requirements ↑

The objective is not maximum autonomy. It is useful autonomy under appropriate control.

The journey

30 chapters. Six parts.

Start with one model call and progressively add abilities, reasoning, collaboration, reliability, and advanced autonomy.

Executable learning

59 experiments. One question at a time.

Every experiment isolates a mechanism, creates a failure, and turns the failure into an engineering lesson.

No magic

The smallest useful agent fits on one screen.

Frameworks come later. First, make the control loop visible enough to reason about.

  • Provider-neutral model interface
  • Explicit tool execution
  • Bounded steps and stopping
  • Deterministic examples before empirical benchmarks
  • Primitive → Engineered → Framework
View companion code on GitHub
agent.py
class Agent:
    def run(self, goal):
        messages = [goal]

        for step in range(10):
            decision = self.model(messages)

            if decision.done:
                return decision.answer

            result = self.tools[
                decision.tool
            ](**decision.arguments)

            messages.append(result)

        raise RuntimeError(
            "Step limit reached"
        )
The complete book

All 30 chapters.
Yours to explore.

Download the complete 349-page PDF, including the cover, practical experiments, and the full journey from a model call to controlled autonomy.

  1. Enter your email address.
  2. Confirm it using the link in your inbox.
  3. Download the complete book.

You can still read Chapter 1 immediately.

Get the full PDF

We’ll send you a verification link. Book updates are optional.

We use your email to verify access. Only readers who select the checkbox and confirm their email join the mailing list. Privacy details.

Checking download availability…

Principles revealed by the experiments

More is not automatically better.

More Context ≠ Better Context
More Reasoning ≠ Better Answers
More Memory ≠ Better Memory
More Agents ≠ Better Intelligence
More Autonomy ≠ Better Systems
Adaptation ≠ Improvement
Outcome Quality ≠ Trajectory Quality
Capability ≠ Permission
Consensus ≠ Truth
CV
About the author

Christiaan van der Walt, PhD

Engineer, AI practitioner, and technology leader working at the intersection of machine learning, software systems, analytics, and financial services. Agentic Engineering from First Principles grew from a simple question: how little code is needed to expose what an agent actually is—and what new control becomes necessary each time we give it more autonomy?

A fuller author biography and portrait will be added from the final CV/profile material.

Start at the beginning

Build the smallest possible agent.
Then break it.

59 executable experiments. One tiny agent kernel. No magic.