Overview

6 Implementing agentic structures

Working alone can take you far, but this chapter shows why complex tasks are often better solved by teams of specialized AI agents rather than by a single overloaded one. A lone agent with too many tools, too much context, or too many responsibilities becomes harder to control, harder to debug, and more likely to make mistakes. By splitting work into focused roles, agentic systems become more modular, more reliable, and easier to inspect and maintain.

The chapter then explains the main orchestration patterns used to build these systems. Sequential setups pass work from one agent to the next in a fixed order, which is useful when tasks naturally follow a pipeline. Hierarchical setups add a supervisor that decides which specialist to invoke and when, creating a flexible tree of delegation. Custom structures go even further with cross-calls and more dynamic coordination, but they also add complexity, so the simplest design that fits the problem is usually preferred.

Two hands-on examples illustrate how this works in practice in Langflow. In one, a recipe agent uses RAG over a cookbook stored in FAISS, then passes its output to a dietitian agent that consults health guidelines and revises the meal; the key ideas are careful chunking, toolifying retrieval, and keeping prompts narrow and explicit. In the other, a CopyGenie team uses a planner, copywriter, and delivery agent under a supervisor, with each agent given a clear role, specific tools, and precise instructions. Across both examples, the chapter emphasizes bottom-up development, testing agents individually, and iterating on prompts, models, and responsibilities until the overall system behaves well.

It’s difficult to be a solo agent with too much on its plate!
The four types of agentic structures: how would you organize your agents?
The Chef and the Dietitian have become agents now, each with their own tools.
The first part of the agent-based Healthy-Chef flow.
After loading the recipe book, you can have a preview of its 1918 preface.
Recipes fall between chunks, but there seems to be a repeated separator pattern between them.
With the right Separator string, the text is split into meaningful chunks: one per recipe.
In the first part of our flow, we created a vector database packed with Italian recipes.
Any agent would be happy to have an Italian cuisine recipe book at hand.
Stuffed onions. What a light starter by our chef!
What to cook with only eggplants and tomatoes at hand?
The dietitian agent has a tool to access guidelines.
The Chef and Dietitian are back together. This time with some external support.
The Healthier Ravioli Recipe: a masterpiece of balance between authentic Italian tradition and modern healthy eating guidelines.
The supervisor comes into the picture.
It’s easier to spot bugs when you develop hierarchical structures going bottom-up.
Our social media calendar: so many occasions to post about…
By renaming and editing the description of any component, you can make your flow self-explanatory.
It seems that in December ’27, we can’t get away from a Christmas-themed social media plan.
The Copywriter Agent at work: give it a draft, and you get a shiny post.
How to retrieve a Composio API Key.
The Gmail component requires a Composio API key and a connection with a Gmail account.
We can select many possible actions in Gmail and test them as we please.
The boss agent in action.
We need to provide a clear summary of what each agent can do for their supervisor.
The ultimate agentic team: three agents reporting to a boss agent acting as supervisor.
Behind a single request, there are at least seven steps involving three specialized agents under the guidance of a supervisor agent.
So many collaboration steps behind a work well done!

Summary

  • Agentic structures allow you to solve complex tasks by organizing multiple specialized agents into collaborative workflows, instead of relying on a single, overloaded agent.
  • Multi-agent setups reduce complexity, improve performance, and enhance maintainability by distributing tasks across modular, role-specific agents.
  • Sequential structures (Type 1) execute agents in a fixed order, ideal for linear workflows where each step depends on the previous one.
  • Hierarchical structures (Type 2) introduce a supervisor agent that dynamically delegates tasks to other agents, unlocking conditional execution and reuse.
  • Designing agentic systems is like building human teams—you must balance roles, manage workloads, and carefully structure interactions through iterative testing of setups, models, and prompts.

FAQ

