top of page

The Blueprint of Multi-Agent Systems - Design

Introduction

"Guys, SaaS is evolving—are you?"

I couldn’t have emphasized this enough in my previous piece, Dream, but let me say it again—AI is moving beyond just chatbots and assistants. For the past decade, SaaS (Software as a Service) has been the foundation of modern digital businesses. We've gone from traditional on-premise software to cloud-based solutions that handle everything from customer engagement to enterprise workflows. But the next five years will bring a paradigm shift—SaaS is evolving into AaaS (Agents as a Service).


Why AaaS (Agents as a Service)? The problem with most SaaS products today is that they still require human input to function effectively. You log into a CRM, manually update leads, or configure automation rules. Even with AI integrations, most SaaS tools act as assistants—they help but don't autonomously complete tasks. AI agents change this. Instead of just providing recommendations, they will take action autonomously based on objectives, constraints, and real-time data.

Imagine a marketing automation tool that doesn’t just suggest an email campaign but executes and optimizes it on its own—adjusting copy, timing, and audience based on live feedback.


What This Means for SaaS Companies?

If you’re working in any SaaS company, you need to start thinking about how your product will evolve in an AaaS world. The companies that adapt will lead, while those that don’t will risk becoming obsolete.


So how do you prepare?

One of the biggest mistakes companies may make when adapting their product to the AI-driven world is simply bolting AI onto their existing platform—whether through basic chatbots or superficial AI features. While this might offer a temporary competitive edge, it’s a short-term fix that won’t stand in the long-run. The entire SaaS industry is changing very rapidly and there are going to be new never thought of demands. Your software might be the best in the world but there’s nothing you can do if it does not fit in the new ecosystem. Therefore shift in demands requires more than just AI integration—it requires a complete rethink of both the product and the business model from the ground up. One question you have to have an answer to is — If the future is driven by AI agents interacting with each other rather than users engaging with traditional software, how will you rethink the delivery of your product to fit into this new agent-driven ecosystem? The answer to this question holds the key to how your product must be reimagined—and with it, the future of SaaS itself.  The future belongs to those who build AI-first products, not those who simply add AI as an afterthought.


Blueprint of Multi-Agent Systems

Alright, enough of the intro—let’s get back on the topic in hand.


