Harness Architecture in Practice: A Deep Dive into Enterprise Multi-Agent Collaboration

A runnable enterprise multi-Agent project using Harness architecture, MCP-based ERP integration, and master-subordinate agent design.
This article breaks down a fully runnable enterprise multi-Agent project, showing how the Harness architecture moves from concept to production code. The Agent core is built on four pillars — file backend, memory module, middleware, and tools — where middleware corrects LLM decision errors, memory records user preferences, and the file backend handles complex I/O. MCP protocol bridges the agent with a Java ERP system, embodying an "AI augments legacy systems" approach rather than a rebuild. Pluggable Skills allow runtime capability expansion without restarts, and a primary agent (MAC) orchestrates multiple sub-agents in parallel. It's a complete enterprise blueprint for developers entering the AI engineering space.
Reading the Project Structure as a Guide to Multi-Agent Engineering
As tools like Claude Code and Hermes Agent grow in popularity, the Harness architecture has emerged as a mainstream approach for productionizing AI Agents. This article breaks down a real-world enterprise multi-Agent collaboration system built by Bilibili creator Xiao Bin (Teacher Xiao), examining how the codebase is organized and how intelligent agents connect with legacy ERP systems.
The project is split into two top-level directories: a Vue-based frontend (front-end) and an SRC directory that houses the core agent logic and backend code. Unlike purely theoretical discussions, this project provides fully runnable code and a live UI demo — making it far more relevant to real enterprise development and technical interviews.
Responsibilities of Each Core Directory
Under SRC, the code is cleanly divided into several modules:
- Agent: The core agent code — the brain of the entire system.
- API/View: The web layer, responsible for deploying the agent to a FastAPI or ASGI server.
- download: The file download directory on the agent's host server.
- MCP Server: Server-side code based on the MCP protocol, specifically handling integration with a Java-based ERP system.
- Skill: A directory of pre-configured skills set up during development.
The value of this layered structure is that each module has a single, well-defined responsibility with clear boundaries — making team collaboration easier and laying the groundwork for dynamic extensibility down the road.
Connecting Agents to Legacy ERP via MCP Protocol
One of the most practically meaningful design choices in this project is how the agent cooperates with existing enterprise systems. The author deliberately built a Java-based simulation of a real ERP system — a "Motorcycle Parts Procurement Management System" — covering supplier management, parts management, purchase order management, logistics, customer management, and warehouse management.

This mirrors enterprise reality: the vast majority of companies already run business systems built on traditional tech stacks like Java. A newly introduced AI agent can't simply replace them — it must integrate with what's already there.
Why MCP Protocol
The project uses the MCP (Model Context Protocol) to bridge the agent and the Java ERP system. As an increasingly standardized protocol in agent development, MCP's advantage lies in providing a unified interface specification that lets agents call external tools and system capabilities in a consistent way.

For job seekers, understanding how "an agent connects to a traditional backend system via MCP" is especially important — it's not just a technical implementation detail, but a reflection of a complete, practical vision for deploying enterprise AI.
Self-Evolving Skills: A Flexible, Pluggable Capability System
The Skill directory is one of the project's standout features. The author repeatedly emphasizes the word "pre-configured," because it reveals one of the Harness architecture's core characteristics: Skills are flexible, loosely coupled, and dynamically changeable.
In real enterprise development, adding or removing a Skill does not affect the agent's start or stop lifecycle. This means you can dynamically extend the agent's capabilities at runtime without restarting the entire system. This "pluggable" design is a hallmark shared by mainstream Harness-based tools like Claude Code, Open Claude Code, and Hermes Agent.
The Skill directory is further subdivided into multiple subdirectories (e.g., payment), each corresponding to an independent Skill, with five or six Skills pre-configured in total. This organization makes skill management modular and maintainable.
The Four Pillars of Agent Core Code
Diving into the Agent directory, the agent's core capabilities are broken down into several key components — the foundational infrastructure for handling complex tasks.

File Backend
Dedicated to CRUD operations on files. The strength of a Harness architecture agent lies in handling complex tasks, and complex tasks almost always involve heavy file operations — generating PowerPoint decks, Word documents, reading, modifying, or creating arbitrary files. A dedicated file backend is essential to support all of this.
Memory Module
Handles the agent's memory capabilities, with a core focus on recording user preferences and habits. For example: User A prefers to compare parts from two suppliers side-by-side during procurement analysis; User B prefers a radar chart showing a supplier's strengths across five dimensions. Once the agent learns these preferences, it can generate personalized outputs that match each user's working style every time. This kind of memory mechanism has become a standard feature in tools like Claude Code and Hermes Agent.
Middleware
Middleware is critical for ensuring the agent runs reliably. The author draws analogies to "interceptors" (familiar to Java developers) and "hook functions" (familiar to Python/TypeScript developers) to explain its role.

The primary purpose of middleware is to correct the LLM's decisions, context handling, and output — ensuring accurate intent recognition, accurate tool invocation, accurate context management, and accurate final output. Middleware is, in essence, the core mechanism for improving agent reliability.
Tools
A set of built-in tools that provide foundational capability support for agent development.
A Two-Tier Master-Subordinate Multi-Agent Architecture
The project adopts a classic primary agent + sub-agent two-tier structure. Multiple sub-agents are defined and instantiated in the sub-agent directory, while the primary agent is named MAC.
This master-subordinate layered design is the defining feature of a multi-agent project: the primary agent handles overall task planning and orchestration, while sub-agents each focus on their specific responsibilities. Through this division of labor, the system can decompose complex tasks, process them in parallel, and collaborate to achieve the final goal.
Bridging Theory and Production Engineering
The greatest value of this project is that it transforms the Harness architecture from abstract theory into a concrete, runnable, demonstrable engineering implementation. For job seekers, being able to walk through actual code and a live demo — clearly explaining what the agent's Harness architecture does and how it works — is far more convincing than talking in abstractions.
From code structure, MCP integration, pluggable Skills, and the three pillars of file backend/memory/middleware, to the master-subordinate multi-agent design — this solution presents a complete technical picture of how enterprise-grade AI Agents are built and deployed in the real world. For developers looking to break into AI engineering, it's an invaluable hands-on blueprint.
Related articles

Vercel AI SDK Releases Vue 3.0.282 Patch Update
Vercel AI SDK releases @ai-sdk/vue@3.0.282 patch update, syncing with core package ai@6.0.282. Learn about the changes, release cadence, and upgrade recommendations.

Vercel AI SDK Sandbox Component Receives Patch Update
Vercel AI SDK releases sandbox-vercel@1.0.109 patch update, syncing the harness dependency to the same version. A look at this maintenance release and what it means for AI app developers.

Vercel AI SDK Vue 4.0.99 Released: Dependency Update Overview
The @ai-sdk/vue 4.0.99 patch release syncs the underlying ai@7.0.99 dependency. Learn what this means for Vue developers building AI apps with Vercel AI SDK.