In the first part of this series, we introduced the overall architectural pattern of Agent systems. We discussed the three logical layers of Agent systems: the Tool Layer, Action Layer, and Reasoning Layer. We also examined mechanisms such as function calls that allow large language models (LLMs) to interact with the external world through the Action Layer.
We pointed out that as the complexity of Agents increases, the quality and reliability of Agent handling often decline. Therefore, we need to design our Agent systems in a way that can counteract this situation. One key design principle we can adopt is modularization, which we will introduce in this article.
Modularization
One of the best ways to achieve consistent performance in complex Agent systems is to break down the problem space into smaller sub-Agents.
This is achieved through a parent-child relationship between Agents. The top-level parent Agent serves as the entry point for Agent processing. Most functions provided to the Reasoning Layer are handover tasks that delegate processing work to one of the sub-Agents.

Each sub-Agent handles a specific part of the problem space. In fact, this applies the bounded context concept commonly used in microservices architecture to the world of AI Agents.
Benefits of Modularization
Imagine you are building a customer support Agent for an online retailer. This Agent will handle many transactions such as returns, order status, product issues, etc.
If you start with a monolithic architecture, you will soon find that the prompts you provide to the Reasoning Layer become long and complex. The list of functions will also become lengthy. As these two situations occur, the accuracy and performance of your Agent system will be affected.

Adopting a more modular approach can simplify many aspects of the overall architecture. Organizing sub-Agents by functional areas may be a way to separate the concerns of the overall system. The result is roughly as follows:

More Predictable Decision Processes
By breaking the system down into specialized sub-Agents, each Agent takes on a clearly defined set of responsibilities. When the parent Agent coordinates the workflow, it becomes easier to see what is happening and why. Instead of trying to handle multiple tasks simultaneously in a large process, requests can be handed off to the specific Agent that is best suited to handle it.
This leads to more transparent interactions, clearer data paths, and logical, step-by-step progress of tasks. In a monolithic approach, the lines of responsibility become blurred, making it difficult to determine where the problem lies. Modular design eliminates this confusion by establishing clear boundaries for each Agent’s domain.
Separation of Concerns
Modularization allows each Agent to focus on specific aspects of the system. If you have a ReturnsAgent that only handles returns and an OrdersAgent that is solely responsible for orders, you avoid complicating things with irrelevant data or tangential issues. This separation allows for highly concentrated domain knowledge within each Agent, which can greatly enhance accuracy—no more random tangents introducing irrelevant information.

In practice, this approach reflects techniques used in microservices and domain-driven design, where each component has a “bounded context.” By limiting the scope of each sub-Agent, you reduce the number of instructions and dependencies, making each interaction more precise. Thus, both sub-Agents and the parent Agent benefit from greater clarity, simpler prompts, and fewer off-topic responses.
Reducing Complexity
When a system needs to handle multiple tasks or process large amounts of data, complexity can escalate quickly. By distributing responsibilities among multiple sub-Agents, you narrow the problem space for each individual Agent. This decentralization allows each Agent to reason about its task more effectively without being overwhelmed by unrelated matters.
The reduction in complexity also means fewer opportunities for programming or logical errors to occur. Because each sub-Agent is independent, changes in one domain do not inadvertently ripple into another.
Improving Maintainability and Testability
Maintaining a large, monolithic system can be a nightmare. With a modular architecture, you can improve or replace a sub-Agent without worrying about crashing the entire system. This not only reduces development time but also lowers the risk of introducing new errors in areas unrelated to the changes. If your OrdersAgent needs a new feature, you can confidently implement it there, knowing that you won’t break the ReturnsAgent or other parts of the system.
What’s Next
While modularization offers advantages in reducing complexity and improving the maintainability of Agent systems, it also introduces key interaction patterns that you must consider.

Agents need a way to dispatch requests to sub-Agents and callback the parent Agent to ultimately deliver the final result of the Agent processing.
In the third part, we will delve deeper into these interactions and look at example interfaces when implemented using Python.