In the last blog, we talked about why multi-agent systems are so useful and even walked through an example workflow. But here’s the thing—multi-agent workflows aren’t one-size-fits-all. There are different ways to structure them, and over time, some have proven to be more effective than others, each with its own strengths. So, before you dive into building one, it’s important to understand the popular types and what makes them work.


  1. Chain Framework:

    The Chain Framework is the most straightforward type of multi-agent workflow. It works like an assembly line—each agent completes its task and passes the output to the next agent. The process moves in a single direction, with no backtracking.

    A flowchart representing a Chain Framework for a multi-agent system in blog creation. It starts with a User Prompt (blue box) that initiates the process. The workflow progresses through three sequential agents: Blog Outline Maker, Outline Verifier & Editor, and Blog Writer (black boxes), each passing their output to the next. The final step is End (Blog Posted) (blue box), indicating the completion of the process. The flow follows a linear, step-by-step structure, illustrating the fundamental concept of a chain-based multi-agent system.
    This Flowchart showcases a multi-agent chain network designed for blog creation. It highlights the sequential process where the output of one agent serves as the input for the next, ensuring a smooth workflow from start to finish.

    For example, in a blog creation pipeline:

    • The Blog Outline Maker drafts the initial structure and key points.

    • The Outline Verifier & Editor reviews, refines, and ensures clarity.

    • The Blog Writer takes the final outline and writes the complete blog.

    The biggest advantage of this approach is its simplicity. Since each agent has a well-defined role, the workflow remains predictable. Adding more agents to refine intermediate steps is straightforward.

    However, one major drawback is that there’s no built-in mechanism for feedback. If an agent makes a mistake, the error carries forward, and there’s no way to go back and correct it without external intervention. Another challenge is bottlenecks—if one agent takes longer than expected, the entire process slows down. While the chain framework is great for structured, step-by-step tasks, more complex workflows often require a different approach.


  1. Supervisor / Hierarchical Framework:

    While the Chain Framework is simple and structured, it lacks flexibility. A more advanced approach is the Supervisor or Hierarchical Framework (If you recall I used a similar framework for the email agent in my previous blog — Dream), where a central agent oversees the entire process and manages multiple agents working under it. Instead of following a strict step-by-step sequence, this setup allows for better coordination, agent specialization and parallel processing.

    A flowchart representing a Supervisor / Hierarchical Framework for a multi-agent blog creation system. The process starts with a User Prompt (blue box), which is sent to the Blog Supervisor Agent (black box). The supervisor manages three sub-agents working in parallel: Content Creator Agent, Image Generator Agent, and Title Generator Agent. These agents produce different parts of the blog. Their outputs are then sent to an Output Merging Agent, which combines them into a final blog post. The workflow concludes with the End (Blog Posted) step (blue box). This diagram illustrates a structured, hierarchical approach where a central agent oversees multiple parallel agents.
    Flowchart illustrating a supervisor/hierarchical framework of agents, showcasing the process from a user prompt through various agents, including blog supervision, content creation, image generation, title generation, and output merging, leading to a posted blog.

    Continuing with our blog creation example, here’s how the workflow improves under this framework:

    • Supervisor Agent: Blog Supervisor – Understands users request and accordingly assigns tasks to its Sub Agents.

    • Content Creator Agent – Focuses on writing the blog based on the given outline.

    • Image Generator Agent – Creates relevant images for the blog while the content is being written.

    • Title Generator Agent – Suggests engaging titles based on the blog’s content.


    This framework brings several advantages. Since multiple agents can work simultaneously, the overall process becomes faster and more efficient. The image generator doesn’t have to wait for the entire blog to be written—it can start as soon as the content takes shape. Similarly, the title generator can suggest options before the final touches are made to the blog.


  2. Human-In -The-Loop Framework

    While fully automated multi-agent systems can be efficient, there are many scenarios where human oversight is necessary. The Human-in-the-Loop (HITL) Framework introduces a checkpoint where agents pause and wait for human approval before moving forward. This ensures that critical decisions, quality checks, or subjective elements are reviewed before finalizing the output.


    How It Works in a Blog Creation System

    A flowchart representing the Human-In-The-Loop Framework for a multi-agent blog creation system. The process begins with a User Prompt (blue box), which is handled by the Blog Supervisor Agent (black box). The supervisor manages three sub-agents working in parallel: Content Creator Agent, Image Generator Agent, and Title Generator Agent. Before proceeding further, all outputs are sent to a Human Approval step (red box), where a human reviewer ensures quality and makes necessary adjustments. Once approved, the content moves to the Output Merging Agent, which consolidates everything before reaching the final End (Blog Posted) stage (blue box). This framework ensures human oversight in critical decision-making while leveraging automation for efficiency.
    The Human-In-The-Loop Framework: Combining AI Automation with Human Oversight for Higher-Quality Outputs.

    In this framework, multiple sub-agents work independently on their assigned tasks:


    • Content Creator Agent writes the blog.

    • Image Generator Agent creates visuals.

    • Title Generator Agent suggests engaging titles


However, instead of immediately publishing the blog, the system waits for human intervention. A human reviewer checks the draft, approves or requests revisions, and only then does the blog get posted.

The downside of this framework is that it introduces manual effort, which can slow down the process. However, for workflows where quality and brand consistency matter more than raw speed, this framework strikes the perfect balance between automation and human expertise.


