IllyroidBook

agentsAI Agents: Design Patterns

PDF · 74 pages
// Book · Intermediate · Free

AI Agents: Design Patterns

ReAct, Plan-and-Execute, Reflexion, and multi-agent patterns with diagrams and Python implementation examples.

agentsllmpythonFree

Overview

The main design patterns behind today's AI agents, each explained with a diagram, when to use it, where it fails, and a compact Python example.

The goal is to help you pick the simplest pattern that solves the problem — not the most impressive one.

Key highlights

ReAct (reason + act) loops
Plan-and-Execute agents
Reflexion and self-critique
Multi-agent supervisor and hand-off patterns
Diagrams for every pattern
Python examples you can run

What's inside

Agent basics

Model, tools, memory and the loop that connects them.

ReAct

Interleaving reasoning and tool calls.

Plan-and-Execute

Separating planning from doing for longer tasks.

Reflexion

Letting the agent review and improve its own output.

Multi-agent systems

Supervisors, routers and specialist agents.

Choosing a pattern

A decision guide with cost and reliability trade-offs.

Tools & technologies

PythonOpenAI SDKAnthropic SDKLangGraph

Is this for you?

Who it's for

Developers building their first serious AI agents.

Before you start

Python basics and some experience calling an LLM API.