Why use agentic structures instead of a single “super-agent”?Agentic structures split work across specialized agents, which reduces tool overload, improves focus, and makes debugging and control much easier. A single agent with too many tools can become confused, slower, and harder to manage.
What are the main benefits of multi-agent systems?The chapter highlights three main benefits: modularity, specialization, and control. Each agent can be built and tested independently, focus on one domain, and communicate in ways the developer can more easily monitor and govern.
What is a Type 0 agentic structure?Type 0 is a single-agent setup. It is the simplest structure: one agent with its own tools. It offers good control, but it still suffers from the limitations of having one overloaded agent.
What is a Type 1 agentic structure?Type 1 is a sequential agent structure. Multiple agents are arranged in order, and each agent’s output becomes the next agent’s input. This is useful when tasks must happen in a fixed sequence, such as drafting first and reviewing second.
What is a Type 2 agentic structure?Type 2 is a hierarchical structure. A supervisor agent decides which specialized agents to call, when to call them, and whether to delegate at all. It behaves more like an organizational chart or tree of agents.
What is a Type 3 agentic structure?Type 3 is a custom agentic structure. It may include hierarchies, cross-calls, central orchestration, recursive behaviors, or dynamic agent spawning. It is the most flexible and advanced option, but also the most complex.
How does the HealthyChef sequential system work?In HealthyChef, the first agent searches a cookbook using RAG to find a relevant recipe. The second agent, the dietitian, reads that recipe and revises it using health guidelines from the EatWell guide. The final result is returned to the user.
Why is chunking important when building the cookbook RAG system?Chunking affects retrieval quality. If chunks are split only by character count, a recipe can be broken across multiple chunks and retrieved incompletely. Using a better separator pattern helps keep each recipe together and improves RAG performance.
What does it mean to “toolify” a component in Langflow?Toolifying means turning a component into a tool that an agent can call during reasoning. For example, FAISS can be toolified so the chef agent can search the vector database on its own, and a URL component can be toolified so the dietitian can fetch guidelines automatically.
Why does the chapter recommend a bottom-up approach for building hierarchical agents?A bottom-up approach means building and testing specialized agents first, then connecting them to a supervisor afterward. This makes it easier to debug, refine prompts, and verify each agent works correctly before assembling the full hierarchy.

pro $24.99 per month

  • access to all Manning books, MEAPs, liveVideos, liveProjects, and audiobooks!
  • choose one free eBook per month to keep
  • exclusive 50% discount on all purchases
  • renews monthly, pause or cancel renewal anytime

lite $19.99 per month

  • access to all Manning books, including MEAPs!

team

5, 10 or 20 seats+ for your team - learn more


choose your plan

team

monthly
annual
$49.99
$499.99
only $41.67 per month
  • five seats for your team
  • access to all Manning books, MEAPs, liveVideos, liveProjects, and audiobooks!
  • choose another free product every time you renew
  • choose twelve free products per year
  • exclusive 50% discount on all purchases
  • renews monthly, pause or cancel renewal anytime
  • renews annually, pause or cancel renewal anytime
  • Grokking AI Applications ebook for free
choose your plan

team

monthly
annual
$49.99
$499.99
only $41.67 per month
  • five seats for your team
  • access to all Manning books, MEAPs, liveVideos, liveProjects, and audiobooks!
  • choose another free product every time you renew
  • choose twelve free products per year
  • exclusive 50% discount on all purchases
  • renews monthly, pause or cancel renewal anytime
  • renews annually, pause or cancel renewal anytime
  • Grokking AI Applications ebook for free
choose your plan

team

monthly
annual
$49.99
$499.99
only $41.67 per month
  • five seats for your team
  • access to all Manning books, MEAPs, liveVideos, liveProjects, and audiobooks!
  • choose another free product every time you renew
  • choose twelve free products per year
  • exclusive 50% discount on all purchases
  • renews monthly, pause or cancel renewal anytime
  • renews annually, pause or cancel renewal anytime
  • Grokking AI Applications ebook for free