Building a Multi-Agent System (No-Code)
No-code Agentic AI Demo
Watch the video!
Good morning everyone! This is Louis-François, CTO and co-founder of Towards AI, and today we’re going to explore a must-know for any AI developers and even no-code users: multi-agent systems. You’ve probably used a chatbot before, maybe GPT-4o or even a Claude model, but what if I told you there’s something even more capable out there? Something that can not only talk with you but also act autonomously to get things done. That’s what we’re covering today with agents, or what we also call “Agentic AI”.
So, what is Agentic AI? It’s more than just a chatbot. It’s about AI that doesn’t just respond to you but can actually take action and make decisions to complete tasks without human intervention. I’ll give you some concrete examples of this in just a minute. But what’s the coolest is that it used to require code to build such systems, as in the MetaGPT paper I covered a few months ago. Now, thanks to Integrail, an amazing tool and sponsor of this article, you can create complex multi-agent systems and evaluate them without a single line of code. I’ll show you how in a few minutes.
What is a Multi-Agent System?
But before diving deeper into Agentic AI, let’s understand what a multi-agent system is. It’s simply about having multiple agents, each with their own specialty, collaborating to solve complex problems. Think of it like a group of experts — each one excels at a specific part of a project, and together, they’re able to achieve much more than any one individual could. This idea is similar to what we saw with MetaGPT, which I covered in a previous article, where multiple agents work in sync to break down complex tasks into manageable pieces for which they are each responsible.
Okay, but why do we need multi-agent systems at all? Well, automation. These more complex systems can handle multiple tasks at once, like sending emails, organizing data, and interacting with external services — all simultaneously! Let’s say you want to automate your entire workflow, from email management to posting social media content. A multi-agent system can coordinate all these activities without needing you to constantly provide instructions. It’s basically like a more powerful version of ChatGPT, connecting it with various tools and capabilities it doesn’t have and being able to use adapted LLMs for each task.
This kind of capability is hard for a standard GPT chatbot to match, as those typically handle one response at a time. Here, agents can integrate with tools like ClickUp, generate images, or even work with other AI models to make your life easier. For instance, GPT-4o excels at handling multimodal interactions and real-time voice processing, while Qwen-1.5 is perfect for lightweight customer support tasks due to its ability to handle multiple languages efficiently. Or using Claude for coding and writing, which is my personal favourite these days. This setup showcases the strengths of each model in a multi-agent system to maximize efficiency. Another example is using a smaller model like 4o mini for easier tasks or Gemini 1.5 Pro for managing large data contexts, which allows the multi-agent system to process entire books or large datasets effectively. Since you have multiple agents, you can use various LLMs for each task to reduce costs and delay and maximize performance, which can only be done in such systems.
But of course, you’ll want to be cautious about possible issues, such as the increased chance of hallucination when multiple agents interact. We’ll get into that later after our nice demo.
You may recall previous articles where I covered ReACT and MetaGPT — both of which are powerful frameworks for creating these powerful multi-agent systems. Let’s briefly revisit these to provide more context on how they can be applied today.
ReACT, developed as a method that combines reasoning and acting, is incredibly effective for multi-agent systems that require both logical thinking and practical actions. For example, an agent using ReACT can break down a user request into reasoning steps before deciding what action to take, which makes it more reliable in situations that demand careful decision-making. By integrating ReACT, multi-agent systems can plan more thoughtfully, reducing mistakes compared to reactive-only agents.
MetaGPT, on the other hand, is like having a team of GPTs that specialize in different areas and can interact to solve more complex tasks collaboratively through formatted outputs. MetaGPT is ideal when different parts of a task need distinct expertise, such as marketing, coding, and data analysis. For example, if you’re managing a product launch, MetaGPT agents can split responsibilities — one agent can generate marketing content, while another focuses on technical documentation. This kind of cooperative agent structure makes agentic systems significantly more powerful than a single LLM. And here’s how we can easily do one ourselves…
Building a Simple Multi-Agent Application
In this demo, I’ll try to replicate my work with a multi-agent system, or at least a part of it. As you know, I often cover new papers and techniques in the field on the channel. A part of what I do is to post on LinkedIn or Twitter to summarize the key insights from the papers. It requires me to read the paper, understand what the researchers did, if it’s really relevant and synthesize it all into clear bullet points.
Of course, ChatGPT can do a good job at it if you send the paper, but it often requires multiple back-and-forths.
Then, we want to have a version for LinkedIn and another for Twitter to work with threads of maximum lengths. It can be done again with ChatGPT, but it still requires some back-and-forth. And then we’d like a nice cute or funny image, why not? Again more back and forth with Dalle or another image generator of your choice.
Instead, I replicated this process in one multi-agent workflow that simply needs the PDF as inputs and generates the rest individually. Here, I just put the text for simplicity, but you can build a system that is as complex as you want. It goes through, the first agent extracts the relevant text from the paper. Here, you can of course, give it a more advanced prompt and examples to show how I usually do it, which has been very annoying to do manually with ChatGPT in the past. Then we have 3 other agents in charge of making the posts and the images with specific prompts each. Again, here, you could provide more detail and examples to improve results as with ChatGPT, but here, it would be a once and for all edit.
Of course, it’s a super basic version and the prompts would require work and fine-tuning, just as with ChatGPT, but you can see now how, with just one click, I can get all I need. I don’t even need to prompt it anymore and I didn’t code a single line to do that. This is a pretty cool system and an even cooler platform to build those. They then allow you to deploy the system and create an API out of it, all without any code knowledge, which you could provide to your developers or connect to a simple website.
Tips and Warnings for Using Multi-Agent Systems
Now, it’s crucial to remember that customization is key when building these systems. Each agent should have a well-defined role, and when you integrate with platforms like Integrail, ensure you’ve tested it thoroughly, which is the topic of our second article with Integrail. Over-automation can be tempting, but human oversight is still crucial — especially in high-stakes environments or even small things like social media posts! People can see it’s been generated. We feel it. It needs to be manually edited and improved to match your personality, ideas, jokes, and quirks!
Here are some practical tips:
- Define Clear Boundaries for Each Agent: It’s easy for roles to overlap, which can lead to inefficiencies or, worse, conflicting actions. Clearly define the scope of each agent’s tasks. For example, Gemini 1.5 Pro can be used for large-scale data interpretation, and Claude 3.5 can be used for user interaction-focused roles, etc. It’s just like with many humans: don’t ask multiple questions at once, or else they will forget to answer some of them! Likewise, with agents, you want to split the tasks as best as possible.
- Monitor Hallucinations Across Agents: When multiple LLMs collaborate, there’s a risk of hallucination scaling — where one model’s misinformation gets passed on and escalated. To mitigate this, use ReACT’s reasoning framework, which allows each agent to validate its output before another agent takes over.
- Human-in-the-Loop for Critical Decisions: Multiple-agent systems can be prone to errors, especially in sensitive applications like financial transactions or healthcare. Always incorporate humans in critical decisions to ensure safety and reliability.
- Test Integration Rigorously: Particularly with a multi-agent setup, testing integration points between agents is essential. Use tools like Integrail to simulate various workflows and ensure agents interact smoothly. We’ll see that in the next article.
- Avoid Over-Automation: It’s tempting to automate every task but remember that some processes benefit from human judgment or human taste and personality, such as social posts. For example, customer support can use Qwen-1.5 to provide instant answers, but complex issues should be escalated to a human to ensure accuracy and empathy.
- Privacy and Security Considerations: Always handle data with care, particularly in systems that interact with sensitive information. For instance, GPT-4o and LLaMA 3.1 have integrated moderation tools that can help flag sensitive content, but anonymization features, like those in Integrail, are still crucial for privacy compliance.
Conclusion
So, just remember, as cool as all this is, there are always trade-offs — hallucinations, over-automation, and privacy issues need to be handled with care.
If you enjoyed this deep dive into Agentic AI, make sure to like, subscribe, and let me know in the comments if you try out Integrail. I really love the tool and love the team even more. I’d definitely recommend checking it out, as they have a nice free tier to try building your multi-agent systems like this one!
Thank you for reading, and I’ll see you in the next one!