Skip to content

Preface

"We are entering a world where computers behave like people: browsing, clicking, copying, pasting, planning." — Andrej Karpathy

The last few years have witnessed an unprecedented transformation—from simple, reactive programs to sophisticated, autonomous entities capable of understanding context, making decisions, and interacting dynamically with their environment and other systems. As AI systems shift from passive classifiers to active problem-solvers, we stand at an inflection point that demands a fundamental shift in how we think about software engineering.

Building intelligent agents requires more than technical skills; it requires a deeper understanding of how intelligence works. Large language models (LLMs) augmented with tools, memory, and multi-step reasoning are increasingly deployed as agents capable of planning, acting, and coordinating with humans and other agents. Yet despite rapid progress, the field lacks a shared conceptual framework—a common language that revolves around the key components and mechanisms of intelligence itself.

We argue that modern AI demands people who understand intelligence more than they understand code. Real progress comes from grasping how reasoning, creativity, and cognition work—not from traditional programming expertise alone. Building truly smart systems requires minds trained to understand thinking itself, not just to write code.


A Perspective on Intelligence

We believe there are meaningful parallels between the challenges of building artificial intelligence and understanding natural intelligence. Many of the fundamental problems—managing limited memory, decomposing complex tasks, allocating attention—are shared across both domains. For this reason, the solutions to building effective agents are in some cases best approached from the intelligence perspective, drawing insights from cognitive science and neuroscience. The most effective agentic systems emerge when engineers understand not just how to implement a pattern, but why it works from a cognitive perspective. By grounding agent design in cognitive principles, this framework helps engineers understand the limits of intelligence—from working memory constraints and cognitive load to executive control bottlenecks—while inspiring effective solutions that map naturally onto existing agentic architectures.

Throughout this book, you will encounter insights and sayings from pioneers who built agents early in this new era—researchers and engineers from organizations like Anthropic, LangChain/LangGraph, Manus, and others who shaped the field. These perspectives are included not as decoration, but because they inspire deeper understanding and allow us to see aspects of agentic design from illuminating angles. These voices help us understand both the technical challenges and the deeper questions about intelligence that we are collectively exploring.

This book provides AI agent engineers with a shared conceptual language, enabling you to build intelligent problem solvers with a common understanding of how intelligence works. It presents essential design patterns organized into comprehensive parts, covering everything from foundational workflow patterns to advanced multi-agent architectures, memory management, and production-ready safety mechanisms. Each pattern is battle-tested, clearly explained, and accompanied by practical code examples you can run, modify, and learn from.

"Stateless models can't build relationships — agents can." — Andrej Karpathy

The journey ahead explores how to build systems that can reason, plan, act, and collaborate. These are the building blocks of the next generation of AI applications. Let's begin.