Multi-Agent Applications in Practice: Building AI Multi-Agent Collaborative Workflows from Scratch

A hands-on guide to building multi-agent collaborative workflows from scratch
This article explains how to build a true multi-agent collaboration system, distinguishing it from common Sub Agent master-slave architectures. It covers practical steps for assistant creation, skill assignment, and group chat collaboration, with a focus on solving LLM hallucination through prompt engineering and workflow documentation, as well as defining communication rules between members.
Overview
Multi-Agent collaboration is one of the key directions for practical AI applications today. Multi-Agent Systems (MAS) originated from the field of distributed artificial intelligence, with the core idea of decomposing complex tasks among multiple autonomous agents that work together collaboratively. Before the rise of Large Language Models (LLMs), MAS was primarily applied in areas like robot coordination and distributed computing. With the emergence of powerful foundation models like GPT-4 and Claude, LLM-based multi-agent systems have entered a practical stage, with representative frameworks including AutoGen, CrewAI, LangGraph, and others.
However, in reality, most multi-agent systems remain stuck at the "Sub Agent" stage—where individual agents operate independently without true collaborative capabilities. Based on a developer's shared tutorial on multi-agent applications, this article outlines how to build a multi-member collaborative AI automation workflow from scratch, covering assistant creation, skill assignment, group chat collaboration, and strategies for addressing hallucination issues.
From Sub Agents to True Multi-Agent Collaboration
Why Most Multi-Agent Systems Fall Short
The developer points out that most multi-agent applications on the market today are essentially still in a "Sub Agent" state. The Sub Agent pattern is fundamentally a master-slave architecture where a primary control Agent decomposes tasks and distributes them to sub-agents for independent execution, with no lateral communication between sub-agents. True multi-agent collaboration requires agents to perceive each other's states, dynamically negotiate task boundaries, and conduct iterative exchanges within a shared context—much closer to how human teams work. Using each Agent as an isolated individual, truly deployable multi-agent collaborative applications remain rare. The goal of this project is to enable multiple Agents to work together like team members, each handling their responsibilities while communicating with one another.
Features currently under development include:
- Cloud functionality integration
- Web-based interface
- Standalone GUI client
- Custom agent building

Hands-On: Creating a Multi-Agent Collaborative Workflow
Step 1: Import Skills and Create an Assistant
The entire process starts with a clean test project. First, you need to import preset skill modules, then create an Assistant based on those skills. Skills are created in a dedicated skill management interface, where you can define different types of skills based on actual requirements.
Key steps:
- Import required skills (e.g., frontend development, backend development)
- Quickly create an assistant
- Create multiple members and assign corresponding skills
For example, create a "Backend Member" with backend development skills, and a "Frontend Member" with frontend development skills. This pattern is not limited to code development scenarios—it's equally applicable to scenarios like novel writing that require multi-role collaboration.

Step 2: Establish Group Chat for Agent Collaboration
After creating members, use the "Create Group Chat" feature to bring all members into the same conversation space. Within the group chat, members can communicate with each other, understand each other's areas of responsibility, and engage in round-robin dialogue.
Here's an important practical tip: Don't add too many members to a single channel. Too many members will cause context confusion and reduce collaboration efficiency. This limitation is closely related to the LLM's context window mechanism—each additional member causes the message history in the group chat to fill up the available Token space more quickly, resulting in critical early information being truncated.
Practical Solutions for Agent Hallucination
Strengthening Constraints Through Prompt Engineering
LLM hallucination is a common problem across all Agent systems. The root cause of hallucination lies in the LLM's autoregressive generation mechanism—the model predicts the next Token based on probability distributions rather than true logical reasoning. In multi-agent scenarios, hallucination problems are cascadingly amplified: one Agent's erroneous output can become the next Agent's input, causing errors to accumulate along the chain. The developer's proposed solution is to repeatedly emphasize and constrain at the Prompt level:
- Add emphatic prompts in the "send suffix" position
- Set individual rule specs for each Member
- Use rule specs to clearly define each member's responsibility boundaries
Prompt Engineering plays a role similar to an operating system kernel in multi-agent systems. Since LLMs themselves have no persistent memory or fixed behavioral patterns, all role definitions, behavioral constraints, and collaboration rules must be injected and maintained through prompts. System Prompts, Few-shot examples, Chain-of-Thought techniques, and other methods collectively form the "software layer" of Agent behavior, which explains why prompt design holds such a central position in the entire multi-agent system.

Workflow Documentation: A Key Technique for Reducing Hallucination
A clever approach is to create a workflow.md document in the project files that describes each member's responsibilities in detail. Then, in the Manager role's prompt, require it to read this document so the manager clearly knows which member is responsible for what.
When the context window fills up and needs to be reset, you can place the workflow document in the "prompt append" position. The Context Window is the maximum number of Tokens an LLM can process in a single inference. Mainstream models' context windows have expanded from an early 4K Tokens to 128K or even longer today, but context overflow remains a common bottleneck in long-running multi-agent tasks. The workflow document, as external persistent storage combined with the "prompt append" mechanism, is essentially a simplified implementation of Retrieval-Augmented Generation (RAG), used to quickly restore an Agent's task awareness after context reset, allowing it to re-read the workflow document and maintain its understanding of task assignments even after a terminal reset.
Note: Before using the "prompt append" feature, you need to click "Restore Defaults" in the assistant settings for this option to appear in the member's prompt settings.
Multi-Agent Interaction Rules and Communication Mechanisms
Defining Communication Rules Between Members
Members can not only complete their own tasks independently but also communicate and collaborate with each other. The specific approach is:
- Add rules in a member's prompt
- Select the target for interaction (e.g., the backend member selects the frontend member)
- Add additional collaboration rules that clearly define the responsibility boundaries between both parties

This "mutual targeting"
Related articles
TutorialsChatGPT Plus Subscription Guide: Are GPT-5.5, image-2, and Codex Worth the Upgrade?
A detailed look at ChatGPT Plus features — GPT-5.5, image-2, and Codex — with a Plus vs Pro comparison and a complete step-by-step subscription guide for users outside the US.
TutorialsHarness AI Engineering in Practice: Using Claude Code to Master Enterprise-Level E-Commerce Development
Deep dive into Harness AI Engineering: master enterprise e-commerce development with Claude Code using the Rules, Skills, Wiki, and Changes framework.
TutorialsCursor + Codex Dual-IDE Collaboration: A Practical Methodology for Open-Source Project Customization
A complete methodology for open-source project customization based on real-world experience, detailing the Cursor+Codex dual-IDE workflow, seven-stage process, MVP validation, and AI source code reading techniques.