Agentic Design Patterns: A Hands-On Guide to Building Intelligent Systems
AI is like humans: alone, we are pretty stupid and can only solve simple tasks. As soon as the problem becomes more complex, more complex solutions are needed: people with different experiences and expertise must work together.
The knowledge gaps of individuals are filled by others. The mistakes of individuals are recognized by others. Teams exhibit emergent behavior: they are more than the sum of their parts. Team members reinforce each other’s strengths and mitigate each other’s weaknesses.
What applies to human intelligence also applies to artificial intelligence. There, we don’t call it teamwork, but rather agentic AI. Individual LLMs can be pretty stupid. When LLM-based agents work together—in the right way—amazing results can be achieved.
We experienced this in a project a few weeks ago. The app allows users to analyze and visualize Earth observation data using natural language and to iteratively refine the analysis and visualization. A single LLM quickly reached its limits: after a few iterations, it got confused.
The solution was a multi-agent design – which we will present in more detail at another time: a user agent receives the user prompts, asks questions if necessary, and delegates the code creation to a code agent. To make the code agent more reliable, it is provided with a few selected examples as context.
Without knowing it, we applied a number of agentic design patterns. For example, the Program-Aided Language (PAL) model pattern, which combines stochastic models such as LLM with deterministic programming languages such as Python. Because these patterns, which together determine the AI architecture, are so crucial to the performance of the AI solution, it is worth taking a closer look at them.
A wonderful book for getting started and gaining an overview of the multitude of patterns is “Agentic Design Patterns: A Hands-On Guide to Building Intelligent Systems” by Antonio Gulli. He introduces one pattern per chapter, starting with simple classics such as prompt chaining and tool use, moving on to more complex variants such as Model Context Protocol (MCP) and Retrieval Augmented Generation (RAG), and ending with current approaches from research such as Chain of Debate (COB) and Dynamic Model Switching.
He explains the individual design patterns textually and visually, gives application examples, and clarifies the advantages and disadvantages. For each pattern, there is at least one code example for well-known frameworks such as LangChain & LangGraph, Crew AI, or Google Agent Developer Kit (ADK).
At Datentreiber, we use our free Miro template for Agentic AI Design:
👉 https://miro.com/templates/multiagent-system-mas-design-workshop
Inspired by the book, we are considering expanding the template to include a pattern library. Let us know what you think and if you want to join the effort!
Responses