Contents
- 1. Context
What information is available at a particular step.
- 2. Memory
How information survives and becomes available again.
- 3. Agency
How a proposed action becomes an effect in the world.
- 4. Reasoning
How calls and operations form loops and larger reasoning structures.
- 5. Coordination
How agents divide work and combine their results.
- 6. Artifacts
How shared objects preserve work and organize further contributions.
- 7. Autonomy
How agents start and resume work without another user message.
- 8. Evaluation
How to establish whether the work succeeded.
- 9. Feedback
How observations change the next attempt.
- 10. Learning
How experience improves future work.
Introduction
This book introduces the design of agentic systems: programs that can choose and carry out actions in pursuit of a goal. We focus on systems built with large language models (LLMs), which generate responses to supplied instructions and information. The surrounding program can use a model's response to choose an action and carry out that action. The design of the program determines what information the model receives and what actions the system can perform.
You have considerable freedom in how you build such a program. You can ask a model to draft an answer, then give the draft and its sources to the model for review. You can also divide a large assignment into smaller tasks and request a separate response for each task. When does splitting the work help? We choose an arrangement by identifying the problem each component solves and weighing the cost of connecting the components.
Elements of Agentic System Design begins with a single model call: one request to a model and the response the model generates. We connect calls into agents that can take actions and use the results to decide what to do next. The book then develops larger organizations of agents, including systems that operate autonomously and learn from the outcomes of their work. Each new structure addresses a limitation or requirement that the simpler design brings into view. The elements organize this progression around engineering problems that recur as systems grow.

Context offers an early example of how a limitation shapes a design. A model's context is the information available during a call. Because that context has a size limit, a large task may benefit from several calls, each with the instructions and evidence for one part of the work.
The same constraint can motivate separate agents for research, drafting, and review. Each agent needs the assignment's requirements and relevant work from the others. Dividing the work therefore creates another design problem: how to distribute information and assemble the context each agent needs.
The elements also connect familiar cognitive behaviors to simple code structures around model calls. Memory requires stored records and code that selects the information needed for a later call. An agent's cycle of decisions and actions requires a loop that returns each action's result to the model. These connections make failures easier to investigate. If an agent ignores an earlier decision, we can check whether the program saved the decision and included it in the next call. A missing record requires a different fix from a model that received the decision but failed to follow it.

The book assumes curiosity about software, but no experience building agents. Diagrams show how the components connect and how information moves between them. For the worked examples, we build a program that gathers sources and writes a research briefing. The examples show how the components work together in a complete system.

By the end of the book, you should be able to explain why an agentic system needs each of its components and how a different arrangement would change its behavior. That understanding gives you a basis for adapting existing patterns and inventing new ones as models improve. The first chapter, Context, examines how the information supplied to one model call shapes its response.
Further reading
The distinctions in this book can be explored through research and working implementations. These sources give more detailed accounts of particular mechanisms and their limitations.
- Lost in the Middle studies how the position of relevant information affected the models and retrieval tasks tested. It supports the context chapter's treatment of placement as an empirical question.
- Anthropic's Building effective agents explains workflows, agent loops, and composable patterns. Its architectural distinctions are useful beyond the tooling available when it was written.
- Judging LLM-as-a-Judge with MT-Bench and Chatbot Arena examines model-based evaluation, including position, verbosity, and self-enhancement biases.
- Anthropic's Demystifying evals for AI agents develops the distinction between an execution transcript and its outcome, alongside repeated trials and human calibration.
- The Model Context Protocol architecture explains how applications connect to servers providing tools and other context. The Agent Skills format describes reusable instructions and resources loaded when needed.
- Temporal's documentation on durable execution and Activities gives a concrete implementation of persisted execution history and retryable work.
Implementation references
Vercel AI SDK Core is a useful starting point for TypeScript examples of tools and bounded model loops. LangGraph makes state and execution graphs explicit. These libraries package several of the elements together; their interfaces can be understood in terms of the context, control flow, and state they manage.
About this edition
Written by William Chen at Idyllic Labs. This second edition develops the original Elements of Agentic System Design into a continuous guide. It is a working draft. AI tools assist with research and drafting.
The text is available under Creative Commons Attribution 4.0. Comments and corrections can be sent to william@idylliclabs.com.