According to me, these three frameworks form the core of multi-agentic systems. Some of you who are already familiar with agents might be wondering why I didn’t include the parallel type of framework. Well, the way I see it, every complex agentic system already has parallel workflows built into it without us even realizing it. Take the Supervisor Framework, for example—the three sub-agents work in parallel, handling different tasks simultaneously. It’s just a natural part of how multi-agent systems function. That’s why I don’t see parallel frameworks as something that needs to be separately explained—it’s pretty intuitive!


Choosing the Right Base LLM

One of the most important and challenging decisions when designing an agent is selecting the right LLM.


There are three key factors you should keep in mind:


  • Output Requirements – This is something you cannot and should not compromise on. If you require high-level reasoning and mathematical computation, you would need a model like o-1 or o-3 mini. If you require image generation, then something like DALL·E is necessary. The point is, you cannot cut corners here.

  • Budget – Different LLM models have different costs per tokens, and it is essential to choose a model that is both cost-efficient and gets the job done. When handling heavy tasks, cost becomes a major factor.

  • Inference Time – For those unfamiliar with the term, inference time is the time taken by an LLM to respond to a query. In small agent frameworks this factor might seem insignificant but as we move into larger agent systems (Multi-Agent Systems), you will see that response time becomes a crucial factor. Shorter inference times improve the efficiency of an agent system. (If you think about it, price per token and inference time are somewhat proportional—higher reasoning models take longer to respond and cost more.)


One piece of advice I always give to people building agents is to avoid over-optimizing for output quality at the expense of price efficiency—a common mistake many people make. It is crucial to find the balance between output quality and price. In some cases, high-quality output is absolutely necessary, I agree, but in larger multi-agent systems, there are places where faster and cheaper models can be and should be used. I’ll show exactly how this works in Deploy.



Crafting Effective System Prompts for Multi-Agent Workflows

When building agents, two of the biggest factors influencing their performance are choosing the right LLM and designing well-structured system prompts. While you might not have control over how the LLM itself functions, the way you guide it through system prompts makes all the difference. A good prompt ensures that the agent understands its role, works efficiently, and produces high-quality outputs.

Key Principles for Writing Effective System Prompts:


  1. Clearly Define the Agent’s Role

    Your agent should have a well-defined function within the system. Instead of a vague prompt like "Write a blog," a better prompt would be:

    "You are a blog outline generator. Your job is to create a structured outline with key points that will serve as a foundation for the final blog."

    This makes the agent’s task explicit and reduces confusion.

  2. Set Boundaries and Constraints

    Agents need clarity on what they shouldn’t do just as much as what they should do. For example, if an Image Generator Agent is part of your system, you might specify:

    "Generate images that are minimalistic and professional. Avoid complex artistic illustrations or cartoonish styles."

    This ensures consistency in output quality.

  3. Define How the Agent Interacts with Other Agents

    In a multi-agent system, one agents output is another’s input thus it becomes very important to specify how information should be received and passed forward.


A good system prompt can make all the difference in how well an agent performs. Sure, picking the right LLM is important, but at the end of the day, it’s all about how you guide it. If your instructions are clear and well-structured, your agents will actually do what you expect instead of going off-track. Multi-agent systems work best when each agent knows its role, follows a solid set of rules, and can adapt based on context. Think of prompting as an art—nail it, and your agents will feel smarter, more reliable, and way more useful.


Conclusion

Phew! That was a lot to take in. I know it might feel like an overload of information, but this is the foundation of multi-agent systems. Understanding these concepts properly is crucial—otherwise, you’ll end up with faulty outputs and hallucinations that can seriously impact the effectiveness of your agents.

But enough of just explaining things—let’s get hands-on. In the next blog, I’ll deploy a multi-agent system from scratch using a no-code platform called Integrail.ai

This system will simulate a game theory scenario, showing how multi-agent setups can be used for strategic decision-making, not just automation.

So, if you’re not familiar with game theory, now’s the time to go read up on it—because the next blog is going to get real interesting! See you in Deploy!

Comments


  • Instagram
  • LinkedIn

 All rights reserved. Powered by creativity.

bottom of page